Adrian Prantl [Wed, 8 Nov 2017 19:18:20 +0000 (19:18 +0000)]
Un-XFAIL a test after the bugfix in r317702.
llvm-svn: 317708
Dan Gohman [Wed, 8 Nov 2017 19:18:08 +0000 (19:18 +0000)]
[WebAssembly] Revise the strategy for inline asm.
Previously, an "r" constraint would mean the compiler provides a value
on WebAssembly's operand stack. This was tricky to use properly,
particularly since it isn't possible to declare a new local from within
an inline asm string.
With this patch, "r" provides the value in a WebAssembly local, and the
local index is provided to the inline asm string. This requires inline
asm to use get_local and set_local to read the register. This does
potentially result in larger code size, however inline asm should
hopefully be quite rare in WebAssembly.
This also means that the "m" constraint can no longer be supported, as
WebAssembly has nothing like a "memory operand" that includes an
implicit get_local.
This fixes PR34599 for the wasm32-unknown-unknown-wasm target (though
not for the ELF target).
llvm-svn: 317707
Masud Rahman [Wed, 8 Nov 2017 19:17:27 +0000 (19:17 +0000)]
[bindings] fix TLS test failure
Since cfe commit r237337, '__declspec(thread)' and 'thread_local' have
been the same since MSVC 2015. i.e. they are both considered to supply
a dynamic TLS kind, not a static TLS kind.
This test originally did not specify which version of MS compatibility
to assume. As a result, the test was brittle, since changing the
default compatibility version could break the test.
This commit adds a specific version when building up the flags used to
parse the translation unit, and tests both versions.
llvm-svn: 317706
Marco Castelluccio [Wed, 8 Nov 2017 19:11:54 +0000 (19:11 +0000)]
Implement flock for Windows in compiler-rt
Summary:
This patch implements flock for Windows, needed to make gcda writing work in a multiprocessing scenario.
Fixes https://bugs.llvm.org/show_bug.cgi?id=34923.
Reviewers: zturner
Reviewed By: zturner
Subscribers: rnk, zturner, llvm-commits
Differential Revision: https://reviews.llvm.org/D38891
llvm-svn: 317705
Adrian McCarthy [Wed, 8 Nov 2017 18:57:02 +0000 (18:57 +0000)]
NFC: Rename MCSafeSEHFragment to MCSymbolIdFragment
Summary:
This fragment emits a symbol ID and will be useful for more than just Safe SEH
tables (e.g., I plan to re-use it for Control Flow Guard tables). This is
simply a rename refactor.
Reviewers: rnk
Subscribers: llvm-commits, hiraditya
Differential Revision: https://reviews.llvm.org/D39770
llvm-svn: 317703
Adrian Prantl [Wed, 8 Nov 2017 18:27:13 +0000 (18:27 +0000)]
Handle inlined variables in SelectionDAGBuilder::EmitFuncArgumentDbgValue().
In 2010 a commit with no testcase and no further explanation
explicitly disabled the handling of inlined variables in
EmitFuncArgumentDbgValue(). I don't think there is a good reason for
this any more and re-enabling this adds debug locations for variables
associated with an LLVM function argument in functions that are
inlined into the first basic block. The only downside of doing this is
that we may insert a DBG_VALUE before the inlined scope, but (1) this
could be filtered out later, and (2) LiveDebugValues will not
propagate it into subsequent basic blocks if they don't dominate the
variable's lexical scope, so this seems like a small price to pay.
rdar://problem/
26228128
llvm-svn: 317702
Artem Dergachev [Wed, 8 Nov 2017 17:27:58 +0000 (17:27 +0000)]
[analyzer] Fix a crash on logical operators with vectors.
Do not crash when trying to compute x && y or x || y where x and y are
of a vector type.
For now we do not seem to properly model operations with vectors. In particular,
operations && and || on a pair of vectors are not short-circuit, unlike regular
logical operators, so even our CFG is incorrect.
Avoid the crash, add respective FIXME tests for later.
Differential Revision: https://reviews.llvm.org/D39682
rdar://problem/
34317663
llvm-svn: 317700
Kostya Kortchinsky [Wed, 8 Nov 2017 16:42:29 +0000 (16:42 +0000)]
[sanitizer] Add Scudo to the sanitizer lint checks.
Summary:
Scudo abides by the coding style enforced by the sanitizer_common
linter, but as of right now, it's not linter-enforced.
Add Scudo to the list of directories checked by check_lint.sh.
Also: fixes some linter errors found after getting this running.
Reviewers: cryptoad
Reviewed By: cryptoad
Subscribers: llvm-commits, kubamracek
Differential Revision: https://reviews.llvm.org/D39757
llvm-svn: 317699
Simon Pilgrim [Wed, 8 Nov 2017 16:35:42 +0000 (16:35 +0000)]
[X86] Add some initial scheduling tests for generic x86 instructions
These will be using inline asm to ensure we have coverage that we're unlikely to get from lowering of basic ir.
Currently waiting for D39728 to land to add support for scheduler comments for inline asm.
llvm-svn: 317698
Haojian Wu [Wed, 8 Nov 2017 14:53:08 +0000 (14:53 +0000)]
[clang-refactor] Get rid of OccurrencesFinder in RenamingAction, NFC
Summary:
The OccurrencesFinder is only used in RenameOccurrences to find symbol
occurrences, there is no need to inherit RefactoringRule.
Replace it with a single utility function to avoid code misleading.
Reviewers: sammccall
Reviewed By: sammccall
Subscribers: klimek, cfe-commits
Differential Revision: https://reviews.llvm.org/D39796
llvm-svn: 317696
Jonas Hahnfeld [Wed, 8 Nov 2017 14:31:54 +0000 (14:31 +0000)]
[CMake] Remove target to build native tablegen
This was once needed so that multiple tablegen binaries don't compile
the library concurrently. However, this isn't needed anymore since
adding USES_TERMINAL to the custom_command.
This is supported by the fact that the target was only building
LLVMSupport since some cleanups a year ago. If this dependency had
really been needed, we would have seen complaints.
Differential Revision: https://reviews.llvm.org/D39299
llvm-svn: 317695
Jonas Hahnfeld [Wed, 8 Nov 2017 14:31:51 +0000 (14:31 +0000)]
[CMake] Add custom target to create build directory
CMake does a poor job in tracking dependencies on files and directories
directly. Create custom target similar to the configuration step.
On my system, this avoids the reconfiguration on each build.
Differential Revision: https://reviews.llvm.org/D39298
llvm-svn: 317694
Alex Bradbury [Wed, 8 Nov 2017 14:24:42 +0000 (14:24 +0000)]
[utils] Add RISC-V support to update_llc_test_checks.py
This should be a trivial change, and I've started using it for generating all
tests at https://github.com/lowrisc/riscv-llvm (i.e. it's been tested in
action quite a lot). Note that the regex does not attempt to match
.cfi_startproc, as I want to ensure compatibility with functions that have the
nounwind attribute.
Differential Revision: https://reviews.llvm.org/D39789
llvm-svn: 317693
Sam McCall [Wed, 8 Nov 2017 13:52:21 +0000 (13:52 +0000)]
Relax definitions.test to accept windows file paths.
Reviewers: ilya-biryukov
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D39797
llvm-svn: 317692
Alex Bradbury [Wed, 8 Nov 2017 13:41:21 +0000 (13:41 +0000)]
[RISCV] Initial support for function calls
Note that this is just enough for simple function call examples to generate
working code. Support for varargs etc follows in future patches.
Differential Revision: https://reviews.llvm.org/D29936
llvm-svn: 317691
Alex Bradbury [Wed, 8 Nov 2017 13:31:40 +0000 (13:31 +0000)]
[RISCV] Codegen for conditional branches
A good portion of this patch is the extra functions that needed to be
implemented to support the test case. e.g. storeRegToStackSlot,
loadRegFromStackSlot, eliminateFrameIndex.
Setting ISD::BR_CC to Expand may appear non-obvious on an architecture with
branch+cmp instructions. However, I found it much easier to deal with matching
the expanded form.
I had to change simm13_lsb0 and simm21_lsb0 to inherit from the
Operand<OtherVT> class rather than Operand<i32> in order to keep tablegen
happy. This isn't a big deal, but it does seem a shame to lose the uniformity
across immediate types when there's not an obvious benefit (I'm hoping a
tablegen expert will educate me on what I'm missing here!).
Differential Revision: https://reviews.llvm.org/D29935
llvm-svn: 317690
Krasimir Georgiev [Wed, 8 Nov 2017 13:28:53 +0000 (13:28 +0000)]
[clang-tidy] Add a note about modernize-replace-random-shuffle
Summary:
This adds a note warning the users that the way the suggested fix seeds the
random number generator is poor.
Reviewers: hokein
Reviewed By: hokein
Subscribers: cfe-commits, xazax.hun
Differential Revision: https://reviews.llvm.org/D39787
llvm-svn: 317689
Alex Bradbury [Wed, 8 Nov 2017 13:24:21 +0000 (13:24 +0000)]
[RISCV] Codegen support for memory operations on global addresses
Differential Revision: https://reviews.llvm.org/D39103
llvm-svn: 317688
Ilya Biryukov [Wed, 8 Nov 2017 13:05:52 +0000 (13:05 +0000)]
Workaround reverse-iteration buildbot breakages. Filed PR35244.
Clang's completion output is non-deterministic, causing test failures
with turned on LLVM_REVERSE_ITERATION.
The workaround is to use CHECK-DAGs for now, will remove them when
PR35244 gets fixed.
llvm-svn: 317687
Sam McCall [Wed, 8 Nov 2017 12:25:00 +0000 (12:25 +0000)]
[clangd] tolerate windows filepaths in tests
llvm-svn: 317686
Alex Bradbury [Wed, 8 Nov 2017 12:20:01 +0000 (12:20 +0000)]
[RISCV] Codegen support for memory operations
This required the implementation of RISCVTargetInstrInfo::copyPhysReg. Support
for lowering global addresses follow in the next patch.
Differential Revision: https://reviews.llvm.org/D29934
llvm-svn: 317685
Alex Bradbury [Wed, 8 Nov 2017 12:02:22 +0000 (12:02 +0000)]
[RISCV] Codegen support for materializing constants
Differential Revision: https://reviews.llvm.org/D39101
llvm-svn: 317684
Pavel Labath [Wed, 8 Nov 2017 11:51:49 +0000 (11:51 +0000)]
Xfail TestConcurrentTwoWatchpointsOneSignal on arm
r317561 exposed an interesting bug (pr35228) in handling of simultaneous
watchpoint hits. Disabling the test until we can get that fixed.
llvm-svn: 317683
Ivan A. Kosarev [Wed, 8 Nov 2017 11:42:21 +0000 (11:42 +0000)]
[Analysis] Fix merging TBAA tags with different final access types
There are cases when we have to merge TBAA access tags with the
same base access type, but different final access types. For
example, accesses to different members of the same structure may
be vectorized into a single load or store instruction. Since we
currently assume that the tags to merge always share the same
final access type, we incorrectly return a tag that describes an
access to one of the original final access types as the generic
tag. This patch fixes that by producing generic tags for the
common type and not the final access types of the original tags.
Resolves:
PR35225: Wrong tbaa metadata after load store vectorizer due to
recent change
https://bugs.llvm.org/show_bug.cgi?id=35225
Differential Revision: https://reviews.llvm.org/D39732
llvm-svn: 317682
Simon Dardis [Wed, 8 Nov 2017 11:13:44 +0000 (11:13 +0000)]
[mips] Guard indirect and tailcall pseudo instructions correctly.
Previously these pseudo instructions were not guarded by ISA, so their
select was dependant on the ordering of the entries in the DAG matcher.
Reviewers: atanasyan
Differential Revision: https://reviews.llvm.org/D39723
llvm-svn: 317681
Nuno Lopes [Wed, 8 Nov 2017 10:59:00 +0000 (10:59 +0000)]
BasicAA: fix bug where we would return partialalias instead of noalias
My fix is conservative and will make us return may-alias instead.
The test case is:
check(gep(x, 0), n, gep(x, n), -1) with n == sizeof(x)
Here, the first value accesses the whole object, but the second access
doesn't access anything. The semantics of -1 is read until the end of the
object, which in this case means read nothing.
No test case, since isn't trivial to exploit this one, but I've proved it correct.
llvm-svn: 317680
Pavel Labath [Wed, 8 Nov 2017 10:48:54 +0000 (10:48 +0000)]
Log: delimit thread name in log message
The thread name was not followed by a space, which meant it was glued to
the log message. I also align the name as we do that with other log
fields. I align it to 16 chars instead of llvm::max_thread_name(), as
that can be 64 on darwin, which is rather long. If anybody feels
differently about that, we can change it.
llvm-svn: 317679
Pavel Labath [Wed, 8 Nov 2017 10:48:50 +0000 (10:48 +0000)]
Make TestTopLevelExprs more robust in face of linker GC
Summary:
This test was failing in various configurations on linux in a fairly
unpredictible way. The success depended on whether the c++ abi library
was linked in statically or not and how well was the linker able to
strip parts of it. This introduces additional code to the "dummmy" test
executable, which ensures that all parts of the library needed to
evaluate the expressions are always present.
Reviewers: clayborg
Subscribers: srhines, tatyana-krasnukha, davide, lldb-commits
Differential Revision: https://reviews.llvm.org/D39727
llvm-svn: 317678
Ilya Biryukov [Wed, 8 Nov 2017 10:39:09 +0000 (10:39 +0000)]
Avoid printing some redundant name qualifiers in completion
Summary:
Adjusted PrintingPolicy inside code completion to avoid printing some
redundant name qualifiers.
Before this change, typedefs that were written unqualified in source
code were printed with qualifiers in completion. For example, in the
following code
struct foo {
typedef int type;
type method();
};
completion item for `method` had return type of `foo::type`, even
though the original code used `type` without qualifiers.
After this change, the completion item has return type `type`, as
originally written in the source code.
Note that this change does not suppress qualifiers written by the
user. For example, in the following code
typedef int type;
struct foo {
typedef int type;
::type method(foo::type);
};
completion item for `method` has return type of `::type` and
parameter type of `foo::type`, as originally written in the source
code.
Reviewers: arphaman, bkramer, klimek
Reviewed By: arphaman
Subscribers: mgorny, eraman, cfe-commits
Differential Revision: https://reviews.llvm.org/D38538
llvm-svn: 317677
Ilya Biryukov [Wed, 8 Nov 2017 10:39:03 +0000 (10:39 +0000)]
Moved QualTypeNames.h from Tooling to AST.
Summary:
For code reuse in SemaCodeComplete.
Note that the tests for QualTypeNames are still in Tooling as they use
Tooling's common testing code.
Reviewers: rsmith, saugustine, rnk, klimek, bkramer
Reviewed By: rnk
Subscribers: cfe-commits, mgorny
Differential Revision: https://reviews.llvm.org/D39224
llvm-svn: 317676
Raphael Isemann [Wed, 8 Nov 2017 10:10:31 +0000 (10:10 +0000)]
Fixed link to bugzilla in the sidebar
llvm-svn: 317675
Alex Bradbury [Wed, 8 Nov 2017 09:26:06 +0000 (09:26 +0000)]
[NFCI] Ensure TargetOpcode::* are compatible with guessInstructionProperties=0
rL162640 introduced CodeGenTarget::guessInstructionProperties. If a target
sets guessInstructionProperties=0 in its FooInstrInfo, tablegen will error if
it has to guess properties from patterns. Unfortunately,
guessInstructionProperties=0 can't be used with current upstream LLVM as
instructions in the TargetOpcode namespace are always included and sometimes
have inferred properties for mayLoad, mayStore, and hasSideEffects. This patch
provides the simplest possible fix to this problem, setting default values for
these fields in the TargetOpcode scope. There is no intended functional
change, as the explicitly set properties should match what was previously
inferred. A number of the instructions had hasSideEffects=1 inferred
unintentionally. This patch makes it explicit, while future patches (such as
D37097) correct the property.
Differential Revision: https://reviews.llvm.org/D37065
llvm-svn: 317674
Sam McCall [Wed, 8 Nov 2017 09:15:01 +0000 (09:15 +0000)]
[clangd] loosen tests for flag-dependence revealed by r317670
llvm-svn: 317673
Haojian Wu [Wed, 8 Nov 2017 08:56:56 +0000 (08:56 +0000)]
[clang-refactor] Introduce a new rename rule for qualified symbols
Summary: Prototype of a new rename rule for renaming qualified symbol.
Reviewers: arphaman, ioeric, sammccall
Reviewed By: arphaman, sammccall
Subscribers: jklaehn, cfe-commits, klimek
Differential Revision: https://reviews.llvm.org/D39332
llvm-svn: 317672
Matt Arsenault [Wed, 8 Nov 2017 08:52:31 +0000 (08:52 +0000)]
DAG: Add computeKnownBitsForFrameIndex
Some of the AMDGPU stack addressing modes require knowing the sign
bit is zero. We used to accomplish this by custom lowering
frame indexes, and then putting an AssertZext around a
TargetFrameIndex. This required specifically looking for
the AssextZext + frame index pattern which was moderately
disgusting. The same could probably be accomplished
with a target specific node, but would still
require special handling of frame indexes.
llvm-svn: 317671
Sam McCall [Wed, 8 Nov 2017 07:44:12 +0000 (07:44 +0000)]
[clangd] Sort completion results.
Summary:
This is (probably) not required by LSP, but at least one buggy client wants it.
It also simplifies some tests - changed a few completion tests to use -pretty.
Reviewers: hokein, malaperle
Subscribers: ilya-biryukov, cfe-commits
Differential Revision: https://reviews.llvm.org/D39738
llvm-svn: 317670
Martin Storsjo [Wed, 8 Nov 2017 07:31:50 +0000 (07:31 +0000)]
[COFF] Add support for IMAGE_REL_ARM64_SECREL
I never ran into this until lld-link started enabling debug output
by default for the mingw mode. I haven't been able to verify that
this actually behaves correctly, but this relocation is handled
identically on all other architectures so far.
Differential Revision: https://reviews.llvm.org/D39754
llvm-svn: 317669
Sylvestre Ledru [Wed, 8 Nov 2017 07:25:19 +0000 (07:25 +0000)]
Always use prctl(PR_SET_PTRACER)
Summary:
Sufficiently old Linux kernel headers don't provide the PR_SET_PTRACER, but we can still call prctl with it if the runtime kernel is newer. Even if it's not, prctl will only return EINVAL.
Patch by Mike Hommey <mh-llvm@glandium.org>
Reviewers: eugenis
Reviewed By: eugenis
Subscribers: sylvestre.ledru, cfe-commits, kubamracek
Differential Revision: https://reviews.llvm.org/D39717
llvm-svn: 317668
Serguei Katkov [Wed, 8 Nov 2017 05:38:54 +0000 (05:38 +0000)]
Revert "[CGP] Enable extending scope of optimizeMemoryInst"
Revert the patch r317665 causing buildbot failures.
llvm-svn: 317667
Serguei Katkov [Wed, 8 Nov 2017 05:02:51 +0000 (05:02 +0000)]
[CGP] Enable extending scope of optimizeMemoryInst
This patch enables the folding of address computation in
memory instruction in case adress is represented by Phi node.
The inputs of Phi node might be different in base register.
Differential Revision: https://reviews.llvm.org/D36073
llvm-svn: 317665
Craig Topper [Wed, 8 Nov 2017 04:54:26 +0000 (04:54 +0000)]
[X86] Add masked vcvtps2ph builtins to CheckX86BuiltinFunctionCall.
This ensures that only immediates that fit in 8-bits are used. This matches what we do for the unmasked versions.
llvm-svn: 317664
Rui Ueyama [Wed, 8 Nov 2017 04:22:40 +0000 (04:22 +0000)]
Remove a given file even if openFileForRead fails.
I think the constract of this function is to remove a file in some way,
whether in background or in foreground. This patch makes sure that it
removes a given file.
Differential Revision: https://reviews.llvm.org/D39778
llvm-svn: 317663
Craig Topper [Wed, 8 Nov 2017 04:00:31 +0000 (04:00 +0000)]
[X86] Add patterns to fold EVEX store with EVEX encoded vcvtps2ph instructions. Remove bad pattern that had vf432 vcvtps2ph storing 128-bits.
llvm-svn: 317662
Craig Topper [Wed, 8 Nov 2017 04:00:30 +0000 (04:00 +0000)]
[X86] Allow legacy vcvtps2ph intrinsics to select EVEX encoded instructions. Rely on EVEX->VEX to convert back.
Missed store folding opportunities will be fixed in a subsequent commit.
llvm-svn: 317661
Rafael Espindola [Wed, 8 Nov 2017 01:50:34 +0000 (01:50 +0000)]
Update for llvm change.
llvm-svn: 317657
Rafael Espindola [Wed, 8 Nov 2017 01:50:29 +0000 (01:50 +0000)]
Convert FileOutputBuffer::commit to Error.
llvm-svn: 317656
Reid Kleckner [Wed, 8 Nov 2017 01:33:15 +0000 (01:33 +0000)]
Revert "[scudo] Make getNumberOfCPUs Fuchsia compliant"
This reverts commit r317604.
Android doesn't have cpu_set_t.
llvm-svn: 317655
Dave Lee [Wed, 8 Nov 2017 01:31:20 +0000 (01:31 +0000)]
Revert "Reapply: Allow yaml2obj to order implicit sections for ELF"
This reverts commit r317646.
llvm-svn: 317654
Rafael Espindola [Wed, 8 Nov 2017 01:10:05 +0000 (01:10 +0000)]
Update unittest too.
llvm-svn: 317651
Rafael Espindola [Wed, 8 Nov 2017 01:05:52 +0000 (01:05 +0000)]
Update for llvm change.
llvm-svn: 317650
Rafael Espindola [Wed, 8 Nov 2017 01:05:44 +0000 (01:05 +0000)]
Convert FileOutputBuffer to Expected. NFC.
llvm-svn: 317649
Eugene Zelenko [Wed, 8 Nov 2017 01:03:16 +0000 (01:03 +0000)]
[Serialization] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).
llvm-svn: 317648
David Blaikie [Wed, 8 Nov 2017 01:01:31 +0000 (01:01 +0000)]
Target/TargetInstrInfo.h -> CodeGen/TargetInstrInfo.h to match layering
This header includes CodeGen headers, and is not, itself, included by
any Target headers, so move it into CodeGen to match the layering of its
implementation.
llvm-svn: 317647
Dave Lee [Wed, 8 Nov 2017 00:58:50 +0000 (00:58 +0000)]
Reapply: Allow yaml2obj to order implicit sections for ELF
Summary:
This change allows yaml input to control the order of implicitly added sections
(`.symtab`, `.strtab`, `.shstrtab`). The order is controlled by adding a
placeholder section of the given name to the Sections field.
This change is to support changes in D39582, where it is desirable to control
the location of the `.dynsym` section.
This reapplied version fixes:
1. use of a function call within an assert
2. failing lld test which has an unnamed section
Additionally, one more test to cover the unnamed section failure.
Reviewers: compnerd, jakehehrlich
Reviewed By: jakehehrlich
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D39749
llvm-svn: 317646
Matt Arsenault [Wed, 8 Nov 2017 00:48:25 +0000 (00:48 +0000)]
AMDGPU: Set correct sched model on v_mad_u64_u32
llvm-svn: 317645
Eugene Zelenko [Wed, 8 Nov 2017 00:39:18 +0000 (00:39 +0000)]
[AST] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).
llvm-svn: 317644
Douglas Yung [Wed, 8 Nov 2017 00:29:42 +0000 (00:29 +0000)]
Fix compile issue on MSVC.
llvm-svn: 317642
Mitch Phillips [Wed, 8 Nov 2017 00:20:53 +0000 (00:20 +0000)]
Revert rL317618
The implemented pass fails and is breaking a large number of unit tests.
Example:
http://lab.llvm.org:8011/builders/clang-with-lto-ubuntu/builds/5777/steps/build-stage3-compiler/logs/stdio
This reverts commit rL317618
llvm-svn: 317641
Evgeniy Stepanov [Wed, 8 Nov 2017 00:15:12 +0000 (00:15 +0000)]
[sanitizer] Asm implementation of syscall() for arm32.
Summary:
These will be used in an ifunc resolver, when the binary may not be
completely relocated, and syscall() function from libc could not be
used.
Reviewers: dvyukov, vitalybuka
Subscribers: aemerson, kubamracek, javed.absar, llvm-commits, kristof.beyls
Differential Revision: https://reviews.llvm.org/D39701
llvm-svn: 317640
Sriraman Tallam [Wed, 8 Nov 2017 00:01:05 +0000 (00:01 +0000)]
Attribute nonlazybind should not affect calls to functions with hidden visibility.
Differential Revision: https://reviews.llvm.org/D39625
llvm-svn: 317639
Evgeniy Stepanov [Tue, 7 Nov 2017 23:51:22 +0000 (23:51 +0000)]
(NFC) Rename GetMax{,User}VirtualAddress.
Future change will introduce GetMaxVirtualAddress that will not take
the kernel area into account.
llvm-svn: 317638
Rafael Espindola [Tue, 7 Nov 2017 23:43:01 +0000 (23:43 +0000)]
Fix unused variable error.
llvm-svn: 317637
Jonathan Peyton [Tue, 7 Nov 2017 23:32:13 +0000 (23:32 +0000)]
Cleanup version symbol macros and attributes/declspecs
1) Get rid of xaliasify, xexpand and xversionify for KMP_EXPAND_NAME and
KMP_VERSION_SYMBOL. KMP_VERSION_SYMBOL is a combination of xaliasify and
xversionify.
2) Put all attribute and __declspec definitions in kmp_os.h
Differential Revision: https://reviews.llvm.org/D39516
llvm-svn: 317636
Bob Haarman [Tue, 7 Nov 2017 23:24:10 +0000 (23:24 +0000)]
[coff] use relative instead of absolute __safe_se_handler_base when present
Summary:
__safe_se_handler_base should be either absolute 0 (when no SafeSEH
table is present), or relative to the image base (when the table is
present). An earlier change inadvertedly made the symbol absolute in
both cases, leading to the SafeSEH table not being locatble at run
time. This change fixes that and updates the safeseh test to check for
the presence of the relocation.
Reviewers: rnk, ruiu
Reviewed By: ruiu
Subscribers: ruiu, llvm-commits
Differential Revision: https://reviews.llvm.org/D39765
llvm-svn: 317635
Paul Robinson [Tue, 7 Nov 2017 23:17:43 +0000 (23:17 +0000)]
Reapply r317609 with a simpler sed script, thanks to Justin Bogner!
llvm-svn: 317634
Rafael Espindola [Tue, 7 Nov 2017 23:12:41 +0000 (23:12 +0000)]
Delete dead code.
llvm-svn: 317633
Rafael Espindola [Tue, 7 Nov 2017 23:09:54 +0000 (23:09 +0000)]
Use std::thread directly.
Now that this code is posix only we don't need to use runBackground.
llvm-svn: 317632
Rafael Espindola [Tue, 7 Nov 2017 23:01:37 +0000 (23:01 +0000)]
Simplify unlinkAsync.
It used to rename the file before removing it in a background thread.
A simpler way to delay the removal is simply to open the file.
Since this is a posix specific issue, simplify the windows
implementation.
llvm-svn: 317631
Dave Lee [Tue, 7 Nov 2017 22:51:27 +0000 (22:51 +0000)]
Revert "Allow yaml2obj to order implicit sections for ELF"
Also, revert "Fix build bots after r317622"
This reverts commit r317622, r317626.
llvm-svn: 317630
Paul Robinson [Tue, 7 Nov 2017 22:39:12 +0000 (22:39 +0000)]
Revert r317609, test fails on one bot
llvm-svn: 317628
Sriraman Tallam [Tue, 7 Nov 2017 22:34:55 +0000 (22:34 +0000)]
Change noplt.c to work for non-x86 targets.
Differential Revision: https://reviews.llvm.org/D39759
llvm-svn: 317627
Dave Lee [Tue, 7 Nov 2017 22:33:07 +0000 (22:33 +0000)]
Fix build bots after r317622
Example build failure: http://lab.llvm.org:8011/builders/lld-x86_64-darwin13/builds/14660
TIL that the warning flags for local builds are loose compared to what build
servers use.
llvm-svn: 317626
Rafael Espindola [Tue, 7 Nov 2017 22:30:53 +0000 (22:30 +0000)]
Delete unused constructor.
llvm-svn: 317625
Pavel Labath [Tue, 7 Nov 2017 22:17:29 +0000 (22:17 +0000)]
Update tuple/list/deque data formatters to work with newest libc++
Summary:
A couple of members of these data structures have been renamed in recent
months. This makes sure they still work with the latest libc++ version.
Reviewers: jingham, EricWF
Subscribers: lldb-commits
Differential Revision: https://reviews.llvm.org/D39602
llvm-svn: 317624
Justin Lebar [Tue, 7 Nov 2017 22:10:54 +0000 (22:10 +0000)]
[NVPTX] Implement __nvvm_atom_add_gen_d builtin.
Summary:
This just seems to have been an oversight. We already supported the f64
atomic add with an explicit scope (e.g. "cta"), but not the scopeless
version.
Reviewers: tra
Subscribers: jholewinski, sanjoy, cfe-commits, llvm-commits, hiraditya
Differential Revision: https://reviews.llvm.org/D39638
llvm-svn: 317623
Dave Lee [Tue, 7 Nov 2017 22:05:24 +0000 (22:05 +0000)]
Allow yaml2obj to order implicit sections for ELF
Summary:
This change allows yaml input to control the order of implicitly added sections
(`.symtab`, `.strtab`, `.shstrtab`). The order is controlled by adding a
placeholder section of the given name to the Sections field.
This change is to support changes in D39582, where it is desirable to control
the location of the `.dynsym` section.
Reviewers: compnerd, jakehehrlich
Reviewed By: jakehehrlich
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D39749
llvm-svn: 317622
Alex Lorenz [Tue, 7 Nov 2017 21:40:11 +0000 (21:40 +0000)]
[ObjC++] Don't warn about pessimizing move for __block variables
rdar://
33316951
llvm-svn: 317620
Dinar Temirbulatov [Tue, 7 Nov 2017 21:25:34 +0000 (21:25 +0000)]
[SLPVectorizer] Failure to beneficially vectorize 'copyable' elements in integer binary ops.
Patch tries to improve vectorization of the following code:
void add1(int * __restrict dst, const int * __restrict src) {
*dst++ = *src++;
*dst++ = *src++ + 1;
*dst++ = *src++ + 2;
*dst++ = *src++ + 3;
}
Allows to vectorize even if the very first operation is not a binary add, but just a load.
Fixed PR34619 and other issues related to previous commit.
Reviewers: spatel, mzolotukhin, mkuper, hfinkel, RKSimon, filcab, ABataev
Reviewed By: ABataev, RKSimon
Subscribers: llvm-commits, RKSimon
Differential Revision: https://reviews.llvm.org/D28907
llvm-svn: 317618
Mitch Phillips [Tue, 7 Nov 2017 21:16:46 +0000 (21:16 +0000)]
Extend SpecialCaseList to allow users to blame matches on entries in the file.
Summary:
Extends SCL functionality to allow users to find the line number in the file the SCL is built from through SpecialCaseList::inSectionBlame(...).
Also removes the need to compile the SCL before use. As the matcher now contains a list of regexes to test against instead of a single regex, the regexes can be individually built on each insertion rather than one large compilation at the end of construction.
This change also fixes a bug where blank lines would cause the parser to become out-of-sync with the line number. An error on line `k` was being reported as being on line `k - num_blank_lines_before_k`.
Note: This change has a cyclical dependency on D39486. Both these changes must be submitted at the same time to avoid a build breakage.
Reviewers: vlad.tsyrklevich
Reviewed By: vlad.tsyrklevich
Subscribers: kcc, pcc, llvm-commits
Differential Revision: https://reviews.llvm.org/D39485
llvm-svn: 317617
Mitch Phillips [Tue, 7 Nov 2017 21:16:37 +0000 (21:16 +0000)]
Update SanitizerSpecialCaseList to use renamed functions in base class.
Note: This change has a cyclical dependency on D39485. Both these changes must be submitted at the same time to avoid a build breakage.
Reviewers: vlad.tsyrklevich
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D39486
llvm-svn: 317616
Craig Topper [Tue, 7 Nov 2017 20:56:17 +0000 (20:56 +0000)]
[CodeGenPrepare] Fix typo in comment. NFC
llvm-svn: 317614
Graham Yiu [Tue, 7 Nov 2017 20:55:43 +0000 (20:55 +0000)]
Use new vector insert half-word and byte instructions when we see insertelement on '8 x i16' and '16 x i8' types. Also extended existing lit testcase to cover these cases.
Differential Revision: https://reviews.llvm.org/D34630
llvm-svn: 317613
Paul Robinson [Tue, 7 Nov 2017 20:35:44 +0000 (20:35 +0000)]
Convert a dwarfdump test from checked-in binary to assembler source.
llvm-svn: 317612
Eric Fiselier [Tue, 7 Nov 2017 20:26:23 +0000 (20:26 +0000)]
Teach test suite about C++2a dialect flag.
This patch teaches the test suite configuration about the -std=c++2a
flag. And, since it's the newest dialect, change the test suite to
choose it, if possible, by default.
llvm-svn: 317611
Eric Fiselier [Tue, 7 Nov 2017 20:20:58 +0000 (20:20 +0000)]
Change test suite to support c++17 dialect flag instead of c++1z.
This patch changes the test suite to attempt and prefer -std=c++17 over
-std=c++1z. It also fixes the REQUIRES and UNSUPPORTED lit markers
to refer to c++17 over c++1z.
llvm-svn: 317610
Paul Robinson [Tue, 7 Nov 2017 20:12:58 +0000 (20:12 +0000)]
[DWARFv5] Add new test for previous commit.
llvm-svn: 317609
Vitaly Buka [Tue, 7 Nov 2017 20:10:17 +0000 (20:10 +0000)]
[sanitizer] Fix sanitizer_common compile errors on gcc trunk
Summary:
When testing a merge of compiler-rt r304709 into gcc trunk on x86-64-pc-linux-gnu,
I ran into two compile errors:
sanitizer_common/sanitizer_symbolizer_libbacktrace.cc:96:73: error: no matching function for call to '__sanitizer::AddressInfo::FillModuleInfo(char*&, __sanitizer::uptr&)'
All other files in sanitizer_common (with the exception of sanitizer_malloc_mac.inc
which is special) include sanitizer_platform.h without directory name.
Patch by Mike Jongen
Reviewers: kcc, vitalybuka
Reviewed By: kcc
Subscribers: kubamracek, fedor.sergeev, llvm-commits
Differential Revision: https://reviews.llvm.org/D33933
llvm-svn: 317608
Paul Robinson [Tue, 7 Nov 2017 19:57:12 +0000 (19:57 +0000)]
[DWARFv5] Support DW_FORM_strp in the .debug_line header.
Supporting this form in .debug_line.dwo will be done as a follow-up.
Differential Revision: https://reviews.llvm.org/D33155
llvm-svn: 317607
Sriraman Tallam [Tue, 7 Nov 2017 19:37:51 +0000 (19:37 +0000)]
New clang option -fno-plt which avoids the PLT and lazy binding while making external calls.
Differential Revision: https://reviews.llvm.org/D39079
llvm-svn: 317605
Kostya Kortchinsky [Tue, 7 Nov 2017 19:30:08 +0000 (19:30 +0000)]
[scudo] Make getNumberOfCPUs Fuchsia compliant
Summary: This change allows Fuchsia to boot properly using the Scudo allocator.
Reviewers: cryptoad, alekseyshl, krytarowski
Reviewed By: cryptoad, krytarowski
Subscribers: krytarowski, kubamracek, llvm-commits
Differential Revision: https://reviews.llvm.org/D39490
llvm-svn: 317604
Sam Clegg [Tue, 7 Nov 2017 19:03:11 +0000 (19:03 +0000)]
[WebAssembly] Include GENERIC_TF_SOURCES in wasm builds
Differential Revision: https://reviews.llvm.org/D39748
llvm-svn: 317601
Craig Topper [Tue, 7 Nov 2017 18:47:24 +0000 (18:47 +0000)]
Recommit r317510 "[InstCombine] Pull shifts through a select plus binop with constant"
The hexagon test should be fixed now.
Original commit message:
This pulls shifts through a select+binop with a constant where the select conditionally executes the binop. We already do this for just the binop, but not with the select.
This can allow us to get the select closer to other selects to enable removing one.
Differential Revision: https://reviews.llvm.org/D39222
llvm-svn: 317600
Alex Lorenz [Tue, 7 Nov 2017 18:30:23 +0000 (18:30 +0000)]
[refactor] rename field references in __builtin_offsetof
rdar://
33875453
llvm-svn: 317599
George Rokos [Tue, 7 Nov 2017 18:27:04 +0000 (18:27 +0000)]
Clang/libomptarget map interface flag renaming - NFC patch
This patch renames some of the flag names of the clang/libomptarget map interface. The old names are slightly misleading, whereas the new ones describe in a better way what each flag is about.
Only the macros within the enumeration are renamed, there is no change in functionality therefore there are no updated regression tests.
Differential Revision: https://reviews.llvm.org/D39745
llvm-svn: 317598
Alex Lorenz [Tue, 7 Nov 2017 18:25:36 +0000 (18:25 +0000)]
[index] __builtin_offset's field reference is located at the end location
The starting location is the location of the '.'
llvm-svn: 317596
Craig Topper [Tue, 7 Nov 2017 17:37:32 +0000 (17:37 +0000)]
[InstCombine] Update stale comment. NFC
Datalayout is no longer optional so the comment didn't match what the code currently does.
llvm-svn: 317594
Alex Lorenz [Tue, 7 Nov 2017 17:29:11 +0000 (17:29 +0000)]
[index] index field references in __builtin_offset
rdar://
35109556
llvm-svn: 317593
Krzysztof Parzyszek [Tue, 7 Nov 2017 17:05:54 +0000 (17:05 +0000)]
[Hexagon] Make a test more flexible in HexagonLoopIdiomRecognition
An "or" that sets the sign-bit can be replaced with a "xor", if
the sign-bit was known to be clear before. With some changes to
instruction combining, the simple sign-bit check was failing.
Replace it with a more flexible one to catch more cases.
llvm-svn: 317592
Florian Hahn [Tue, 7 Nov 2017 16:58:13 +0000 (16:58 +0000)]
[AArch64][SVE] Asm: Add support for (ADD|SUB)_ZZZ
Patch [5/5] in a series to add assembler/disassembler support for AArch64 SVE unpredicated ADD/SUB instructions.
Patch by Sander De Smalen.
Reviewed by: rengolin
Differential Revision: https://reviews.llvm.org/D39091
llvm-svn: 317591
Florian Hahn [Tue, 7 Nov 2017 16:45:48 +0000 (16:45 +0000)]
[AArch64][SVE] Asm: Add SVE (Z) Register definitions and parsing support
Patch [3/5] in a series to add assembler/disassembler support for AArch64 SVE unpredicated ADD/SUB instructions.
To summarise, this patch adds:
* SVE register definitions
* Methods to parse SVE register operands
* Methods to print SVE register operands
* RegKind SVEDataVector to distinguish it from other data types like scalar register or Neon vector.
* k_SVEDataRegister and SVEDataRegOp to describe SVE registers (which will be extended by further patches with e.g. ElementWidth and the shift-extend type).
Patch by Sander De Smalen.
Reviewed by: rengolin
Differential Revision: https://reviews.llvm.org/D39089
llvm-svn: 317590