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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231385
91177308-0d34-0410-b5e6-
96231b3b80d8
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231382
91177308-0d34-0410-b5e6-
96231b3b80d8
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231380
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Thu, 5 Mar 2015 17:00:05 +0000 (17:00 +0000)]
FileCheck: Document CHECK-SAME, follow-up to r230612
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231379
91177308-0d34-0410-b5e6-
96231b3b80d8
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231378
91177308-0d34-0410-b5e6-
96231b3b80d8
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231374
91177308-0d34-0410-b5e6-
96231b3b80d8
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231371
91177308-0d34-0410-b5e6-
96231b3b80d8
Frederic Riss [Thu, 5 Mar 2015 14:43:15 +0000 (14:43 +0000)]
Fix -Woverflow warning in unittest.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231368
91177308-0d34-0410-b5e6-
96231b3b80d8
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231366
91177308-0d34-0410-b5e6-
96231b3b80d8
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231360
91177308-0d34-0410-b5e6-
96231b3b80d8
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231359
91177308-0d34-0410-b5e6-
96231b3b80d8
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231358
91177308-0d34-0410-b5e6-
96231b3b80d8
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231357
91177308-0d34-0410-b5e6-
96231b3b80d8
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231356
91177308-0d34-0410-b5e6-
96231b3b80d8
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231354
91177308-0d34-0410-b5e6-
96231b3b80d8
Frederic Riss [Thu, 5 Mar 2015 06:13:39 +0000 (06:13 +0000)]
Remove useless break after return.
Pointed out by Paul Robinson.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231353
91177308-0d34-0410-b5e6-
96231b3b80d8
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231352
91177308-0d34-0410-b5e6-
96231b3b80d8
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231351
91177308-0d34-0410-b5e6-
96231b3b80d8
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231350
91177308-0d34-0410-b5e6-
96231b3b80d8
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231349
91177308-0d34-0410-b5e6-
96231b3b80d8
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231348
91177308-0d34-0410-b5e6-
96231b3b80d8
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!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231347
91177308-0d34-0410-b5e6-
96231b3b80d8
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231341
91177308-0d34-0410-b5e6-
96231b3b80d8
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231340
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 5 Mar 2015 02:05:42 +0000 (02:05 +0000)]
Use the existing begin and end symbol for debug info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231338
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 5 Mar 2015 01:25:19 +0000 (01:25 +0000)]
Reformat.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231336
91177308-0d34-0410-b5e6-
96231b3b80d8
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231335
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 5 Mar 2015 01:25:06 +0000 (01:25 +0000)]
Revert r231104, "unique_ptrify FullDependenceAnalysis::DV", to appease msc18 C2280.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231334
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Thu, 5 Mar 2015 01:20:05 +0000 (01:20 +0000)]
[sanitizer] add nosanitize metadata to more coverage instrumentation instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231333
91177308-0d34-0410-b5e6-
96231b3b80d8
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231332
91177308-0d34-0410-b5e6-
96231b3b80d8
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231331
91177308-0d34-0410-b5e6-
96231b3b80d8
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231324
91177308-0d34-0410-b5e6-
96231b3b80d8
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231323
91177308-0d34-0410-b5e6-
96231b3b80d8
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231322
91177308-0d34-0410-b5e6-
96231b3b80d8
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231313
91177308-0d34-0410-b5e6-
96231b3b80d8
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231309
91177308-0d34-0410-b5e6-
96231b3b80d8
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231307
91177308-0d34-0410-b5e6-
96231b3b80d8
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231306
91177308-0d34-0410-b5e6-
96231b3b80d8
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231305
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 4 Mar 2015 22:20:52 +0000 (22:20 +0000)]
Provide an explicit move ctor because MSVC can't synthesize one
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231303
91177308-0d34-0410-b5e6-
96231b3b80d8
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231300
91177308-0d34-0410-b5e6-
96231b3b80d8
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231299
91177308-0d34-0410-b5e6-
96231b3b80d8
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)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231298
91177308-0d34-0410-b5e6-
96231b3b80d8
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231297
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 4 Mar 2015 22:06:14 +0000 (22:06 +0000)]
Update LangRef for explicit type changes to 'load' instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231296
91177308-0d34-0410-b5e6-
96231b3b80d8
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231295
91177308-0d34-0410-b5e6-
96231b3b80d8
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231294
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 4 Mar 2015 21:49:03 +0000 (21:49 +0000)]
don't repeat class / function / variable names in comments; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231292
91177308-0d34-0410-b5e6-
96231b3b80d8
Paul Robinson [Wed, 4 Mar 2015 20:55:11 +0000 (20:55 +0000)]
Support standard DWARF TLS opcode; Darwin and PS4 use it.
Differential Revision: http://reviews.llvm.org/D8018
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231286
91177308-0d34-0410-b5e6-
96231b3b80d8
Nemanja Ivanovic [Wed, 4 Mar 2015 20:44:33 +0000 (20:44 +0000)]
Add LLVM support for PPC cryptography builtins
Review: http://reviews.llvm.org/D7955
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231285
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Wed, 4 Mar 2015 20:38:59 +0000 (20:38 +0000)]
Try to satisfy sanitizer lint check
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231284
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 4 Mar 2015 19:56:44 +0000 (19:56 +0000)]
Add a FIXME for PR22796, broken ordering of ClassInfo in TableGen
As discussed (at length) in code review of r222935, with Duncan.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231282
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 4 Mar 2015 19:15:29 +0000 (19:15 +0000)]
Fix the build of the gold-plugin and examples.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231279
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Wed, 4 Mar 2015 19:06:17 +0000 (19:06 +0000)]
Add missing <atomic> include to PassRegistry.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231277
91177308-0d34-0410-b5e6-
96231b3b80d8
Erik Eckstein [Wed, 4 Mar 2015 18:57:11 +0000 (18:57 +0000)]
Add a lock() function in PassRegistry to speed up multi-thread synchronization.
When calling lock() after all passes are registered, the PassRegistry doesn't need a mutex anymore to look up passes.
This speeds up multithreaded llvm execution by ~5% (tested with 4 threads).
In an asserts build of llvm this has an even bigger impact.
Note that it's not required to use the lock function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231276
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 4 Mar 2015 18:52:32 +0000 (18:52 +0000)]
Recommit r231221: "Devirtualize ~parser<T> by making it protected in base classes and making derived classes final"
Reverted in r231254 due to a self-hosting crash of Clang (see Clang
PR22793). Workaround the crash by using {} instead of = default to
define a dtor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231274
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 4 Mar 2015 18:51:45 +0000 (18:51 +0000)]
Bring r231132 back with a fix.
The issue was that we were always printing the remarks. Fix that and add a test
showing that it prints nothing if -pass-remarks is not given.
Original message:
Correctly handle -pass-remarks in the gold plugin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231273
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Wed, 4 Mar 2015 18:43:29 +0000 (18:43 +0000)]
Make DataLayout Non-Optional in the Module
Summary:
DataLayout keeps the string used for its creation.
As a side effect it is no longer needed in the Module.
This is "almost" NFC, the string is no longer
canonicalized, you can't rely on two "equals" DataLayout
having the same string returned by getStringRepresentation().
Get rid of DataLayoutPass: the DataLayout is in the Module
The DataLayout is "per-module", let's enforce this by not
duplicating it more than necessary.
One more step toward non-optionality of the DataLayout in the
module.
Make DataLayout Non-Optional in the Module
Module->getDataLayout() will never returns nullptr anymore.
Reviewers: echristo
Subscribers: resistor, llvm-commits, jholewinski
Differential Revision: http://reviews.llvm.org/D7992
From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231270
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Wed, 4 Mar 2015 18:31:10 +0000 (18:31 +0000)]
Revert "unique_ptrify ValID::ConstantStructElts"
This reverts r231200 and r231204. The second one added an explicit move
ctor for MSVC.
This change broke the clang-cl self-host due to weirdness in MSVC's
implementation of std::map::insert. Somehow we lost our rvalue ref-ness
when going through variadic placement new:
template <class _Objty, class... _Types>
void construct(_Objty *_Ptr,
_Types &&... _Args) { // construct _Objty(_Types...) at _Ptr
::new ((void *)_Ptr) _Objty(_STD forward<_Types>(_Args)...);
}
For some reason, Clang decided to call the deleted std::pair copy
constructor at this point. Needs further investigation, once I can
build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231269
91177308-0d34-0410-b5e6-
96231b3b80d8
Wei Mi [Wed, 4 Mar 2015 17:44:22 +0000 (17:44 +0000)]
Revert the test commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231264
91177308-0d34-0410-b5e6-
96231b3b80d8
Wei Mi [Wed, 4 Mar 2015 17:41:17 +0000 (17:41 +0000)]
Test commit. It will be reverted in the next commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231262
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Wed, 4 Mar 2015 17:39:59 +0000 (17:39 +0000)]
Update the out-of-date dwarf expressions in these testcases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231261
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Wed, 4 Mar 2015 17:39:33 +0000 (17:39 +0000)]
Fix DwarfExpression::AddMachineRegExpression so it doesn't read past the
end of an expression that ends with DW_OP_plus.
Caught by the ASAN build bots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231260
91177308-0d34-0410-b5e6-
96231b3b80d8
Marek Olsak [Wed, 4 Mar 2015 17:33:45 +0000 (17:33 +0000)]
R600/SI: Add an intrinsic for S_FLBIT_I32 / V_FFBH_I32
Required by OpenGL (ARB_gpu_shader5).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231259
91177308-0d34-0410-b5e6-
96231b3b80d8
Nemanja Ivanovic [Wed, 4 Mar 2015 17:09:12 +0000 (17:09 +0000)]
Test commit. Removed an unnecessary space
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231257
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 4 Mar 2015 17:01:18 +0000 (17:01 +0000)]
Explicitly default ilistTest::Node's copy constructor
In the presence of a user-declared dtor, calling an implicit copy ctor
is deprecated in C++11.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231256
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Wed, 4 Mar 2015 16:24:40 +0000 (16:24 +0000)]
Revert r231221, "Devirtualize ~parser<T> by making it protected in base classes and making derived classes final"
It broke seflhosting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231254
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Wed, 4 Mar 2015 16:24:28 +0000 (16:24 +0000)]
Revert r231132, "Correctly handle -pass-remarks in the gold plugin.", for now, to suppress log floodng in LTO.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231253
91177308-0d34-0410-b5e6-
96231b3b80d8
JF Bastien [Wed, 4 Mar 2015 15:47:57 +0000 (15:47 +0000)]
Mutate TargetLowering::shouldExpandAtomicRMWInIR to specifically dictate how AtomicRMWInsts are expanded.
Summary:
In PNaCl, most atomic instructions have their own @llvm.nacl.atomic.* function, each one, with a few exceptions, represents a consistent behaviour across all NaCl-supported targets. Unfortunately, the atomic RMW operations nand, [u]min, and [u]max aren't directly represented by any such @llvm.nacl.atomic.* function. This patch refines shouldExpandAtomicRMWInIR in TargetLowering so that a future `Le32TargetLowering` class can selectively inform the caller how the target desires the atomic RMW instruction to be expanded (ie via load-linked/store-conditional for ARM/AArch64, via cmpxchg for X86/others?, or not at all for Mips) if at all.
This does not represent a behavioural change and as such no tests were added.
Patch by: Richard Diamond.
Reviewers: jfb
Reviewed By: jfb
Subscribers: jfb, aemerson, t.p.northover, llvm-commits
Differential Revision: http://reviews.llvm.org/D7713
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231250
91177308-0d34-0410-b5e6-
96231b3b80d8
Jozef Kolek [Wed, 4 Mar 2015 15:47:42 +0000 (15:47 +0000)]
[mips][microMIPS] Make usage of ADDU16 and SUBU16 by code generator
Differential Revision: http://reviews.llvm.org/D7609
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231249
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Schmidt [Wed, 4 Mar 2015 14:56:05 +0000 (14:56 +0000)]
[PowerPC] Remove unnecessary and incomplete commentary
This "itinerary class map" in PPCSchedule.td is incomplete and
redundant with the actual code. As it provides no value, we've
decided to remove it.
No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231246
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrea Di Biagio [Wed, 4 Mar 2015 14:23:25 +0000 (14:23 +0000)]
[X86][FastISel] Simplify the logic in method X86SelectSIToFP.
The target-independent selection algorithm in FastISel already knows how
to select a SINT_TO_FP if the target is SSE but not AVX.
On targets that have SSE but not AVX, the tablegen'd 'fastEmit' functions
for ISD::SINT_TO_FP know how to select instruction X86::CVTSI2SSrr
(for an i32 to f32 conversion) and X86::CVTSI2SDrr (for an i32 to f64
conversion).
This patch simplifies the logic in method X86SelectSIToFP knowing that
the code would not be reachable if the subtarget doesn't have AVX.
No functional change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231243
91177308-0d34-0410-b5e6-
96231b3b80d8
Dmitry Vyukov [Wed, 4 Mar 2015 13:27:53 +0000 (13:27 +0000)]
asan: do not instrument direct inbounds accesses to stack variables
Do not instrument direct accesses to stack variables that can be
proven to be inbounds, e.g. accesses to fields of structs on stack.
But it eliminates 33% of instrumentation on webrtc/modules_unittests
(number of memory accesses goes down from 290152 to 193998) and
reduces binary size by 15% (from 74M to 64M) and improved compilation time by 6-12%.
The optimization is guarded by asan-opt-stack flag that is off by default.
http://reviews.llvm.org/D7583
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231241
91177308-0d34-0410-b5e6-
96231b3b80d8
Toma Tabacu [Wed, 4 Mar 2015 13:01:14 +0000 (13:01 +0000)]
[mips] Rename the LA/LI/DLI TableGen definitions and classes. NFC.
Summary:
Use more reasonable names for these pseudo-instructions.
As there's only one definition tied to any one of these classes, I named them with abbreviated versions of their respective class' name.
Reviewers: dsanders
Reviewed By: dsanders
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D7831
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231240
91177308-0d34-0410-b5e6-
96231b3b80d8
Vasileios Kalintiris [Wed, 4 Mar 2015 12:37:58 +0000 (12:37 +0000)]
[mips] Keep the parameter list of Filler::searchRange() consistent. NFC.
Summary:
Move the "Filler" parameter to the end of the parameter list as it is,
conceptually, the only output parameter of that function.
Reviewers: dsanders
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D7726
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231239
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 4 Mar 2015 12:18:08 +0000 (12:18 +0000)]
[MBP] Fix a really horrible bug in MachineBlockPlacement, but behind
a flag for now.
First off, thanks to Daniel Jasper for really pointing out the issue
here. It's been here forever (at least, I think it was there when
I first wrote this code) without getting really noticed or fixed.
The key problem is what happens when two reasonably common patterns
happen at the same time: we outline multiple cold regions of code, and
those regions in turn have diamonds or other CFGs for which we can't
just topologically lay them out. Consider some C code that looks like:
if (a1()) { if (b1()) c1(); else d1(); f1(); }
if (a2()) { if (b2()) c2(); else d2(); f2(); }
done();
Now consider the case where a1() and a2() are unlikely to be true. In
that case, we might lay out the first part of the function like:
a1, a2, done;
And then we will be out of successors in which to build the chain. We go
to find the best block to continue the chain with, which is perfectly
reasonable here, and find "b1" let's say. Laying out successors gets us
to:
a1, a2, done; b1, c1;
At this point, we will refuse to lay out the successor to c1 (f1)
because there are still un-placed predecessors of f1 and we want to try
to preserve the CFG structure. So we go get the next best block, d1.
... wait for it ...
Except that the next best block *isn't* d1. It is b2! d1 is waaay down
inside these conditionals. It is much less important than b2. Except
that this is exactly what we didn't want. If we keep going we get the
entire set of the rest of the CFG *interleaved*!!!
a1, a2, done; b1, c1; b2, c2; d1, f1; d2, f2;
So we clearly need a better strategy here. =] My current favorite
strategy is to actually try to place the block whose predecessor is
closest. This very simply ensures that we unwind these kinds of CFGs the
way that is natural and fitting, and should minimize the number of cache
lines instructions are spread across.
It also happens to be *dead simple*. It's like the datastructure was
specifically set up for this use case or something. We only push blocks
onto the work list when the last predecessor for them is placed into the
chain. So the back of the worklist *is* the nearest next block.
Unfortunately, a change like this is going to cause *soooo* many
benchmarks to swing wildly. So for now I'm adding this under a flag so
that we and others can validate that this is fixing the problems
described, that it seems possible to enable, and hopefully that it fixes
more of our problems long term.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231238
91177308-0d34-0410-b5e6-
96231b3b80d8
Vasileios Kalintiris [Wed, 4 Mar 2015 12:10:18 +0000 (12:10 +0000)]
[mips] Specify the correct value type when combining a CMovFP node.
This commit fixes a bug introduced in r230956 where we were creating
CMovFP_{T,F} nodes with multiple return value types (one for each operand).
With this change the return value type of the new node is the same as the
value type of the True/False operands of the original node.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231237
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Wed, 4 Mar 2015 11:05:34 +0000 (11:05 +0000)]
Add a flag to experiment with outlining optional branches.
In a CFG with the edges A->B->C and A->C, B is an optional branch.
LLVM's default behavior is to lay the blocks out naturally, i.e. A, B,
C, in order to improve code locality and fallthroughs. However, if a
function contains many of those optional branches only a few of which
are taken, this leads to a lot of unnecessary icache misses. Moving B
out of line can work around this.
Review: http://reviews.llvm.org/D7719
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231230
91177308-0d34-0410-b5e6-
96231b3b80d8
Kristof Beyls [Wed, 4 Mar 2015 09:12:08 +0000 (09:12 +0000)]
Fix PR22408 - LLVM producing AArch64 TLS relocations that GNU linkers cannot handle yet.
As is described at http://llvm.org/bugs/show_bug.cgi?id=22408, the GNU linkers
ld.bfd and ld.gold currently only support a subset of the whole range of AArch64
ELF TLS relocations. Furthermore, they assume that some of the code sequences to
access thread-local variables are produced in a very specific sequence.
When the sequence is not as the linker expects, it can silently mis-relaxe/mis-optimize
the instructions.
Even if that wouldn't be the case, it's good to produce the exact sequence,
as that ensures that linkers can perform optimizing relaxations.
This patch:
* implements support for 16MiB TLS area size instead of 4GiB TLS area size. Ideally clang
would grow an -mtls-size option to allow support for both, but that's not part of this patch.
* by default doesn't produce local dynamic access patterns, as even modern ld.bfd and ld.gold
linkers do not support the associated relocations. An option (-aarch64-elf-ldtls-generation)
is added to enable generation of local dynamic code sequence, but is off by default.
* makes sure that the exact expected code sequence for local dynamic and general dynamic
accesses is produced, by making use of a new pseudo instruction. The patch also removes
two (AArch64ISD::TLSDESC_BLR, AArch64ISD::TLSDESC_CALL) pre-existing AArch64-specific pseudo
SDNode instructions that are superseded by the new one (TLSDESC_CALLSEQ).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231227
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 4 Mar 2015 09:04:54 +0000 (09:04 +0000)]
[Tablegen] Use correct result number variables with the pattern nodes they go with when handling SDTCisSameAs. No functional change as they are always both 0 unless you try to define a multi result type profile that uses SDTCisSame on one of the other results.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231226
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 4 Mar 2015 07:57:45 +0000 (07:57 +0000)]
Explicitly default DenseMapTest::CtorTest::operator=
Using the implicit default copy assignment operator in the presence of a
user-declared copy ctor is deprecated in C++11.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231225
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 4 Mar 2015 07:51:50 +0000 (07:51 +0000)]
Remove explicit RNSuccIterator copy assignment in favor of implicit default
Asserting that the source and destination iterators are from the same
region is unnecessary - there's no reason to disallow reassignment from
any regions, so long as they aren't compared.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231224
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 4 Mar 2015 07:35:04 +0000 (07:35 +0000)]
use = default instead of {}
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231223
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 4 Mar 2015 07:35:02 +0000 (07:35 +0000)]
Make format_object_base explicitly copyable, so format_objects can be copied without relying on the implicit copy ctor
Use of the implicit copy ctor is deprecated in C++11 in the presence of
a user declared dtor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231222
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 4 Mar 2015 07:29:01 +0000 (07:29 +0000)]
Devirtualize ~parser<T> by making it protected in base classes and making derived classes final
These objects are never owned/destroyed polymorphically, so there's no
need for a virtual dtor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231221
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 4 Mar 2015 07:28:59 +0000 (07:28 +0000)]
Avoid copying parser objects
Use of their copy members is deprecated since they have a user-declared
dtor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231220
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Kuperstein [Wed, 4 Mar 2015 07:27:39 +0000 (07:27 +0000)]
[DAGCombine] Fix a bug in a BUILD_VECTOR combine
When trying to convert a BUILD_VECTOR into a shuffle, we try to split a single source vector that is twice as wide as the destination vector.
We can not do this when we also need the zero vector to create a blend.
This fixes PR22774.
Differential Revision: http://reviews.llvm.org/D8040
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231219
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 4 Mar 2015 07:09:53 +0000 (07:09 +0000)]
Make OptionValue explicitly copyable
Since OptionValue (& its base classes) have user-declared dtors, use of
the implicit copy ctor/assignment operator is deprecated in C++11.
Provide them explicitly (defaulted) to avoid depending on this
deprecated feature.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231218
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 4 Mar 2015 06:57:14 +0000 (06:57 +0000)]
Devirtualize OptionValue::~OptionValue in favor of protected in the base, with final derived classes
These objects are never polymorphically owned, so there's no need for
virtual dtors - just make the dtor protected in the base classes, and
make the derived classes final.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231217
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Wed, 4 Mar 2015 06:49:39 +0000 (06:49 +0000)]
[MC][Target] Implement support for R_X86_64_SIZE{32,64}.
Differential Revision: D7990
Reviewed by: rafael, majnemer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231216
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Wed, 4 Mar 2015 06:09:53 +0000 (06:09 +0000)]
[llvm-pdbdump] Display full enum definitions.
This will now display enum definitions both at the global
scope as well as nested inside of classes. Additionally,
it will no longer display enums at the global scope if the
enum is nested. Instead, it will omit the definition of
the enum globally and instead emit it in the corresponding
class definition.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231215
91177308-0d34-0410-b5e6-
96231b3b80d8
Chaoren Lin [Wed, 4 Mar 2015 06:05:37 +0000 (06:05 +0000)]
Revert "[ADT] fail-fast iterators for DenseMap"
This reverts commit
4b7263d855006988854036b4a4891fcf19aebe65.
r231125 http://reviews.llvm.org/D7931
This was causing many LLDB tests to fail on OS X, Linux, and FreeBSD.
https://bpaste.net/show/
6a23e1f53623
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231214
91177308-0d34-0410-b5e6-
96231b3b80d8
Frederic Riss [Wed, 4 Mar 2015 02:30:17 +0000 (02:30 +0000)]
Move emitDIE and emitAbbrevs to AsmPrinter. NFC.
(They are called emitDwarfDIE and emitDwarfAbbrevs in their new home)
llvm-dsymutil wants to reuse that code, but it doesn't have a DwarfUnit or
a DwarfDebug object to call those. It has access to an AsmPrinter though.
Having emitDIE in the AsmPrinter also removes the DwarfFile dependency
on DwarfDebug, and thus the patch drops that field.
Differential Revision: http://reviews.llvm.org/D8024
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231210
91177308-0d34-0410-b5e6-
96231b3b80d8
Frederic Riss [Wed, 4 Mar 2015 02:30:08 +0000 (02:30 +0000)]
Constify AsmPrinter passed to DIE methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231209
91177308-0d34-0410-b5e6-
96231b3b80d8
Filipe Cabecinhas [Wed, 4 Mar 2015 02:09:40 +0000 (02:09 +0000)]
Fix the test for r231201. We don't crash anymore.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231207
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 4 Mar 2015 02:07:51 +0000 (02:07 +0000)]
Workaround MSVC not providing implicit move members
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231204
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Wed, 4 Mar 2015 02:05:06 +0000 (02:05 +0000)]
Object: Add range iterators to Archive symbols
Also define operator* for symbol iterator just like Archive children iterator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231203
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Wed, 4 Mar 2015 01:48:39 +0000 (01:48 +0000)]
Use report_fatal_error instead of unreachable for -fast-isel-abort
Suggestion by Andrea Di Biagio
From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231201
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 4 Mar 2015 01:41:01 +0000 (01:41 +0000)]
unique_ptrify ValID::ConstantStructElts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231200
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 4 Mar 2015 01:40:07 +0000 (01:40 +0000)]
LLParser: Avoid copying ValIDs, the copy ctor is deprecated in C++11 due to the presence of a user-declared dtor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231199
91177308-0d34-0410-b5e6-
96231b3b80d8