Jonas Devlieghere [Thu, 17 Oct 2019 00:50:39 +0000 (00:50 +0000)]
[CMake] Make it possible to set the RPATH in add_lldb_exectable.
Make it possible to pass a build and install RPATH to
add_lldb_executable instead of having to call lldb_setup_rpaths after
the fact.
This fixes a real issue where setting an install RPATH with
lldb_setup_rpaths would only affect the symroot installation component.
Given that lldb_setup_rpaths sets a target property I would expect this
to be orthogonal to installation components. Regardless, it makes sense
to integrate this functionality in add_lldb_exectable.
llvm-svn: 375068
Daniel Sanders [Thu, 17 Oct 2019 00:37:04 +0000 (00:37 +0000)]
[gicombiner] Add the run-time rule disable option
Summary:
Each generated helper can be configured to generate an option that disables
rules in that helper. This can be used to bisect rulesets.
The disable bits are stored in a SparseVector as this is very cheap for the
common case where nothing is disabled. It gets more expensive the more rules
are disabled but you're generally doing that for debug purposes where
performance is less of a concern.
Depends on D68426
Reviewers: volkan, bogner
Reviewed By: volkan
Subscribers: hiraditya, Petar.Avramovic, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D68438
llvm-svn: 375067
Quentin Colombet [Thu, 17 Oct 2019 00:34:32 +0000 (00:34 +0000)]
[GISel][CombinerHelper] Add concat_vectors(build_vector, build_vector) => build_vector
Teach the combiner helper how to flatten concat_vectors of build_vectors
into a build_vector.
Add this combine as part of AArch64 pre-legalizer combiner.
Differential Revision: https://reviews.llvm.org/D69071
llvm-svn: 375066
Julian Lettner [Thu, 17 Oct 2019 00:29:59 +0000 (00:29 +0000)]
[lit] Improve lit.Run class
* Push timing of overall test time into run module
* Make lit.Run a proper class
* Add a few TODO comments
llvm-svn: 375065
Jonas Devlieghere [Thu, 17 Oct 2019 00:24:37 +0000 (00:24 +0000)]
[Reproducer] Set the working directory in the VFS
Now that the VFS knows how to deal with virtual working directories, we
can set the current working directory to the one we recorded during
reproducer capture. This ensures that relative paths are resolved
correctly during replay.
llvm-svn: 375064
Saar Raz [Thu, 17 Oct 2019 00:16:01 +0000 (00:16 +0000)]
[Concepts] ConceptSpecializationExprs mangling
Implement mangling for CSEs to match regular template-ids.
Reviewed as part of D41569 <https://reviews.llvm.org/D41569>.
Re-commit fixing failing test.
llvm-svn: 375063
Raphael Isemann [Thu, 17 Oct 2019 00:02:32 +0000 (00:02 +0000)]
Revert "make ConstString allocate memory in non-tiny chunks"
As discussed in https://reviews.llvm.org/D68549, the actual issue
here seems to be that the BumpPtrAllocator is growing far too slow
because of the 256 different StringPools used as the backend for ConstString.
At the same time the original patch made ConstString allocate memory in
256MiB slabs for the same reason, meaning that the RSS usage of LLDB increased
by a few hundred MiB for all users without bringing any noticeable speedup
for most of them.
llvm-svn: 375062
Jonas Devlieghere [Thu, 17 Oct 2019 00:02:00 +0000 (00:02 +0000)]
[Reproducer] Support dumping the reproducer CWD
Add support for dumping the current working directory with
`reproducer dump -p cwd`.
llvm-svn: 375061
Jonas Devlieghere [Thu, 17 Oct 2019 00:01:57 +0000 (00:01 +0000)]
[Reproducer] Add LoadBuffer<> helper (NFC)
Introduce a helper method named LoadBuffer in the Loader to abstract
reading a reproducer file from disk.
llvm-svn: 375060
Jonas Devlieghere [Thu, 17 Oct 2019 00:01:53 +0000 (00:01 +0000)]
[Reproducer] Capture the debugger's working directory
This patch extends the reproducer to capture the debugger's current
working directory. This information will be used later to set the
current working directory of the VFS.
llvm-svn: 375059
Joel E. Denny [Wed, 16 Oct 2019 23:58:58 +0000 (23:58 +0000)]
[lit] Fix another test case that r374652 missed
llvm-svn: 375058
Daniel Sanders [Wed, 16 Oct 2019 23:53:35 +0000 (23:53 +0000)]
[gicombiner] Hoist pure C++ combine into the tablegen definition
Summary:
This is just moving the existing C++ code around and will be NFC w.r.t
AArch64. Renamed 'CombineBr' to something more descriptive
('ElideByByInvertingCond') at the same time.
The remaining combines in AArch64PreLegalizeCombiner require features that
aren't implemented at this point and will be hoisted as they are added.
Depends on D68424
Reviewers: bogner, volkan
Subscribers: kristof.beyls, hiraditya, Petar.Avramovic, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D68426
llvm-svn: 375057
Julian Lettner [Wed, 16 Oct 2019 23:31:32 +0000 (23:31 +0000)]
[lit] Remove unnecessary usage of lit.Run
llvm-svn: 375056
Julian Lettner [Wed, 16 Oct 2019 23:25:46 +0000 (23:25 +0000)]
[lit] Do not create semaphores when we do not need them
Parallelism groups and semaphores are only required for parallel
execution.
llvm-svn: 375055
Julian Lettner [Wed, 16 Oct 2019 23:25:41 +0000 (23:25 +0000)]
[lit] Factor out separate methods for parallel and serial execution
llvm-svn: 375054
Jordan Rupprecht [Wed, 16 Oct 2019 23:09:56 +0000 (23:09 +0000)]
[NFC] Fix unused var in release builds
llvm-svn: 375053
Jordan Rupprecht [Wed, 16 Oct 2019 22:59:02 +0000 (22:59 +0000)]
Revert [support] GlobPattern: add support for `\` and `[!...]`, and allow `]` in more places
This reverts r375051 (git commit
a409afaad64ce83ea44cc30ee5f96b6e613a6e98)
The patch does not work on Windows due to `\` in filenames being interpreted as escaping rather than literal path separators when used by lld linker scripts.
llvm-svn: 375052
Jordan Rupprecht [Wed, 16 Oct 2019 22:31:16 +0000 (22:31 +0000)]
[support] GlobPattern: add support for `\` and `[!...]`, and allow `]` in more places
Summary: Update GlobPattern in libSupport to handle a few more cases. It does not fully match the `fnmatch` used by GNU objcopy since named character classes (e.g. `[[:digit:]]`) are not supported, but this should support most existing use cases (mostly just `*` is what's used anyway).
This will be used to implement the `--wildcard` flag in llvm-objcopy to be more compatible with GNU objcopy.
This is split off of D66613 to land the libSupport changes separately. The llvm-objcopy part will land soon.
Reviewers: jhenderson, MaskRay, evgeny777, espindola, alexshap
Reviewed By: MaskRay
Subscribers: nickdesaulniers, emaste, arichardson, hiraditya, jakehehrlich, abrachet, seiya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D66613
undo objcopy changes to make this libsupport only
llvm-svn: 375051
Alina Sbirlea [Wed, 16 Oct 2019 22:23:20 +0000 (22:23 +0000)]
[Utils] Cleanup similar cases to MergeBlockIntoPredecessor.
Summary:
There are two cases where a block is merged into its predecessor and the
MergeBlockIntoPredecessor API is not used. Update the API so it can be
reused in the other cases, in order to avoid code duplication.
Cleanup motivated by D68659.
Reviewers: chandlerc, sanjoy.google, george.burgess.iv
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D68670
llvm-svn: 375050
Julian Lettner [Wed, 16 Oct 2019 22:20:28 +0000 (22:20 +0000)]
[lit] Print warning if we fail to delete temp directory
llvm-svn: 375049
Julian Lettner [Wed, 16 Oct 2019 22:20:25 +0000 (22:20 +0000)]
[lit] Skip creation of tmp dir if we don't actually run any tests
llvm-svn: 375048
Julian Lettner [Wed, 16 Oct 2019 21:58:21 +0000 (21:58 +0000)]
[lit] Remove return value from print_summary function
llvm-svn: 375047
Julian Lettner [Wed, 16 Oct 2019 21:53:20 +0000 (21:53 +0000)]
[lit] Small refactoring and cleanups in main.py
* Remove outdated precautions for Python versions < 2.7
* Remove dead code related to `maxIndividualTestTime` option
* Move printing of test and result summary out of main into its own
function
Reviewed By: rnk
Differential Revision: https://reviews.llvm.org/D68847
llvm-svn: 375046
Alina Sbirlea [Wed, 16 Oct 2019 21:52:09 +0000 (21:52 +0000)]
Update ReleaseNotes: expand the section on enabling MemorySSA
llvm-svn: 375045
Jonas Devlieghere [Wed, 16 Oct 2019 21:48:41 +0000 (21:48 +0000)]
[dsymutil] Print warning/error for unknown/missing arguments.
After changing dsymutil to use libOption, we lost error reporting for
missing required arguments (input files). Additionally, we stopped
complaining about unknown arguments. This patch fixes both and adds a
test.
llvm-svn: 375044
Shoaib Meenai [Wed, 16 Oct 2019 21:41:05 +0000 (21:41 +0000)]
[AArch64] Fix offset calculation
r374772 changed Offset to be an int64_t but left NewOffset as an int.
Scale is unsigned, so in the calculation `Offset - NewOffset * Scale`,
`NewOffset * Scale` was promoted to unsigned and was then zero-extended
to 64 bits, leading to an incorrect computation which manifested as an
out-of-memory when building the Swift standard library for Android
aarch64. Promote NewOffset to int64_t to fix this, and promote
EmittableOffset as well, since its one user passes it to a function
which takes an int64_t anyway.
Test case based on a suggestion by Sander de Smalen!
Differential Revision: https://reviews.llvm.org/D69018
llvm-svn: 375043
Matt Arsenault [Wed, 16 Oct 2019 20:46:32 +0000 (20:46 +0000)]
GlobalISel: Implement lower for G_SADDO/G_SSUBO
Port directly from SelectionDAG, minus the path using
ISD::SADDSAT/ISD::SSUBSAT.
llvm-svn: 375042
Martin Storsjo [Wed, 16 Oct 2019 20:38:44 +0000 (20:38 +0000)]
[Symbolize] Use the local MSVC C++ demangler instead of relying on dbghelp. NFC.
This allows making a couple llvm-symbolizer tests run in all
environments.
Differential Revision: https://reviews.llvm.org/D68133
llvm-svn: 375041
Philip Reames [Wed, 16 Oct 2019 20:27:10 +0000 (20:27 +0000)]
Remove a stale comment, noted in post commit review for rL375038
llvm-svn: 375040
Michael Liao [Wed, 16 Oct 2019 20:22:54 +0000 (20:22 +0000)]
[clangd] Add the missing dependency on `clangLex`.
llvm-svn: 375039
Philip Reames [Wed, 16 Oct 2019 19:58:26 +0000 (19:58 +0000)]
[IndVars] Fix a miscompile in off-by-default loop predication implementation
The problem is that we can have two loop exits, 'a' and 'b', where 'a' and 'b' would exit at the same iteration, 'a' precedes 'b' along some path, and 'b' is predicated while 'a' is not. In this case (see the previously submitted test case), we causing the loop to exit through 'b' whereas it should have exited through 'a'.
This only applies to loop exits where the exit counts are not provably inequal, but that isn't as much of a restriction as it appears. If we could order the exit counts, we'd have already removed one of the two exits. In theory, we might be able to prove inequality w/o ordering, but I didn't really explore that piece. Instead, I went for the obvious restriction and ensured we didn't predicate exits following non-predicateable exits.
Credit goes to Evgeny Brevnov for figuring out the problematic case. Fuzzing probably also found it (failures seen), but due to some silly infrastructure problems I hadn't gotten to the results before Evgeny hand reduced it from a benchmark (he manually enabled the transform). Once this is fixed, I'll try to filter through the fuzzer failures to see if there's anything additional lurking.
Differential Revision https://reviews.llvm.org/D68956
llvm-svn: 375038
Martin Storsjo [Wed, 16 Oct 2019 19:39:56 +0000 (19:39 +0000)]
[LLDB] Use the llvm microsoft demangler instead of the windows dbghelp api. NFCI.
Differential Revision: https://reviews.llvm.org/D68134
llvm-svn: 375034
Stanislav Mekhanoshin [Wed, 16 Oct 2019 19:28:25 +0000 (19:28 +0000)]
[AMDGPU] Do not combine dpp mov reading physregs
We cannot be sure physregs will stay unchanged.
Differential Revision: https://reviews.llvm.org/D69065
llvm-svn: 375033
Jason Molenda [Wed, 16 Oct 2019 19:14:49 +0000 (19:14 +0000)]
Add arm64_32 support to lldb, an ILP32 codegen
that runs on arm64 ISA targets, specifically
Apple watches.
Differential Revision: https://reviews.llvm.org/D68858
llvm-svn: 375032
Volodymyr Sapsai [Wed, 16 Oct 2019 19:12:34 +0000 (19:12 +0000)]
Replace platform-dependent `stat` with `llvm::sys::fs::status`. NFC intended.
Reviewers: bruno, sammccall
Reviewed By: sammccall
Subscribers: jkorous, dexonsmith, arphaman, ributzka, cfe-commits
Differential Revision: https://reviews.llvm.org/D69011
llvm-svn: 375031
Stanislav Mekhanoshin [Wed, 16 Oct 2019 18:48:54 +0000 (18:48 +0000)]
[AMDGPU] Do not combine dpp with physreg def
We will remove dpp mov along with the physreg def otherwise.
Differential Revision: https://reviews.llvm.org/D69063
llvm-svn: 375030
Walter Erquinigo [Wed, 16 Oct 2019 18:47:05 +0000 (18:47 +0000)]
[android/process list] support showing process arguments
Summary:
The qfProcessInfo and qsProcessInfo packets currently don't set the processes' arguments, however the platform process list -v command tries to print it.
In this diff I'm adding the arguments as part of the packet, and now the command shows the arguments just like on mac.
On Mac:
507 1 wallace
1876110778 wallace
1876110778 x86_64-apple-macosx /usr/libexec/secd
503 1 wallace
1876110778 wallace
1876110778 x86_64-apple-macosx /usr/libexec/secinitd
501 1 wallace
1876110778 wallace
1876110778 x86_64-apple-macosx /usr/libexec/languageassetd --firstLogin
497 1 wallace
1876110778 wallace
1876110778 x86_64-apple-macosx /usr/libexec/trustd --agent
496 1 wallace
1876110778 wallace
1876110778 x86_64-apple-macosx /usr/libexec/lsd
494 1 wallace
1876110778 wallace
1876110778 x86_64-apple-macosx /System/Library/Frameworks/CoreTelephony.framework/Support/CommCenter -L
491 1 wallace
1876110778 wallace
1876110778 x86_64-apple-macosx /usr/sbin/distnoted agent
489 1 wallace
1876110778 wallace
1876110778 x86_64-apple-macosx /usr/libexec/UserEventAgent (Aqua)
484 1 wallace
1876110778 wallace
1876110778 x86_64-apple-macosx /usr/sbin/cfprefsd agent
483 1 wallace
1876110778 wallace
1876110778 x86_64-apple-macosx /System/Library/Frameworks/LocalAuthentication.framework/Support/coreauthd
On android:
1561 1016 root 0 0 aarch64-unknown-linux-android /system/bin/ip6tables-restore--noflush -w -v
1805 982 1000 1000 1000 android:drmService
1811 982 10189 10189 10189 com.qualcomm.embms:remote
1999 1 1000 1000 1000 aarch64-unknown-linux-android /system/bin/tlc_serverCCM
2332 982 10038 10038 10038 com.android.systemui
2378 983 1053 1053 1053 webview_zygote
2448 982 5013 5013 5013 com.sec.location.nsflp2
2465 982 10027 10027 10027 com.google.android.gms.persistent
Differential Revision: https://reviews.llvm.org/D68293
llvm-svn: 375029
Jordan Rupprecht [Wed, 16 Oct 2019 18:39:52 +0000 (18:39 +0000)]
[llvm-ar] Implement the V modifier as an alias for --version
Summary: Also update the help modifier (h) so that it works as a modifier and not just as a standalone `h`. For example, `llvm-ar h` prints the help message, but `llvm-ar xh` currently prints `unknown option h`.
Reviewers: MaskRay, gbreynoo
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D69007
llvm-svn: 375028
Steven Wu [Wed, 16 Oct 2019 18:12:41 +0000 (18:12 +0000)]
Fix darwin-ld-lto test for some speical path
Fix the test by not assuming the prefix path of the temp directory can
be matched by a regex.
rdar://problem/
56259195
llvm-svn: 375027
Alexey Bataev [Wed, 16 Oct 2019 18:09:37 +0000 (18:09 +0000)]
[OPENMP]Allow priority clause in combined task-based directives.
The expression of the priority clause must be captured in the combined
task-based directives, like 'parallel master taskloop' directive.
llvm-svn: 375026
Sanjay Patel [Wed, 16 Oct 2019 18:06:24 +0000 (18:06 +0000)]
[SLP] avoid reduction transform on patterns that the backend can load-combine (2nd try)
The 1st attempt at this modified the cost model in a bad way to avoid the vectorization,
but that caused problems for other users (the loop vectorizer) of the cost model.
I don't see an ideal solution to these 2 related, potentially large, perf regressions:
https://bugs.llvm.org/show_bug.cgi?id=42708
https://bugs.llvm.org/show_bug.cgi?id=43146
We decided that load combining was unsuitable for IR because it could obscure other
optimizations in IR. So we removed the LoadCombiner pass and deferred to the backend.
Therefore, preventing SLP from destroying load combine opportunities requires that it
recognizes patterns that could be combined later, but not do the optimization itself (
it's not a vector combine anyway, so it's probably out-of-scope for SLP).
Here, we add a cost-independent bailout with a conservative pattern match for a
multi-instruction sequence that can probably be reduced later.
In the x86 tests shown (and discussed in more detail in the bug reports), SDAG combining
will produce a single instruction on these tests like:
movbe rax, qword ptr [rdi]
or:
mov rax, qword ptr [rdi]
Not some (half) vector monstrosity as we currently do using SLP:
vpmovzxbq ymm0, dword ptr [rdi + 1] # ymm0 = mem[0],zero,zero,..
vpsllvq ymm0, ymm0, ymmword ptr [rip + .LCPI0_0]
movzx eax, byte ptr [rdi]
movzx ecx, byte ptr [rdi + 5]
shl rcx, 40
movzx edx, byte ptr [rdi + 6]
shl rdx, 48
or rdx, rcx
movzx ecx, byte ptr [rdi + 7]
shl rcx, 56
or rcx, rdx
or rcx, rax
vextracti128 xmm1, ymm0, 1
vpor xmm0, xmm0, xmm1
vpshufd xmm1, xmm0, 78 # xmm1 = xmm0[2,3,0,1]
vpor xmm0, xmm0, xmm1
vmovq rax, xmm0
or rax, rcx
vzeroupper
ret
Differential Revision: https://reviews.llvm.org/D67841
llvm-svn: 375025
Haibo Huang [Wed, 16 Oct 2019 18:00:21 +0000 (18:00 +0000)]
[lldb] move more things from python to cmake
Summary: Move the copy of six.py, lldb.py and macosx/heap
Reviewers: labath
Subscribers: mgorny, lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D69016
llvm-svn: 375024
Joel E. Denny [Wed, 16 Oct 2019 17:56:12 +0000 (17:56 +0000)]
[lit] Fix a test case that r374652 missed
llvm-svn: 375023
Dmitry Mikulin [Wed, 16 Oct 2019 17:51:40 +0000 (17:51 +0000)]
Tag CFI-generated data structures with "#pragma clang section" attributes.
Differential Revision: https://reviews.llvm.org/D68808
llvm-svn: 375022
Jason Liu [Wed, 16 Oct 2019 17:36:31 +0000 (17:36 +0000)]
[NFC][XCOFF][AIX] Rename ControlSections to CsectGroup
The name of ControlSections is not expressive enough to convey what they really are.
CsectGroup can better communicate the concept of grouping csects together since they have similar property.
Reviewer: daltenty
Differential Revision: https://reviews.llvm.org/D69001
llvm-svn: 375021
Joel E. Denny [Wed, 16 Oct 2019 17:21:57 +0000 (17:21 +0000)]
[lit] Fix internal diff's --strip-trailing-cr and use it
Using GNU diff, `--strip-trailing-cr` removes a `\r` appearing before
a `\n` at the end of a line. Without this patch, lit's internal diff
only removes `\r` if it appears as the last character. That seems
useless. This patch fixes that.
This patch also adds `--strip-trailing-cr` to some tests that fail on
Windows bots when D68664 is applied. Based on what I see in the bot
logs, I think the following is happening. In each test there, lit
diff is comparing a file with `\r\n` line endings to a file with `\n`
line endings. Without D68664, lit diff reads those files in text
mode, which in Windows causes `\r\n` to be replaced with `\n`.
However, with D68664, lit diff reads the files in binary mode instead
and thus reports that every line is different, just as GNU diff does
(at least under Ubuntu). Adding `--strip-trailing-cr` to those tests
restores the previous behavior while permitting the behavior of lit
diff to be more like GNU diff.
Reviewed By: rnk
Differential Revision: https://reviews.llvm.org/D68839
llvm-svn: 375020
Simon Pilgrim [Wed, 16 Oct 2019 17:21:50 +0000 (17:21 +0000)]
CombinerHelper - silence dead assignment warnings. NFCI.
Copy the NewAlignment value to Alignment first and then use that to update the stack frame object alignments.
llvm-svn: 375019
Joel E. Denny [Wed, 16 Oct 2019 17:21:24 +0000 (17:21 +0000)]
[lit] Clean up internal diff's encoding handling
As suggested by rnk at D67643#1673043, instead of reading files
multiple times until an appropriate encoding is found, read them once
as binary, and then try to decode what was read.
For Python >= 3.5, don't fail when attempting to decode the
`diff_bytes` output in order to print it.
Avoid failures for Python 2.7 used on some Windows bots by
transforming diff output with `lit.util.to_string` before writing it
to stdout.
Finally, add some tests for encoding handling.
Reviewed By: rnk
Differential Revision: https://reviews.llvm.org/D68664
llvm-svn: 375018
Alexey Bataev [Wed, 16 Oct 2019 16:59:01 +0000 (16:59 +0000)]
[OPENMP]Use different addresses for zeroed thread_id/bound_id.
When the parallel region is called directly in the sequential region,
the zeroed tid/bound id are used. But they must point to the different
memory locations as the parameters are marked as noalias.
llvm-svn: 375017
Stanislav Mekhanoshin [Wed, 16 Oct 2019 16:58:06 +0000 (16:58 +0000)]
[AMDGPU] Supress unused sdwa insts generation
Do not generate non-existing sdwa instructions. It reduces the
number of generated instructions by 185.
Differential Revision: https://reviews.llvm.org/D69010
llvm-svn: 375016
Francis Visoiu Mistrih [Wed, 16 Oct 2019 16:43:34 +0000 (16:43 +0000)]
[Remarks] Fix warning for ambigous `else` behind EXPECT macro
http://lab.llvm.org:8011/builders/clang-ppc64be-linux-lnt/builds/31902/steps/ninja%20check%201/logs/stdio
llvm-svn: 375015
Francis Visoiu Mistrih [Wed, 16 Oct 2019 16:35:09 +0000 (16:35 +0000)]
[Remarks] Fix unit test by only checking for the path
http://lab.llvm.org:8011/builders/clang-ppc64be-linux/builds/39536/steps/ninja%20check%201/logs/FAIL%3A%20LLVM-Unit%3A%3AYAMLRemarks.ParsingBadMeta
llvm-svn: 375014
Graham Hunter [Wed, 16 Oct 2019 16:33:41 +0000 (16:33 +0000)]
[SVE][IR] Small TypeSize improvements left out of initial commit
The commit for D53137 left out the last round of improvements
requested by reviewers. Adding those in now.
llvm-svn: 375013
Adrian Prantl [Wed, 16 Oct 2019 16:30:38 +0000 (16:30 +0000)]
[DWARF5] Added support for DW_AT_noreturn attribute to be emitted for
C++ class member functions.
Patch by Sourabh Singh Tomar!
Differential Revision: https://reviews.llvm.org/D68697
llvm-svn: 375012
Francis Visoiu Mistrih [Wed, 16 Oct 2019 16:18:12 +0000 (16:18 +0000)]
[Remarks] Use StringRef::contains to avoid differences in error string
Different OSs have different error strings:
http://lab.llvm.org:8011/builders/clang-ppc64be-linux/builds/39534/steps/ninja%20check%201/logs/FAIL%3A%20LLVM-Unit%3A%3AYAMLRemarks.ParsingBadMeta
llvm-svn: 375011
Mark Murray [Wed, 16 Oct 2019 15:59:06 +0000 (15:59 +0000)]
[AArch64,Assembler] Compiler support for ID_MMFR5_EL1
Summary: Add read-only system register ID_MMFR5_EL1 and unit tests.
Subscribers: kristof.beyls, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D69039
llvm-svn: 375010
David Green [Wed, 16 Oct 2019 15:50:42 +0000 (15:50 +0000)]
[Codegen] Adjust saturation test. NFC.
Add some extra sat tests and adjust some of the existing tests to use signext where it would naturally be.
llvm-svn: 375009
Francis Visoiu Mistrih [Wed, 16 Oct 2019 15:40:59 +0000 (15:40 +0000)]
[Remarks] Add support for prepending a path to external files
This helps with testing and debugging for paths that are assumed
absolute.
It also uses a FileError to provide the file path it's trying to open.
llvm-svn: 375008
Jiong Wang [Wed, 16 Oct 2019 15:27:59 +0000 (15:27 +0000)]
bpf: fix wrong truncation elimination when there is back-edge/loop
Currently, BPF backend is doing truncation elimination. If one truncation
is performed on a value defined by narrow loads, then it could be redundant
given BPF loads zero extend the destination register implicitly.
When the definition of the truncated value is a merging value (PHI node)
that could come from different code paths, then checks need to be done on
all possible code paths.
Above described optimization was introduced as r306685, however it doesn't
work when there is back-edge, for example when loop is used inside BPF
code.
For example for the following code, a zero-extended value should be stored
into b[i], but the "and reg, 0xffff" is wrongly eliminated which then
generates corrupted data.
void cal1(unsigned short *a, unsigned long *b, unsigned int k)
{
unsigned short e;
e = *a;
for (unsigned int i = 0; i < k; i++) {
b[i] = e;
e = ~e;
}
}
The reason is r306685 was trying to do the PHI node checks inside isel
DAG2DAG phase, and the checks are done on MachineInstr. This is actually
wrong, because MachineInstr is being built during isel phase and the
associated information is not completed yet. A quick search shows none
target other than BPF is access MachineInstr info during isel phase.
For an PHI node, when you reached it during isel phase, it may have all
predecessors linked, but not successors. It seems successors are linked to
PHI node only when doing SelectionDAGISel::FinishBasicBlock and this
happens later than PreprocessISelDAG hook.
Previously, BPF program doesn't allow loop, there is probably the reason
why this bug was not exposed.
This patch therefore fixes the bug by the following approach:
- The existing truncation elimination code and the associated
"load_to_vreg_" records are removed.
- Instead, implement truncation elimination using MachineSSA pass, this
is where all information are built, and keep the pass together with other
similar peephole optimizations inside BPFMIPeephole.cpp. Redundant move
elimination logic is updated accordingly.
- Unit testcase included + no compilation errors for kernel BPF selftest.
Patch Review
===
Patch was sent to and reviewed by BPF community at:
https://lore.kernel.org/bpf
Reported-by: David Beckett <david.beckett@netronome.com>
Reviewed-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Jiong Wang <jiong.wang@netronome.com>
llvm-svn: 375007
Luis Marques [Wed, 16 Oct 2019 15:06:02 +0000 (15:06 +0000)]
[RISCV] Add MachineInstr immediate verification
Summary:
This patch implements the `TargetInstrInfo::verifyInstruction` hook for RISC-V. Currently the hook verifies the machine instruction's immediate operands, to check if the immediates are within the expected bounds. Without the hook invalid immediates are not detected except when doing assembly parsing, so they are silently emitted (including being truncated when emitting object code).
The bounds information is specified in tablegen by using the `OperandType` definition, which sets the `MCOperandInfo`'s `OperandType` field. Several RISC-V-specific immediate operand types were created, which extend the `MCInstrDesc`'s `OperandType` `enum`.
To have the hook called with `llc` pass it the `-verify-machineinstrs` option. For Clang add the cmake build config `-DLLVM_ENABLE_EXPENSIVE_CHECKS=True`, or temporarily patch `TargetPassConfig::addVerifyPass`.
Review concerns:
- The patch adds immediate operand type checks that cover at least the base ISA. There are several other operand types for the C extension and one type for the F/D extensions that were left out of this initial patch because they introduced further design concerns that I felt were best evaluated separately.
- Invalid register classes (e.g. passing a GPR register where a GPRC is expected) are already caught, so were not included.
- This design makes the more abstract `MachineInstr` verification depend on MC layer definitions, which arguably is not the cleanest design, but is in line with how things are done in other parts of the target and LLVM in general.
- There is some duplication of logic already present in the `MCOperandPredicate`s. Since the `MachineInstr` and `MCInstr` notions of immediates are fundamentally different, this is currently necessary.
Reviewers: asb, lenary
Reviewed By: lenary
Subscribers: hiraditya, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, kito-cheng, shiva0217, jrtc27, MaskRay, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, psnobl, benna, Jim, s.egerton, pzheng, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D67397
llvm-svn: 375006
David Stuttard [Wed, 16 Oct 2019 14:37:39 +0000 (14:37 +0000)]
[AMDGPU] Fix-up cases where writelane has 2 SGPR operands
Summary:
Even though writelane doesn't have the same constraints as other valu
instructions it still can't violate the >1 SGPR operand constraint
Due to later register propagation (e.g. fixing up vgpr operands via
readfirstlane) changing writelane to only have a single SGPR is tricky.
This implementation puts a new check after SIFixSGPRCopies that prevents
multiple SGPRs being used in any writelane instructions.
The algorithm used is to check for trivial copy prop of suitable constants into
one of the SGPR operands and perform that if possible. If this isn't possible
put an explicit copy of Src1 SGPR into M0 and use that instead (this is
allowable for writelane as the constraint is for SGPR read-port and not
constant-bus access).
Reviewers: rampitec, tpr, arsenm, nhaehnle
Reviewed By: rampitec, arsenm, nhaehnle
Subscribers: arsenm, kzhuravl, jvesely, wdng, nhaehnle, mgorny, yaxunl, tpr, t-tye, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D51932
Change-Id: Ic7553fa57440f208d4dbc4794fc24345d7e0e9ea
llvm-svn: 375004
Yitzhak Mandelbaum [Wed, 16 Oct 2019 14:26:20 +0000 (14:26 +0000)]
[libTooling] Fix r374962: add more Transformer forwarding decls.
Summary:
The move to a new, single namespace in r374962 left out some type definitions
from the old namespace and resulted in one naming conflict (`text`). This
revision adds aliases for those definitions and removes one of the `text`
functions from the new namespace.
Reviewers: alexfh
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D69036
llvm-svn: 375003
Owen Reynolds [Wed, 16 Oct 2019 14:07:57 +0000 (14:07 +0000)]
[llvm-ar] Make paths case insensitive when on windows
When on windows gnu-ar treats member names as case insensitive. This
commit implements the same behaviour.
Differential Revision: https://reviews.llvm.org/D68033
llvm-svn: 375002
Simon Tatham [Wed, 16 Oct 2019 13:23:39 +0000 (13:23 +0000)]
[Driver,ARM] Make -mfloat-abi=soft turn off MVE.
Since `-mfloat-abi=soft` is taken to mean turning off all uses of the
FP registers, it should turn off the MVE vector instructions as well
as NEON and scalar FP. But it wasn't doing so.
So the options `-march=armv8.1-m.main+mve.fp+fp.dp -mfloat-abi=soft`
would cause the underlying LLVM to //not// support MVE (because it
knows the real target feature relationships and turned off MVE when
the `fpregs` feature was removed), but the clang layer still thought
it //was// supported, and would misleadingly define the feature macro
`__ARM_FEATURE_MVE`.
The ARM driver code already has a long list of feature names to turn
off when `-mfloat-abi=soft` is selected. The fix is to add the missing
entries `mve` and `mve.fp` to that list.
Reviewers: dmgreen
Subscribers: kristof.beyls, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D69025
llvm-svn: 375001
Guillaume Chatelet [Wed, 16 Oct 2019 13:06:17 +0000 (13:06 +0000)]
[Alignment][NFC] Optimize alignTo
Summary: A small optimization suggested by jakehehrlich@ in D64790.
Reviewers: jakehehrlich, courbet
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D69023
llvm-svn: 375000
Simon Pilgrim [Wed, 16 Oct 2019 11:17:08 +0000 (11:17 +0000)]
RedirectingFileSystem::openFileForRead - replace bitwise & with boolean && to fix warning
Seems to be just a typo - now matches other instances which do something similar
llvm-svn: 374995
Simon Pilgrim [Wed, 16 Oct 2019 11:16:59 +0000 (11:16 +0000)]
RealFile - fix self-initialization warning in constructor.
llvm-svn: 374994
Piotr Sobczak [Wed, 16 Oct 2019 11:14:01 +0000 (11:14 +0000)]
[InstCombine][AMDGPU] Fix crash with v3i16/v3f16 buffer intrinsics
Summary:
This is something of a workaround to avoid a crash later on in type
legalizer (WidenVectorResult()).
Also added some f16 tests, including a non-working v3f16 case with
a FIXME.
Reviewers: arsenm, tpr, nhaehnle
Reviewed By: arsenm
Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D68865
llvm-svn: 374993
Sjoerd Meijer [Wed, 16 Oct 2019 10:55:06 +0000 (10:55 +0000)]
Revert "[HardwareLoops] Optimisation remarks"
while I investigate the PPC build bot failures.
This reverts commit
ad763751565b9663bc338fa2ca5ade86c6ca22ec.
llvm-svn: 374992
Simon Pilgrim [Wed, 16 Oct 2019 10:50:06 +0000 (10:50 +0000)]
RewriteModernObjC - silence static analyzer getAs<> null dereference warnings. NFCI.
The static analyzer is warning about potential null dereferences, but in these cases we should be able to use castAs<> directly and if not assert will fire for us.
llvm-svn: 374991
Mikhail Maltsev [Wed, 16 Oct 2019 10:40:57 +0000 (10:40 +0000)]
[ARM] Add a register class for GPR pairs without SP and use it. NFCI
Summary:
Currently Thumb2InstrInfo.cpp uses a register class which is
auto-generated by tablegen. Such approach is fragile because
auto-generated classes might change when other register classes are
added. For example, before https://reviews.llvm.org/D62667
we were using GPRPair_with_gsub_1_in_rGPRRegClass, but had to
change it to GPRPair_with_gsub_1_in_GPRwithAPSRnospRegClass
because the former class stopped being generated (this did not change
the functionality though).
This patch adds a register class consisting of even-odd GPR register
pairs from (R0, R1) to (R10, R11), which excludes (R12, SP) and uses
it in Thumb2InstrInfo.cpp instead of
GPRPair_with_gsub_1_in_GPRwithAPSRnospRegClass.
Reviewers: ostannard, simon_tatham, dmgreen, efriedma
Reviewed By: simon_tatham
Subscribers: kristof.beyls, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D69026
llvm-svn: 374990
Simon Pilgrim [Wed, 16 Oct 2019 10:38:49 +0000 (10:38 +0000)]
CGDebugInfo - silence static analyzer dyn_cast<> null dereference warnings. NFCI.
The static analyzer is warning about potential null dereferences, but in these cases we should be able to use cast<> directly and if not assert will fire for us.
llvm-svn: 374989
Simon Pilgrim [Wed, 16 Oct 2019 10:38:40 +0000 (10:38 +0000)]
CGExprConstant - silence static analyzer getAs<> null dereference warning. NFCI.
The static analyzer is warning about a potential null dereference, but in these cases we should be able to use castAs<> directly and if not assert will fire for us.
llvm-svn: 374988
Simon Pilgrim [Wed, 16 Oct 2019 10:38:32 +0000 (10:38 +0000)]
CGBuiltin - silence static analyzer getAs<> null dereference warnings. NFCI.
The static analyzer is warning about potential null dereferences, but in these cases we should be able to use castAs<> directly and if not assert will fire for us.
llvm-svn: 374987
Simon Pilgrim [Wed, 16 Oct 2019 10:38:18 +0000 (10:38 +0000)]
SimpleLoopUnswitch - fix uninitialized variable and null dereference warnings. NFCI.
llvm-svn: 374986
Nico Weber [Wed, 16 Oct 2019 10:23:53 +0000 (10:23 +0000)]
Revert 374967 "[Concepts] ConceptSpecializationExprs mangling"
This reverts commit
5e34ad109ced8dbdea9500ee28180315b2aeba3d.
The mangling test fails on Windows:
http://lab.llvm.org:8011/builders/clang-x64-ninja-win7/builds/15944
It also fails on ppc64le:
http://lab.llvm.org:8011/builders/clang-ppc64le-linux-lnt/builds/21092
Also revert follow-up 374971 "Fix failing mangle-concept.cpp test."
(it did not help on Win/ppc64le).
llvm-svn: 374985
Piotr Sobczak [Wed, 16 Oct 2019 10:17:02 +0000 (10:17 +0000)]
[AMDGPU] Extend the SI Load/Store optimizer
Summary:
Extend the SI Load/Store optimizer to merge MIMG load instructions. Handle
different flavours of image_load and image_sample instructions.
When the instructions of the same subclass differ only in dmask, merge
them and update dmask accordingly.
Reviewers: nhaehnle
Reviewed By: nhaehnle
Subscribers: arsenm, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D64911
llvm-svn: 374984
GN Sync Bot [Wed, 16 Oct 2019 09:59:01 +0000 (09:59 +0000)]
gn build: Merge r374982
llvm-svn: 374983
Utkarsh Saxena [Wed, 16 Oct 2019 09:53:59 +0000 (09:53 +0000)]
[clangd] Add RemoveUsingNamespace tweak.
Summary:
Removes the 'using namespace' under the cursor and qualifies all accesses in the current file.
E.g.:
using namespace std;
vector<int> foo(std::map<int, int>);
Would become:
std::vector<int> foo(std::map<int, int>);
Subscribers: mgorny, ilya-biryukov, MaskRay, jkorous, mgrang, arphaman, kadircet, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D68562
llvm-svn: 374982
Sam Parker [Wed, 16 Oct 2019 09:37:03 +0000 (09:37 +0000)]
[ARM][ParallelDSP] Change smlad insertion order
Instead of inserting everything after the 'root' of the reduction,
insert all instructions as close to their operands as possible. This
can help reduce register pressure.
Differential Revision: https://reviews.llvm.org/D67392
llvm-svn: 374981
Sjoerd Meijer [Wed, 16 Oct 2019 09:09:55 +0000 (09:09 +0000)]
[HardwareLoops] Optimisation remarks
This adds the initial plumbing to support optimisation remarks in
the IR hardware-loop pass.
I have left a todo in a comment where we can improve the reporting,
and will iterate on that now that we have this initial support in.
Differential Revision: https://reviews.llvm.org/D68579
llvm-svn: 374980
Orlando Cazalet-Hyams [Wed, 16 Oct 2019 08:36:00 +0000 (08:36 +0000)]
[NFC] Replace a linked list in LiveDebugVariables pass with a DenseMap
In LiveDebugVariables.cpp:
Prior to this patch, UserValues were grouped into linked list chains. Each
chain was the union of two sets: { A: Matching Source variable } or
{ B: Matching virtual register }. A ptr to the heads (or 'leaders')
of each of these chains were kept in a map with the { Source variable } used
as the key (set A predicate) and another with { Virtual register } as key
(set B predicate).
There was a search through the chains in the function getUserValue looking for
UserValues with matching { Source variable, Complex expression, Inlined-at
location }. Essentially searching for a subset of A through two interleaved
linked lists of set A and B. Importantly, by design, the subset will only
contain one or zero elements here. That is to say a UserValue can be uniquely
identified by the tuple { Source variable, Complex expression, Inlined-at
location } if it exists.
This patch removes the linked list and instead uses a DenseMap to map
the tuple { Source variable, Complex expression, Inlined-at location }
to UserValue ptrs so that the getUserValue search predicate is this map key.
The virtual register map now maps a vreg to a SmallVector<UserVal *> so that
set B is still available for quick searches.
Reviewers: aprantl, probinson, vsk, dblaikie
Reviewed By: aprantl
Subscribers: russell.gallop, gbedwell, bjope, hiraditya, llvm-commits
Tags: #debug-info, #llvm
Differential Revision: https://reviews.llvm.org/D68816
llvm-svn: 374979
Dan Liew [Wed, 16 Oct 2019 05:48:39 +0000 (05:48 +0000)]
[CMake] Disable building all Darwin libraries (except builtins) for macOS i386 when the SDK is >= 10.15.
Summary:
In the macOS 10.15 SDK the ability to link i386 binaries was removed and
in the corresponding OS it is not possible to run macOS i386 binaries.
The consequence of these changes meant that targets like `check-asan`
would fail because:
* Unit tests could not be linked for i386
* Lit tests for i386 would fail due to not being able to execute
compiled binaries.
The simplest fix to this is to simply disable building for i386 for
macOS when using the 10.15 SDK (or newer). This disables building the
i386 slice for most compiler-rt libraries and consequently disables the
unit and lit tests for macOS i386.
Note that because the `DARWIN_osx_ARCHS` CMake variable is a cache
variable this patch will have no affect on existing builds unless
the existing cache variable is deleted. The simplest way to deal with
this is delete existing builds and just do a fresh configure.
Note this should not affect the builtins which are managed with
the `DARWIN_osx_BUILTIN_ARCHS` CMake cache variable.
For those who wish to force using a particular set of architectures when
using newer SDKs passing `-DDARWIN_osx_ARCHS=i386;x86_64;x86_64h` to
CMake should provide a usable (but completely unsupported) workaround.
rdar://problem/
55668535
rdar://problem/
47939978
Reviewers: kubamracek, yln, azhar, kcc, dvyukov, vitalybuka, cryptoad, eugenis, thakis, phosek
Subscribers: mgorny, #sanitizers, llvm-commits
Tags: #llvm, #sanitizers
Differential Revision: https://reviews.llvm.org/D68292
llvm-svn: 374977
Craig Topper [Wed, 16 Oct 2019 03:29:24 +0000 (03:29 +0000)]
[LegalizeTypes] Don't use PromoteTargetBoolean in WidenVecOp_SETCC.
Similar to r374970, but I don't have a test for this.
PromoteTargetBoolean is intended to be use for legalizing an
operand that needs to be promoted. It picks its type based on
the return from getSetccResultType and is intended to be used
when we have freedom to pick the new type. But the return type
we need for WidenVecOp_SETCC is completely determined by the
type of the input node.
llvm-svn: 374972
Saar Raz [Wed, 16 Oct 2019 02:56:40 +0000 (02:56 +0000)]
Fix failing mangle-concept.cpp test.
llvm-svn: 374971
Craig Topper [Wed, 16 Oct 2019 02:50:04 +0000 (02:50 +0000)]
[LegalizeTypes] Don't call PromoteTargetBoolean from SplitVecOp_VSETCC.
PromoteTargetBoolean calls getSetccResultType to get the return
type. But we were passing it the setcc result type rather than the
setcc input type. This causes an issue on X86 with avx512vl where
the setcc result type for vXf16 vectors is vXi16 while the
result type for vXi16 vectors is vXi1.
There's really no guarantee that getSetccResultType is the type
we need here. So now we just grab the extend type from
getExtendForContent and extend to the original result VT of the
node we're splitting.
llvm-svn: 374970
Ryan Prichard [Wed, 16 Oct 2019 02:38:47 +0000 (02:38 +0000)]
[libunwind][Android] Improve workaround for PIE zero-dlpi_addr bug
Summary:
The workaround added in https://reviews.llvm.org/rL299575 appears to be
working around a bug in Android JB 4.1.x and 4.2.x (API 16 and 17).
Starting in API 16, Android added support for PIE binaries, but the
dynamic linker failed to initialize dlpi_addr to the address that the
executable was loaded at. The bug was fixed in Android JB 4.3.x (API 18).
Improve the true load bias calculation:
* The code was assuming that the first segment would be the PT_PHDR
segment. I think it's better to be explicit and search for PT_PHDR. (It
will be almost as fast in practice.)
* It's more correct to use p_vaddr rather than p_offset. If a PIE
executable is linked with a non-zero image base (e.g. lld's
-Wl,--image-base=xxxx), then we must use p_vaddr here.
The "phdr->p_vaddr < image_base" condition seems unnecessary and maybe
slightly wrong. If the OS were to load a binary at an address smaller than
a vaddr in the binary, we would still want to do this workaround.
The workaround is safe when the linker bug isn't present, because it
should calculate an image_base equal to dlpi_addr. Note that with API 21
and up, this workaround should never activate for dynamically-linked
objects, because non-PIE executables aren't allowed.
Consolidate the fix into a single block of code that calculates the true
image base, and make it clear that the fix no longer applies after API 18.
See https://github.com/android/ndk/issues/505 for details.
Reviewers: mclow.lists, srhines, danalbert, compnerd
Reviewed By: compnerd
Subscribers: srhines, krytarowski, christof, libcxx-commits
Tags: #libc
Differential Revision: https://reviews.llvm.org/D68971
llvm-svn: 374969
Saar Raz [Wed, 16 Oct 2019 02:33:41 +0000 (02:33 +0000)]
[Concepts] ConceptSpecializationExprs mangling
Implement mangling for CSEs to match regular template-ids.
Reviewed as part of D41569.
llvm-svn: 374967
Julian Lettner [Wed, 16 Oct 2019 02:13:16 +0000 (02:13 +0000)]
Revert "[ASan] Refine diagnoses messages"
This reverts commit
4d1ecadda59ce82e5fa6e28dd15bf794eee88363.
llvm-svn: 374965
Lawrence D'Anna [Wed, 16 Oct 2019 01:58:15 +0000 (01:58 +0000)]
update ScriptInterpreterPython to use File, not FILE*
Summary:
ScriptInterpreterPython needs to save and restore sys.stdout and
friends when LLDB runs a python script.
It currently does this using FILE*, which is not optimal. If
whatever was in sys.stdout can not be represented as a FILE*, then
it will not be restored correctly when the script is finished.
It also means that if the debugger's own output stream is not
representable as a file, ScriptInterpreterPython will not be able
to redirect python's output correctly.
This patch updates ScriptInterpreterPython to represent files with
lldb_private::File, and to represent whatever the user had in
sys.stdout as simply a PythonObject.
This will make lldb interoperate better with other scripts or programs
that need to manipulate sys.stdout.
Reviewers: JDevlieghere, jasonmolenda, labath
Reviewed By: labath
Subscribers: lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D68962
llvm-svn: 374964
Aditya Kumar [Wed, 16 Oct 2019 01:50:21 +0000 (01:50 +0000)]
CodeExtractor: NFC: Use Range based loop
Reviewers: vsk, tejohnson, fhahn
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D68924
llvm-svn: 374963
Yitzhak Mandelbaum [Wed, 16 Oct 2019 01:06:46 +0000 (01:06 +0000)]
[libTooling] Put all Transformer declarations in a single namespace.
Summary:
This revision introduces a new namespace, `clang::transformer`, to hold
the declarations for the Transformer library.
Reviewers: gribozavr
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D68876
llvm-svn: 374962
David L. Jones [Wed, 16 Oct 2019 00:52:00 +0000 (00:52 +0000)]
Fix an unused variable introduced in rL374955 / rG21703543.
Even though this is a unit test, it still may be run under optimization.
llvm-svn: 374961
Julian Lettner [Wed, 16 Oct 2019 00:39:09 +0000 (00:39 +0000)]
[ASan] Refine diagnoses messages
The provided PC is not reliable in every case, so don't suggest
something that does not make sense.
llvm-svn: 374959
Jonas Devlieghere [Tue, 15 Oct 2019 23:43:37 +0000 (23:43 +0000)]
[dsymutil] Support and relocate base address selection entries for debug_loc
Since r374600 clang emits base address selection entries. Currently
dsymutil does not support these entries and incorrectly interprets them
as location list entries.
This patch adds support for base address selection entries in dsymutil
and makes sure they are relocated correctly.
Thanks to Dave for coming up with the test case!
Differential revision: https://reviews.llvm.org/D69005
llvm-svn: 374957
Jonas Devlieghere [Tue, 15 Oct 2019 23:08:57 +0000 (23:08 +0000)]
[Reland][VirtualFileSystem] Support virtual working directory in the RedirectingFS
Before this patch, changing the working directory of the RedirectingFS
would just forward to its external file system. This prevented us from
having a working directory that only existed in the VFS mapping.
This patch adds support for a virtual working directory in the
RedirectingFileSystem. It now keeps track of its own WD in addition to
updating the WD of the external file system. This ensures that we can
still fall through for relative paths.
This change was originally motivated by the reproducer infrastructure in
LLDB where we want to deal transparently with relative paths.
Differential revision: https://reviews.llvm.org/D65677
llvm-svn: 374955
Richard Smith [Tue, 15 Oct 2019 22:23:11 +0000 (22:23 +0000)]
PR43674: fix incorrect constant evaluation of 'switch' where no case
label corresponds to the condition.
llvm-svn: 374954
Haibo Huang [Tue, 15 Oct 2019 21:58:45 +0000 (21:58 +0000)]
[lldb] Creates _liblldb symlink from cmake
Summary:
This is another attempt of D67993.
This change removed hard coded relative paths. This way we can generate correct result when get_python_lib() returns a different path, or LLDB_PYTHON_RELATIVE_PATH is specified directly.
By moving things out of python, we are also able to correctly process more cross compile situations. E.g. .pyd vs .so for Windows.
Subscribers: lldb-commits, mgorny
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D68858
llvm-svn: 374953
Richard Smith [Tue, 15 Oct 2019 21:50:24 +0000 (21:50 +0000)]
Remove unnecessary and inappropriate forward-declaration of Sema from
AST.
llvm-svn: 374952
Lang Hames [Tue, 15 Oct 2019 21:41:12 +0000 (21:41 +0000)]
[Orc] Add a method for ObjectLinkingLayer to return ownership of object buffers.
RTDyldObjectLinkingLayer allowed clients to register a NotifyEmitted function to
reclaim ownership of object buffers once they had been linked. This patch adds
similar functionality to ObjectLinkingLayer: Clients can now optionally call the
ObjectLinkingLayer::setReturnObjectBuffer method to register a function that
will be called when discarding object buffers. If set, this function will be
called to return ownership of the object regardless of whether the link
succeeded or failed.
Use cases for this function include debug dumping (it provides a way to dump
all objects linked into JIT'd code) and object re-use (e.g. storing an
object in a cache).
llvm-svn: 374951