Dimitry Andric [Tue, 13 Feb 2018 17:43:24 +0000 (17:43 +0000)]
Make the ctype_byname::widen test cases pass on FreeBSD.
llvm-svn: 325028
Dimitry Andric [Tue, 13 Feb 2018 17:40:59 +0000 (17:40 +0000)]
Put type attributes after class keyword
Summary:
Compiling `<functional>` in C++17 or higher mode results in:
```
functional:2500:1: warning: attribute '__visibility__' is ignored, place it after "class" to apply attribute to type declaration [-Wignored-attributes]
_LIBCPP_TYPE_VIS
^
__config:701:46: note: expanded from macro '_LIBCPP_TYPE_VIS'
# define _LIBCPP_TYPE_VIS __attribute__ ((__visibility__("default")))
^
1 warning generated.
```
Fix it by putting the attribute after the `class` keyword.
Reviewers: EricWF, mclow.lists
Reviewed By: EricWF
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D43209
llvm-svn: 325027
Sam Clegg [Tue, 13 Feb 2018 17:32:31 +0000 (17:32 +0000)]
Check that Symbol types are trivially destructible
This adds an extra level of static safety to our use of placement
new to allocate Symbol types. It prevents the accidental addition
on a non-trivially-destructible member that could allocate and
leak memory.
From the spec: Storage occupied by trivially destructible objects
may be reused without calling the destructor.
Differential Revision: https://reviews.llvm.org/D43244
llvm-svn: 325025
Ilya Biryukov [Tue, 13 Feb 2018 17:15:06 +0000 (17:15 +0000)]
[clangd] Log if CWD could not be changed. NFC.
llvm-svn: 325024
Erik Pilkington [Tue, 13 Feb 2018 17:09:07 +0000 (17:09 +0000)]
[demangler] Support for inheriting constructors.
Fixes PR33223.
llvm-svn: 325023
Erik Pilkington [Tue, 13 Feb 2018 17:09:03 +0000 (17:09 +0000)]
[demangler] Rewrite parse_nested_name in the new style.
llvm-svn: 325022
Ilya Biryukov [Tue, 13 Feb 2018 17:08:13 +0000 (17:08 +0000)]
[clangd] Remove the RealFS layer from test VFS. NFC.
It was required before because preambles could only be created on
disk. All tests use in-memory preambles now.
llvm-svn: 325021
Kostya Kortchinsky [Tue, 13 Feb 2018 17:05:54 +0000 (17:05 +0000)]
[sanitizer] Implement GetRSS on Windows
Summary:
Pretty straightforward, returning the `WorkingSetSize` of a
`PROCESS_MEMORY_COUNTERS` structure. AFAIU, `GetProcessMemoryInfo` is in
`kernel32.lib` for Windows 7 and above. Support for earlier Windows versions
would require `psapi.lib`, but I don't think those are supported by ASan?
Reviewers: alekseyshl, rnk, vitalybuka
Reviewed By: vitalybuka
Subscribers: vitalybuka, kubamracek, delcypher, llvm-commits, #sanitizers
Differential Revision: https://reviews.llvm.org/D42822
llvm-svn: 325020
Craig Topper [Tue, 13 Feb 2018 16:25:27 +0000 (16:25 +0000)]
[DAGCombiner] Add one use check to fold (not (and x, y)) -> (or (not x), (not y))
Summary:
If the and has an additional use we shouldn't invert it. That creates an additional instruction.
While there add a one use check to the transform above that looked similar.
Reviewers: spatel, RKSimon
Reviewed By: RKSimon
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D43225
llvm-svn: 325019
Craig Topper [Tue, 13 Feb 2018 16:25:25 +0000 (16:25 +0000)]
[X86] Add combine to shrink 64-bit ands when one input is an any_extend and the other input guarantees upper 32 bits are 0.
Summary: This gets the shift case from PR35792.
Reviewers: spatel, RKSimon
Reviewed By: RKSimon
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D43222
llvm-svn: 325018
Rafael Espindola [Tue, 13 Feb 2018 16:06:11 +0000 (16:06 +0000)]
Use RelType in a few more places. NFC.
llvm-svn: 325017
Rafael Espindola [Tue, 13 Feb 2018 16:03:52 +0000 (16:03 +0000)]
Add a simpler version of addReloc. NFC.
Extracted from a patch by Alexander Richardson!
llvm-svn: 325016
Julie Hockett [Tue, 13 Feb 2018 15:40:40 +0000 (15:40 +0000)]
[clang-tidy] Update fuchsia-multiple-inheritance to not fail
Updating the fuchsia-multiple-inheritance to gracefully handle unknown
record types (e.g. templatized classes) by simply continuing, rather
than asserting and failing.
Fixes PR36052.
Differential Revision: https://reviews.llvm.org/D43223
llvm-svn: 325015
Krzysztof Parzyszek [Tue, 13 Feb 2018 15:35:07 +0000 (15:35 +0000)]
[Hexagon] Simplify some code, NFC
llvm-svn: 325014
Krzysztof Parzyszek [Tue, 13 Feb 2018 15:34:29 +0000 (15:34 +0000)]
[Hexagon] Remove unnecessary check
llvm-svn: 325013
Sjoerd Meijer [Tue, 13 Feb 2018 15:34:09 +0000 (15:34 +0000)]
[ARM] Allow half types in ConstantPool
Change ARMConstantIslandPass to:
- accept f16 literals as litpool entries,
- if the litpool needs to be inserted in the middle of a big block, then we
need to 4-byte align the next instruction in ARM mode.
Differential Revision: https://reviews.llvm.org/D42784
llvm-svn: 325012
Andrew V. Tischenko [Tue, 13 Feb 2018 15:20:29 +0000 (15:20 +0000)]
An updated test to show the current warnings produced for implicit conversions from 'double' to 'float'.
llvm-svn: 325011
Sanjay Patel [Tue, 13 Feb 2018 14:55:07 +0000 (14:55 +0000)]
[DAG] fix type of undef returned by getNode()
The bug has been lying dormant, but apparently was never exposed, until
after rL324941 because we didn't return the correct result
for shifts with undef operands.
llvm-svn: 325010
Florian Hahn [Tue, 13 Feb 2018 14:48:39 +0000 (14:48 +0000)]
Revert r325001: [CallSiteSplitting] Support splitting of blocks with instrs before call.
Due to memsan not being happy with the array of ValueToValue maps.
llvm-svn: 325009
Ivan A. Kosarev [Tue, 13 Feb 2018 14:44:25 +0000 (14:44 +0000)]
[IR] Fix creating mutable versions of TBAA access tags
Due to a typo in D41565, mutable TBAA tags created with
createMutableTBAAAccessTag() lose their base types. This patch
fixes that typo and updates tests respectively.
Differential Revision: https://reviews.llvm.org/D42364
llvm-svn: 325008
Florian Hahn [Tue, 13 Feb 2018 14:17:00 +0000 (14:17 +0000)]
[CallSiteSplitting] Clear ValueToValue maps.
llvm-svn: 325006
Florian Hahn [Tue, 13 Feb 2018 13:51:51 +0000 (13:51 +0000)]
[CallSiteSplitting] Dereference pointer earlier.
This should make the sanitizers happy.
llvm-svn: 325004
Simon Pilgrim [Tue, 13 Feb 2018 13:16:26 +0000 (13:16 +0000)]
[InstCombine] Simplify getLogBase2 case for scalar/splats. NFCI.
llvm-svn: 325003
Florian Hahn [Tue, 13 Feb 2018 12:22:32 +0000 (12:22 +0000)]
[CallSiteSplitting] Fix new-pm test, as TargetIRAnalysis is run earlier now
llvm-svn: 325002
Florian Hahn [Tue, 13 Feb 2018 12:00:48 +0000 (12:00 +0000)]
[CallSiteSplitting] Support splitting of blocks with instrs before call.
For basic blocks with instructions between the beginning of the block
and a call we have to duplicate the instructions before the call in all
split blocks and add PHI nodes for uses of the duplicated instructions
after the call.
Currently, the threshold for the number of instructions before a call
is quite low, to keep the impact on binary size low.
Reviewers: junbuml, mcrosier, davidxl, davide
Reviewed By: junbuml
Differential Revision: https://reviews.llvm.org/D41860
llvm-svn: 325001
Andre Vieira [Tue, 13 Feb 2018 11:46:38 +0000 (11:46 +0000)]
[ARM] Don't print "Requires NEON" error message for M-profile
Differential Revision: https://reviews.llvm.org/D43125
llvm-svn: 325000
Alexander Ivchenko [Tue, 13 Feb 2018 10:58:19 +0000 (10:58 +0000)]
[X86] Rename function main->foo in CodeGen/X86/pr35316.ll. NFC
Using "void main" might be confusing for some cases.
llvm-svn: 324997
Sjoerd Meijer [Tue, 13 Feb 2018 10:29:03 +0000 (10:29 +0000)]
[Thumb] Handle addressing mode AddrMode5FP16
This addressing mode wasn't checked, so we were running in an assert.
Differential Revision: https://reviews.llvm.org/D43179
llvm-svn: 324996
Krasimir Georgiev [Tue, 13 Feb 2018 10:20:39 +0000 (10:20 +0000)]
[clang-format] Support text proto extensions
Summary:
This adds support for text proto extensions, like:
```
msg {
[type.type/ext] {
key: value
}
}
```
Reviewers: djasper
Reviewed By: djasper
Subscribers: klimek, cfe-commits
Differential Revision: https://reviews.llvm.org/D43180
llvm-svn: 324995
Florian Hahn [Tue, 13 Feb 2018 10:02:52 +0000 (10:02 +0000)]
[LoopInterchange] Check number of latch successors before accessing them.
In cases where the OuterMostLoopLatchBI only has a single successor,
accessing the second successor will fail.
This fixes a failure when building the test-suite with loop-interchange
enabled.
Reviewers: mcrosier, karthikthecool, davide
Reviewed by: karthikthecool
Differential Revision: https://reviews.llvm.org/D42906
llvm-svn: 324994
Haojian Wu [Tue, 13 Feb 2018 09:56:45 +0000 (09:56 +0000)]
[clangd] Remove an already-done FIXME, NFC
llvm-svn: 324993
Haojian Wu [Tue, 13 Feb 2018 09:53:50 +0000 (09:53 +0000)]
[clangd] SymbolLocation only covers symbol name.
Summary:
* Change the offset range to half-open, [start, end).
* Fix a few fixmes.
Reviewers: sammccall
Subscribers: klimek, ilya-biryukov, jkorous-apple, ioeric, cfe-commits
Differential Revision: https://reviews.llvm.org/D43182
llvm-svn: 324992
Hans Wennborg [Tue, 13 Feb 2018 09:19:43 +0000 (09:19 +0000)]
Fix for PR32992. Static const classes not exported.
Patch by zahiraam!
Differential Revision: https://reviews.llvm.org/D42968
llvm-svn: 324991
Sam McCall [Tue, 13 Feb 2018 08:59:23 +0000 (08:59 +0000)]
[clangd] Stop exposing Futures from ClangdServer operations.
Summary:
LSP has asynchronous semantics, being able to block on an async operation
completing is unneccesary and leads to tighter coupling with the threading.
In practice only tests depend on this, so we add a general-purpose "block until
idle" function to the scheduler which will work for all operations.
To get this working, fix a latent condition-variable bug in ASTWorker, and make
AsyncTaskRunner const-correct.
Reviewers: ilya-biryukov
Subscribers: klimek, jkorous-apple, ioeric, cfe-commits
Differential Revision: https://reviews.llvm.org/D43127
llvm-svn: 324990
Bruce Mitchener [Tue, 13 Feb 2018 08:12:00 +0000 (08:12 +0000)]
Fix typos.
Reviewers: mclow.lists, EricWF
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D43224
llvm-svn: 324989
Sander de Smalen [Tue, 13 Feb 2018 07:49:34 +0000 (07:49 +0000)]
[DebugInfo] Avoid name conflict of generated VLA expression variable.
Summary:
This patch also adds the 'DW_AT_artificial' flag to the generated variable.
Addresses the issues mentioned in http://llvm.org/PR30553.
Reviewers: CarlosAlbertoEnciso, probinson, aprantl
Reviewed By: aprantl
Subscribers: JDevlieghere, cfe-commits
Differential Revision: https://reviews.llvm.org/D43189
llvm-svn: 324988
Craig Topper [Tue, 13 Feb 2018 07:28:28 +0000 (07:28 +0000)]
[X86] Add a test case showing blcic matching being broken by an and mask applied to the input. NFC
Playing around with other BMI/TBM instructions after PR35792 and saw this.
llvm-svn: 324987
Craig Topper [Tue, 13 Feb 2018 05:33:39 +0000 (05:33 +0000)]
[X86] Add a blsr test case with a shift from PR35792. NFC
The blsr pattern here is missed because the add is shrunk, but the and is not. This leaves an any_extend between them.
llvm-svn: 324986
Craig Topper [Tue, 13 Feb 2018 04:19:26 +0000 (04:19 +0000)]
[X86] Teach EVEX->VEX pass to turn VRNDSCALE into VROUND when bits 7:4 of the immediate are 0 and the regular EVEX->VEX checks pass.
Bits 7:4 control the scale part of the operation. If the scale is 0 the behavior is equivalent to VROUND.
Fixes PR36246
llvm-svn: 324985
Craig Topper [Tue, 13 Feb 2018 04:19:23 +0000 (04:19 +0000)]
[X86] Autogenerate complete checks. NFC
llvm-svn: 324984
Vedant Kumar [Tue, 13 Feb 2018 03:34:23 +0000 (03:34 +0000)]
[Utils] Salvage debug info from all no-op casts
We already try to salvage debug values from no-op bitcasts and inttoptr
instructions: we should handle ptrtoint instructions as well.
This saves an additional 24,444 debug values in a stage2 build of clang,
and (according to llvm-dwarfdump --statistics) provides an additional
289 unique source variables.
llvm-svn: 324982
David Blaikie [Tue, 13 Feb 2018 01:52:30 +0000 (01:52 +0000)]
Revert "Rewrite the cached map used for locating the most precise DIE among inlined subroutines for a given address."
Seeing some inlining missing in internal uses of symbolizer. I'll work
on a reproduction, tests, improvements & recommit as soon as possible.
(Chandler would like it to be known that this improvement did make
check-llvm 4x faster... - so there's certainly some fairly good
motivation to push on fixing/figuring this out & getting it back in)
This reverts commit r321345.
llvm-svn: 324981
Craig Topper [Tue, 13 Feb 2018 01:49:58 +0000 (01:49 +0000)]
[X86] Use getTypeAction in most places that were checking ExperimentalVectorWideningLegalization.
This will allow more flexibility in what types we legalize via widening or not. This should help with a couple lines in D41062.
llvm-svn: 324980
Craig Topper [Tue, 13 Feb 2018 01:36:27 +0000 (01:36 +0000)]
[X86] Remove duplicate CHECK-LABEL line the update script didn't delete when I converted the test.
llvm-svn: 324979
Reid Kleckner [Tue, 13 Feb 2018 01:19:56 +0000 (01:19 +0000)]
Add REQUIRES: zlib to gdb-index.s test
llvm-svn: 324978
Adrian Prantl [Tue, 13 Feb 2018 01:17:35 +0000 (01:17 +0000)]
Revert "Document the shortcomings of DwarfExpression::addMachineReg()."
This reverts commit r324972. This commit broke a bot, so perhaps it is
testable after all?
llvm-svn: 324977
Vedant Kumar [Tue, 13 Feb 2018 01:09:52 +0000 (01:09 +0000)]
[Utils] Salvage debug info of DCE'ed mul/sdiv/srem instructions
Here are the number of additional debug values salvaged in a stage2
build of clang:
63 SALVAGE: MUL
1250 SALVAGE: SDIV
(No values were salvaged from `srem` instructions in this experiment,
but it's a simple case to handle so we might as well.)
llvm-svn: 324976
Vedant Kumar [Tue, 13 Feb 2018 01:09:49 +0000 (01:09 +0000)]
[Utils] Salvage debug info of DCE'ed shl/lhsr/ashr instructions
Here are the number of additional debug values salvaged in a stage2
build of clang:
1912 SALVAGE: ASHR
405 SALVAGE: LSHR
249 SALVAGE: SHL
llvm-svn: 324975
Vedant Kumar [Tue, 13 Feb 2018 01:09:47 +0000 (01:09 +0000)]
[Utils] Salvage the debug info of DCE'ed 'sub' instructions
This salvages 14 debug values in a stage2 build of clang.
llvm-svn: 324974
Vedant Kumar [Tue, 13 Feb 2018 01:09:46 +0000 (01:09 +0000)]
[Utils] Salvage the debug info of DCE'ed 'xor' instructions
This salvages 259 debug values in a stage2 build of clang.
Differential Revision: https://reviews.llvm.org/D43207
llvm-svn: 324973
Adrian Prantl [Tue, 13 Feb 2018 01:02:56 +0000 (01:02 +0000)]
Document the shortcomings of DwarfExpression::addMachineReg().
Also make a drive-by-fix of a bug in the subregister scan code that
only triggers with an incomplete or otherwise very irregular machine
description.
rdar://problem/
37404493
llvm-svn: 324972
Volkan Keles [Tue, 13 Feb 2018 00:47:46 +0000 (00:47 +0000)]
GlobalISel: IRTranslate llvm.fmuladd.* intrinsic
Reviewers: qcolombet, ab, dsanders, aditya_nandakumar, bogner
Reviewed By: qcolombet
Subscribers: rovka, kristof.beyls, javed.absar, llvm-commits
Differential Revision: https://reviews.llvm.org/D43090
llvm-svn: 324971
Erik Pilkington [Tue, 13 Feb 2018 00:15:56 +0000 (00:15 +0000)]
[demangler] Support for initializer lists and designated initializers.
llvm-svn: 324970
Erik Pilkington [Tue, 13 Feb 2018 00:15:53 +0000 (00:15 +0000)]
[demangler] Support for dependent elaborate type specifiers.
llvm-svn: 324969
Erik Pilkington [Tue, 13 Feb 2018 00:15:46 +0000 (00:15 +0000)]
[demangler] All <qualifiers> on one type should share one entry in the substitution table.
Previously, both <extended-qualifier>s and <CV-qualifiers> got their own entries.
llvm-svn: 324968
Sanjay Patel [Mon, 12 Feb 2018 23:51:23 +0000 (23:51 +0000)]
[InstSimplify] allow exp/log simplifications with only 'reassoc' FMF
These intrinsic folds were added with D41381, but only allowed with isFast().
That's more than necessary because FMF has 'reassoc' to apply to these
kinds of folds after D39304, and that's all we need in these cases.
Differential Revision: https://reviews.llvm.org/D43160
llvm-svn: 324967
Sam Clegg [Mon, 12 Feb 2018 23:47:38 +0000 (23:47 +0000)]
[WebAssembly] Update ADT/TripleTest.cpp now that default file format has changed
Differential Revision: https://reviews.llvm.org/D43212
llvm-svn: 324966
Bruno Cardoso Lopes [Mon, 12 Feb 2018 23:43:21 +0000 (23:43 +0000)]
[Modules] Fix remapping from Foo.Private to Foo_Private to happen before typo correction
Typo correction is the last step here, remapping should come first.
rdar://problem/
37351970
llvm-svn: 324965
Craig Topper [Mon, 12 Feb 2018 23:43:10 +0000 (23:43 +0000)]
[X86] Auto generate complete checks. NFC
llvm-svn: 324964
Sanjay Patel [Mon, 12 Feb 2018 23:39:10 +0000 (23:39 +0000)]
[InstSimplify] change tests to 'fast' to reflect current folds
The diff to use 'reassoc' is part of D43160; it should not have
been made with rL324961. Reverting that part here, so we'll
see the intended diff with the code change.
llvm-svn: 324963
Jakub Kuderski [Mon, 12 Feb 2018 23:37:27 +0000 (23:37 +0000)]
[Dominators] Always recalculate postdominators when update yields different roots
Summary:
This patch makes postdominators always recalculate the tree when an update causes to change the tree roots.
As @dmgreen noticed in [[ https://reviews.llvm.org/D41298 | D41298 ]], the previous implementation was not conservative enough and it was possible to end up with a PostDomTree that was different than a freshly computed one.
The patch also compares postdominators with a freshly computed tree at the end of full verification to make sure we don't hit similar issues in the future.
This should (ideally) be also backported to 6.0 before the release, although I don't have any reports of this causing an observable error. It should be safe to do it even if it's late in the release, as the change only makes the current behavior more conservative.
Reviewers: dmgreen, dberlin, davide, brzycki, grosser
Reviewed By: brzycki, grosser
Subscribers: llvm-commits, dmgreen
Differential Revision: https://reviews.llvm.org/D43140
llvm-svn: 324962
Sanjay Patel [Mon, 12 Feb 2018 23:18:11 +0000 (23:18 +0000)]
[InstSimplify] consolidate tests for log-exp inverse folds
Some tests didn't add much value because we already show stronger
constraints for the folds in other tests, so the weaker versions
were deleted.
Moved the remaining tests into 1 file because the folds are
very similar and handled from 1 place in the code.
llvm-svn: 324961
Daniel Neilson [Mon, 12 Feb 2018 23:06:55 +0000 (23:06 +0000)]
[InstCombine] Simplify MemTransferInst's source and dest alignments separately
Summary:
This change is part of step five in the series of changes to remove alignment argument from
memcpy/memmove/memset in favour of alignment attributes. In particular, this changes the
InstCombine pass to cease using the deprecated MemoryIntrinsic::getAlignment() method, and
instead we use the separate getSourceAlignment and getDestAlignment APIs to simplify
the source and destination alignment attributes separately.
Steps:
Step 1) Remove alignment parameter and create alignment parameter attributes for
memcpy/memmove/memset. ( rL322965, rC322964, rL322963 )
Step 2) Expand the IRBuilder API to allow creation of memcpy/memmove with differing
source and dest alignments. ( rL323597 )
Step 3) Update Clang to use the new IRBuilder API. ( rC323617 )
Step 4) Update Polly to use the new IRBuilder API. ( rL323618 )
Step 5) Update LLVM passes that create memcpy/memmove calls to use the new IRBuilder API,
and those that use use MemIntrinsicInst::[get|set]Alignment() to use [get|set]DestAlignment()
and [get|set]SourceAlignment() instead. ( rL323886, rL323891, rL324148, rL324273, rL324278,
rL324384, rL324395, rL324402, rL324626, rL324642, rL324653, rL324654, rL324773, rL324774,
rL324781, rL324784, rL324955 )
Step 6) Remove the single-alignment IRBuilder API for memcpy/memmove, and the
MemIntrinsicInst::[get|set]Alignment() methods.
Reference
http://lists.llvm.org/pipermail/llvm-dev/2015-August/089384.html
http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-
20151109/312083.html
Reviewers: majnemer, bollu, efriedma
Reviewed By: efriedma
Subscribers: efriedma, llvm-commits
Differential Revision: https://reviews.llvm.org/D42871
llvm-svn: 324960
Stephan T. Lavavej [Mon, 12 Feb 2018 22:54:35 +0000 (22:54 +0000)]
[libcxx] [test] Strip trailing whitespace, NFC.
llvm-svn: 324959
Adam Nemet [Mon, 12 Feb 2018 22:42:13 +0000 (22:42 +0000)]
Revert "[LSR] Avoid UB overflow when examining reuse opportunities"
This reverts commit r324943.
Breaking bots, reverting for Gerolf.
llvm-svn: 324958
Sam Clegg [Mon, 12 Feb 2018 22:41:29 +0000 (22:41 +0000)]
[WebAssembly] MC: Remove redundant struct types
Differential Revision: https://reviews.llvm.org/D43210
llvm-svn: 324957
George Karpenkov [Mon, 12 Feb 2018 22:39:57 +0000 (22:39 +0000)]
[analyzer] Exploration strategy prioritizing unexplored coverage first
See reviews.llvm.org/M1 for evaluation, and
lists.llvm.org/pipermail/cfe-dev/2018-January/056718.html for
discussion.
Differential Revision: https://reviews.llvm.org/D42775
llvm-svn: 324956
Daniel Neilson [Mon, 12 Feb 2018 22:39:47 +0000 (22:39 +0000)]
[SafeStack] Use updated CreateMemCpy API to set more accurate source and destination alignments.
Summary:
This change is part of step five in the series of changes to remove alignment argument from
memcpy/memmove/memset in favour of alignment attributes. In particular, this changes the
creation of memcpys in the SafeStack pass to set the alignment of the destination object to
its stack alignment while separately setting the source byval arguments alignment to its
alignment.
Steps:
Step 1) Remove alignment parameter and create alignment parameter attributes for
memcpy/memmove/memset. ( rL322965, rC322964, rL322963 )
Step 2) Expand the IRBuilder API to allow creation of memcpy/memmove with differing
source and dest alignments. ( rL323597 )
Step 3) Update Clang to use the new IRBuilder API. ( rC323617 )
Step 4) Update Polly to use the new IRBuilder API. ( rL323618 )
Step 5) Update LLVM passes that create memcpy/memmove calls to use the new IRBuilder API,
and those that use use MemIntrinsicInst::[get|set]Alignment() to use [get|set]DestAlignment()
and [get|set]SourceAlignment() instead. (rL323886, rL323891, rL324148, rL324273, rL324278,
rL324384, rL324395, rL324402, rL324626, rL324642, rL324653, rL324654, rL324773, rL324774,
rL324781, rL324784 )
Step 6) Remove the single-alignment IRBuilder API for memcpy/memmove, and the
MemIntrinsicInst::[get|set]Alignment() methods.
Reference
http://lists.llvm.org/pipermail/llvm-dev/2015-August/089384.html
http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-
20151109/312083.html
Reviewers: eugenis, bollu
Reviewed By: eugenis
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D42710
llvm-svn: 324955
Craig Topper [Mon, 12 Feb 2018 22:38:52 +0000 (22:38 +0000)]
[X86] Reverse the operand order of the implementation of the kunpack builtins.
The second operand needs to be in the lower bits of the concatenation. This matches llvm 5.0, gcc, and icc behavior.
Fixes PR36360.
llvm-svn: 324954
Craig Topper [Mon, 12 Feb 2018 22:38:34 +0000 (22:38 +0000)]
[X86] Reverse the operand order of the autoupgrade of the kunpack builtins.
The second operand needs to be in the lower bits of the concatenation. This matches llvm 5.0, gcc, and icc behavior.
Fixes PR36360.
llvm-svn: 324953
Artem Dergachev [Mon, 12 Feb 2018 22:36:36 +0000 (22:36 +0000)]
[CFG] Provide construction contexts for return value constructors.
When the current function returns a C++ object by value, CFG elements for
constructors that construct the return values can now be queried to discover
that they're indeed participating in construction of the respective return value
at the respective return statement.
Differential Revision: https://reviews.llvm.org/D42875
llvm-svn: 324952
Rui Ueyama [Mon, 12 Feb 2018 22:32:57 +0000 (22:32 +0000)]
Do not use Decompressor::isCompressedELFSection. NFC.
In order to identify a compressed section, we check if a section name
starts with ".zdebug" or the section has SHF_COMPRESSED flag. We already
use the knowledge in this function. So hiding that check in
isCompressedELFSection doesn't make sense.
llvm-svn: 324951
Sam Clegg [Mon, 12 Feb 2018 22:29:51 +0000 (22:29 +0000)]
[WebAssembly] MC: Remove redundant `private` specifiers
This is inline with the other MCSection and MCSymbol subclasses
llvm-svn: 324950
Rui Ueyama [Mon, 12 Feb 2018 22:25:45 +0000 (22:25 +0000)]
Remove 'z' in .zdebug when decompressing a section.
When decompressing a compressed debug section, we drop SHF_COMPRESSED
flag but we didn't drop "z" in ".zdebug" section name. This patch does
that for consistency.
This change also fixes the issue that .zdebug_gnu_pubnames are not
dropped when we are creating a .gdb_index section.
llvm-svn: 324949
John Baldwin [Mon, 12 Feb 2018 22:22:01 +0000 (22:22 +0000)]
Look for 32-bit libraries in /usr/lib32 for MIPS O32 on FreeBSD.
Summary:
FreeBSD N64 MIPS systems can include 32-bit libraries for O32 in
/usr/lib32 similar to the 32-bit compatibility libraries provided
for FreeBSD/amd64 and FreeBSD/powerpc64.
Reviewers: dim
Reviewed By: dim
Differential Revision: https://reviews.llvm.org/D42972
llvm-svn: 324948
Sanjay Patel [Mon, 12 Feb 2018 22:19:24 +0000 (22:19 +0000)]
[x86] add select test to show there's no single right answer (PR28968); NFC
llvm-svn: 324947
George Karpenkov [Mon, 12 Feb 2018 22:13:01 +0000 (22:13 +0000)]
[analyzer] [tests] Fix a typo in analyzer testing script.
Incorrect option instance construction.
llvm-svn: 324946
Adrian Prantl [Mon, 12 Feb 2018 22:09:57 +0000 (22:09 +0000)]
Simplify switch statement (NFC)
llvm-svn: 324945
Rui Ueyama [Mon, 12 Feb 2018 21:56:14 +0000 (21:56 +0000)]
s/uncompress/decompress/g.
In lld, we use both "uncompress" and "decompress" which is confusing.
Since LLVM uses "decompress", we should use the same term.
llvm-svn: 324944
Gerolf Hoflehner [Mon, 12 Feb 2018 21:49:32 +0000 (21:49 +0000)]
[LSR] Avoid UB overflow when examining reuse opportunities
llvm-svn: 324943
Jacob Gravelle [Mon, 12 Feb 2018 21:41:12 +0000 (21:41 +0000)]
[WebAssembly] Fix casting MCSymbol to MCSymbolWasm on ELF
Summary:
wasm32-unknown-unknown-elf has MCSymbols that are not MCSymbolWasms, so
we need a non-asserting cast here.
Reviewers: dschuff, sunfish
Subscribers: jfb, sbc100, aheejin, llvm-commits
Differential Revision: https://reviews.llvm.org/D43205
llvm-svn: 324942
Sanjay Patel [Mon, 12 Feb 2018 21:37:27 +0000 (21:37 +0000)]
[DAG] make binops with undef operands consistent with IR
This started by noticing that scalar and vector types were producing different results with div ops in PR36305:
https://bugs.llvm.org/show_bug.cgi?id=36305
...but the problem is bigger. I couldn't keep it straight without a table, so I'm attaching that as a PDF to
the review. The x86 tests in undef-ops.ll correspond to that table.
Green means that instsimplify and the DAG agree on the result for all types.
Red means the DAG was returning undef when IR was not.
Yellow means the DAG was returning a non-undef result when IR returned undef.
This patch assumes that we're currently doing the right thing in IR.
Note: I couldn't find any problems with lowering vector constants as the code comments were warning,
but those comments were written long ago in rL36413 .
Differential Revision: https://reviews.llvm.org/D43141
llvm-svn: 324941
Abderrazek Zaafrani [Mon, 12 Feb 2018 21:26:06 +0000 (21:26 +0000)]
[AArch64] Fixes for ARMv8.2-A FP16 scalar intrinsic - clang portion
https://reviews.llvm.org/D42993
llvm-svn: 324940
Craig Topper [Mon, 12 Feb 2018 21:18:11 +0000 (21:18 +0000)]
[X86] Simplify X86DAGToDAGISel::matchBEXTRFromAnd by creating an X86ISD::BEXTR node and calling Select. Add isel patterns to recognize this node.
This removes a bunch of special case code for selecting the immediate and folding loads.
llvm-svn: 324939
Craig Topper [Mon, 12 Feb 2018 21:18:09 +0000 (21:18 +0000)]
[X86] Remove unused multiclass argument. NFC
llvm-svn: 324938
Martin Storsjo [Mon, 12 Feb 2018 21:14:21 +0000 (21:14 +0000)]
[GlobalMerge] Allow merging of dllexported variables
If merging them, the dllexport attribute needs to be brought along
to the new GlobalAlias.
Differential Revision: https://reviews.llvm.org/D43192
llvm-svn: 324937
Adrian Prantl [Mon, 12 Feb 2018 21:11:23 +0000 (21:11 +0000)]
Fix the syntax highlighting of strings in dwarfdump.
llvm-svn: 324936
Adrian Prantl [Mon, 12 Feb 2018 21:11:14 +0000 (21:11 +0000)]
Factor out common condition into an easier to understand helper function (NFC).
llvm-svn: 324935
Michael Kruse [Mon, 12 Feb 2018 21:09:40 +0000 (21:09 +0000)]
[ScopBuilder] scalar-indep: Fix mutually referencing PHIs.
Two or more PHIs mutually using each other directly or indirectly as
incoming value could cause that a PHI WRITE be added before the PHI READ
(i.e. it overwrites the current incoming value with the next incoming
value before it being read).
Fix by ensuring that the PHI WRITE and PHI READ are in the same statement.
This should fix the miscompile of SingleSource/Benchmark/Misc/whetstone
from the test-suite.
llvm-svn: 324934
Vedant Kumar [Mon, 12 Feb 2018 21:02:45 +0000 (21:02 +0000)]
Move the debuginfo-dce-or test into debuginfo-variables.ll, NFC
llvm-svn: 324933
Volodymyr Sapsai [Mon, 12 Feb 2018 20:43:31 +0000 (20:43 +0000)]
Revert "[ThinLTO] Add GraphTraits for FunctionSummaries"
It caused assertion failure
Assertion failed: (!DD.IsLambda && !MergeDD.IsLambda && "faked up lambda definition?"), function MergeDefinitionData, file /Users/buildslave/jenkins/workspace/clang-stage1-configure-RA/llvm/tools/clang/lib/Serialization/ASTReaderDecl.cpp, line 1675.
on the second stage build bots.
llvm-svn: 324932
Volodymyr Sapsai [Mon, 12 Feb 2018 20:42:18 +0000 (20:42 +0000)]
Revert "Follow on to rL324854 (Added tests)" as part of r324854 revert.
r324854 caused broken build on the second stage build bots.
llvm-svn: 324931
Jim Ingham [Mon, 12 Feb 2018 20:25:37 +0000 (20:25 +0000)]
Remove the pubnames support from the Xcode project.
llvm-svn: 324930
Scott Linder [Mon, 12 Feb 2018 19:47:05 +0000 (19:47 +0000)]
[DebugInfo] Update Checksum handling in CGDebugInfo
Update to match new DIFile API.
llvm-svn: 324929
Scott Linder [Mon, 12 Feb 2018 19:45:54 +0000 (19:45 +0000)]
[DebugInfo] Unify ChecksumKind and Checksum value in DIFile
Rather than encode the absence of a checksum with a Kind variant, instead put
both the kind and value in a struct and wrap it in an Optional.
Differential Revision: http://reviews.llvm.org/D43043
llvm-svn: 324928
Sanjay Patel [Mon, 12 Feb 2018 19:39:21 +0000 (19:39 +0000)]
[InstCombine] X / (X * Y) --> 1.0 / Y
This is similar to the instsimplify fold added with D42385
( rL323716 )
...but this can't be in instsimplify because we're creating/morphing
a different instruction.
llvm-svn: 324927
Sanjay Patel [Mon, 12 Feb 2018 19:23:39 +0000 (19:23 +0000)]
[InstCombine] add tests for missing fdiv fold; NFC
llvm-svn: 324926
Adrian McCarthy [Mon, 12 Feb 2018 19:19:04 +0000 (19:19 +0000)]
Remove dead code for handling DWARF pubnames
Summary:
LLDB doesn't use this code, the code has no tests, and the code does suspicious
things like hashing pointers to strings instead of the strings themselves.
Subscribers: sanjoy, mgorny, JDevlieghere
Differential Revision: https://reviews.llvm.org/D43202
llvm-svn: 324925
Sanjay Patel [Mon, 12 Feb 2018 19:14:01 +0000 (19:14 +0000)]
[InstCombine] regenerate checks; NFC
llvm-svn: 324924
Marshall Clow [Mon, 12 Feb 2018 19:13:24 +0000 (19:13 +0000)]
Implement LWG 2835 - fix <tgmath.h>
llvm-svn: 324923