Ed Maste [Tue, 28 Jul 2015 16:11:12 +0000 (16:11 +0000)]
Update xcode for r243427
llvm-svn: 243432
Piotr Padlewski [Tue, 28 Jul 2015 16:10:58 +0000 (16:10 +0000)]
Getting rid of old iterator loops
llvm-svn: 243431
Bruno Cardoso Lopes [Tue, 28 Jul 2015 15:53:21 +0000 (15:53 +0000)]
[LVI] Cleanup whitespaces. NFC
llvm-svn: 243430
Manuel Klimek [Tue, 28 Jul 2015 15:50:24 +0000 (15:50 +0000)]
Do not force linebreaks when MaxEmptyLinesToKeep is 0.
Previously we would format
call(
p);
as
call(
p);
with MaxEmptyLinesToKeep == 0.
Now we format it as:
call(p);
llvm-svn: 243429
Ed Maste [Tue, 28 Jul 2015 15:48:38 +0000 (15:48 +0000)]
Remove two additional files missed in r243427
llvm-svn: 243428
Ed Maste [Tue, 28 Jul 2015 15:45:57 +0000 (15:45 +0000)]
Remove POSIX thread/process abstraction
As of r240543 ProcessPOSIX and POSIXThread are used only on FreeBSD, so
just roll them into ProcessFreeBSD and FreeBSDThread.
Differential Revision: http://reviews.llvm.org/D10698
llvm-svn: 243427
Kuba Brecka [Tue, 28 Jul 2015 15:43:45 +0000 (15:43 +0000)]
Fix typo from r243418. Should fix the failing `abort_on_error.cc` test.
See http://reviews.llvm.org/D7203
llvm-svn: 243426
Benjamin Kramer [Tue, 28 Jul 2015 15:40:11 +0000 (15:40 +0000)]
[CodeGen] Clean up CGBuiltin a bit.
- Use cached LLVM types
- Turn SmallVectors into Arrays/ArrayRef if the size is static
- Use ConstantInt::get's implicit splatting for vector types
No functionality change intended.
llvm-svn: 243425
Sanjay Patel [Tue, 28 Jul 2015 15:38:43 +0000 (15:38 +0000)]
fix formatting; NFC
llvm-svn: 243424
Kuba Brecka [Tue, 28 Jul 2015 15:35:04 +0000 (15:35 +0000)]
Applying the Darwin-specific default lit ASAN_OPTIONS to UBSan+ASan tests as
well. Should fix the test failures after r243418, see review at
http://reviews.llvm.org/D7203.
llvm-svn: 243423
Geoff Berry [Tue, 28 Jul 2015 15:24:10 +0000 (15:24 +0000)]
[AArch64] Match float round and convert to int instructions.
Summary:
Add patterns for doing floating point round with various rounding modes
followed by conversion to int as a single FCVT* instruction.
Reviewers: t.p.northover, jmolloy
Subscribers: aemerson, rengolin, mcrosier, llvm-commits
Differential Revision: http://reviews.llvm.org/D11424
llvm-svn: 243422
Pavel Labath [Tue, 28 Jul 2015 15:13:23 +0000 (15:13 +0000)]
Fix typo in gdbremote.py
llvm-svn: 243421
Tobias Grosser [Tue, 28 Jul 2015 14:53:44 +0000 (14:53 +0000)]
Keep track of ScopArrayInfo objects that model PHI node storage
Summary:
When translating PHI nodes into memory dependences during code generation we
require two kinds of memory. 'Normal memory' as for all scalar dependences and
'PHI node memory' to store the incoming values of the PHI node. With this
patch we now mark and track these two kinds of memories, which we previously
incorrectly marked as a single memory object.
Being aware of PHI node storage makes code generation easier, as we do not need
to guess what kind of storage a scalar reference requires. This simplifies the
code nicely.
Reviewers: jdoerfert
Subscribers: pollydev, llvm-commits
Differential Revision: http://reviews.llvm.org/D11554
llvm-svn: 243420
Douglas Katzman [Tue, 28 Jul 2015 14:43:53 +0000 (14:43 +0000)]
Use a specified list of languages in cmake project() command.
This allows asm files and Cxx files to be compiled with different flags
rather than treating them identically. LLVM itself has no asm files
other than tests, but this setting is inherited by the compiler-rt
project (unless compiled standalone), which does have asm files.
Differential Revision: http://reviews.llvm.org/D10707
llvm-svn: 243419
Kuba Brecka [Tue, 28 Jul 2015 14:34:13 +0000 (14:34 +0000)]
[asan] Set abort_on_error=1 by default on OS X
This sets the default ASan flags to abort_on_error=1 on OS X. For unit tests and lit tests we set ASAN_OPTIONS back to abort_on_error=0 before running the tests (to avoid crashing). I added two tests that intentionally don't respect the default ASAN_OPTIONS to test the behavior of an empty ASAN_OPTIONS (on OS X we should crash, on Linux we should exit()).
Differential Revision: http://reviews.llvm.org/D7203
llvm-svn: 243418
Kristof Beyls [Tue, 28 Jul 2015 14:23:47 +0000 (14:23 +0000)]
RegParmMax must be 0 for AArch64, as the regparm function attribute is not supported on AArch64.
llvm-svn: 243417
Silviu Baranga [Tue, 28 Jul 2015 13:44:08 +0000 (13:44 +0000)]
[LAA] Add clarifying comments for the checking pointer grouping algorithm. NFC
llvm-svn: 243416
Marshall Clow [Tue, 28 Jul 2015 13:30:47 +0000 (13:30 +0000)]
Consolidate a bunch of #ifdef _LIBCPP_NO_EXCEPTIONS .. #endif blocks into a single template function. NFC
llvm-svn: 243415
Daniel Jasper [Tue, 28 Jul 2015 13:19:12 +0000 (13:19 +0000)]
misc-unused-parameters: Only remove parameters in the main source file.
In headers, they might always be pulled in to different TUs, even if
they are declared static or nested in an unnamed namespace.
llvm-svn: 243414
Adhemerval Zanella [Tue, 28 Jul 2015 13:10:10 +0000 (13:10 +0000)]
[AArch64] Implement __builtin_thread_pointer
This path add the aarch64 __builtin_thread_pointer support. It will be
lowered to llvm.aarch64.thread.pointer.
llvm-svn: 243413
Adhemerval Zanella [Tue, 28 Jul 2015 13:03:31 +0000 (13:03 +0000)]
Implement __builtin_thread_pointer
This path add the aarch64 lowering of __builtin_thread_pointer. It uses
the already implemented AArch64ISD::THREAD_POINTER used in TLS generation.
llvm-svn: 243412
Tobias Grosser [Tue, 28 Jul 2015 12:51:23 +0000 (12:51 +0000)]
Do not compile GPU library with sanitizers
llvm-svn: 243411
Tobias Grosser [Tue, 28 Jul 2015 12:12:04 +0000 (12:12 +0000)]
Extend documentation of scalar code generation [NFC]
No functional change intended
--
Reviewers: jdoerfert
Projects: #polly
Differential Revision: http://reviews.llvm.org/D11536
llvm-svn: 243410
Asaf Badouh [Tue, 28 Jul 2015 12:04:40 +0000 (12:04 +0000)]
[X86][AVX512VL] add AVX512VL intrinsics 4 out of 4
Differential Revision: http://reviews.llvm.org/D11526
llvm-svn: 243409
Martell Malone [Tue, 28 Jul 2015 11:43:37 +0000 (11:43 +0000)]
docs: update arcanist links
Summary:
I need a test commit for using arc.
This seems like an appropriate commit to use as a test
We may want to port this commit back to 3.7 also
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D11527
llvm-svn: 243408
Asaf Badouh [Tue, 28 Jul 2015 11:14:09 +0000 (11:14 +0000)]
[X86][AVX512VL] add AVX512VL intrinsics 3 out of 4
http://reviews.llvm.org/D11526
llvm-svn: 243406
Chandler Carruth [Tue, 28 Jul 2015 11:11:11 +0000 (11:11 +0000)]
[GMR] Teach GlobalsModRef to distinguish an important and safe case of
no-alias with non-addr-taken globals: they cannot alias a captured
pointer.
If the non-global underlying object would have been a capture were it to
alias the global, we can firmly conclude no-alias. It isn't reasonable
for a transformation to introduce a capture in a way observable by an
alias analysis. Consider, even if it were to temporarily capture one
globals address into another global and then restore the other global
afterward, there would be no way for the load in the alias query to
observe that capture event correctly. If it observes it then the
temporary capturing would have changed the meaning of the program,
making it an invalid transformation. Even instrumentation passes or
a pass which is synthesizing stores to global variables to expose race
conditions in programs could not trigger this unless it queried the
alias analysis infrastructure mid-transform, in which case it seems
reasonable to return results from before the transform started.
See the comments in the change for a more detailed outlining of the
theory here.
This should address the primary performance regression found when the
non-conservatively-correct path of the alias query was disabled.
Differential Revision: http://reviews.llvm.org/D11410
llvm-svn: 243405
Daniel Jasper [Tue, 28 Jul 2015 10:39:25 +0000 (10:39 +0000)]
misc-unused-parameters: Properly handle static class members.
Not sure why I wrote what I wrote before.
llvm-svn: 243403
Asaf Badouh [Tue, 28 Jul 2015 10:30:56 +0000 (10:30 +0000)]
[X86][AVX512VL] add AVX512VL intrinsics 2 out of 4
http://reviews.llvm.org/D11526
llvm-svn: 243402
Renato Golin [Tue, 28 Jul 2015 10:24:11 +0000 (10:24 +0000)]
Improving lli documentation
Too many people hope lli would act as an emulator when it's actually
just a tool to help prototype IR code and test the JIT compiler. This
commit makes that fact explicit in the documentation
It also migrates the old style bold/italic doc tags to the preferred
meta tags (.. option::, :program:, etc).
No errors when generating the documents, visual inspection in the HTML
result doesn't show any major difference, apart from the slight style
change.
llvm-svn: 243401
Pavel Labath [Tue, 28 Jul 2015 09:18:32 +0000 (09:18 +0000)]
Fix warnings detected by -Wpessimizing-move
patch by Eugene Zelenko
Differential Revision: http://reviews.llvm.org/D11429
llvm-svn: 243399
Alexandros Lamprineas [Tue, 28 Jul 2015 09:08:03 +0000 (09:08 +0000)]
Use TargetParser to parse -mhwdiv command line option in Driver.
Change-Id: I2ebc40f77af75ec6b43ce8364d6d5a1d29988bd6
Phabricator: http://reviews.llvm.org/D11501
llvm-svn: 243398
Pavel Labath [Tue, 28 Jul 2015 09:06:56 +0000 (09:06 +0000)]
[LLGS] Avoid bogus error message on process termination
Summary:
Handle_k was printing an error when killing a process because KillSpawnedProcess was expecting to
be asynchronously notified of the process death, which no longer works, since we don't wait for
the process on a separate thread. However, the whole usage of KillSpawnedProcess is dubious here,
since it tries to be nice and terminate the process first with SIGTERM, which will not have the
intended effect on a ptraced process. I replace this code with a call to
NativeProcessProtocol::Kill, which does not suffer from these problems.
Reviewers: chaoren, ovyalov
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D11520
llvm-svn: 243397
Michael Kuperstein [Tue, 28 Jul 2015 08:56:13 +0000 (08:56 +0000)]
[X86] Remove mergeSPUpdatesUp()
X86FrameLowering has both a mergeSPUpdates() that accepts a direction, and an
mergeSPUpdatesUp(), which seem to do the same thing, except for a slightly
different interface. Removed the less general function.
NFC.
Differential Revision: http://reviews.llvm.org/D11510
llvm-svn: 243396
Simon Pilgrim [Tue, 28 Jul 2015 08:54:41 +0000 (08:54 +0000)]
[X86][SSE] Use bitmasks instead of shuffles where possible.
VPAND is a lot faster than VPSHUFB and VPBLENDVB - this patch ensures we attempt to lower to a basic bitmask before lowering to the slower byte shuffle/blend instructions.
Split off from D11518.
Differential Revision: http://reviews.llvm.org/D11541
llvm-svn: 243395
Asaf Badouh [Tue, 28 Jul 2015 08:26:14 +0000 (08:26 +0000)]
[X86][AVX512VL] add AVX512VL intrinsics 1 out of 4
http://reviews.llvm.org/D11526
llvm-svn: 243394
Eric Fiselier [Tue, 28 Jul 2015 07:49:15 +0000 (07:49 +0000)]
Mark async tests as UNSUPPORTED in C++03 because it requires variadics
llvm-svn: 243393
Eric Fiselier [Tue, 28 Jul 2015 07:31:50 +0000 (07:31 +0000)]
Fix a handful of tests that fail in C++03
llvm-svn: 243392
Igor Breger [Tue, 28 Jul 2015 07:00:00 +0000 (07:00 +0000)]
AVX512: Add encoding tests to vptestnm instructions
Differential Revision: http://reviews.llvm.org/D11521
llvm-svn: 243391
Igor Breger [Tue, 28 Jul 2015 06:53:28 +0000 (06:53 +0000)]
AVX512: Implemented encoding and intrinsics for VGETEXPSS/D instructions
Added tests for intrinsics and encoding.
Differential Revision: http://reviews.llvm.org/D11528
llvm-svn: 243390
Puyan Lotfi [Tue, 28 Jul 2015 06:38:41 +0000 (06:38 +0000)]
Changes for MachineBasicBlock to use SortedVector for LiveIns.
llvm-svn: 243389
Mehdi Amini [Tue, 28 Jul 2015 06:18:04 +0000 (06:18 +0000)]
Move the Target way of overriding DAG Scheduler to a target hook
Summary:
The previous way of overriding it was relying on calling "setDefault"
on the global registry, which implies global mutable state.
Reviewers: echristo, atrick
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D11538
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 243388
Argyrios Kyrtzidis [Tue, 28 Jul 2015 06:12:24 +0000 (06:12 +0000)]
[sema] Fix crash when typo-transforming an expression containing an ObjC super message expression.
rdar://
21427916
llvm-svn: 243387
Puyan Lotfi [Tue, 28 Jul 2015 06:04:00 +0000 (06:04 +0000)]
Adding ADT SortedVector; client patch will follow.
llvm-svn: 243386
Chandler Carruth [Tue, 28 Jul 2015 06:01:57 +0000 (06:01 +0000)]
[GMR] Fix a long-standing bug in GlobalsModRef where it failed to clear
out the per-function modref data structures when functions were deleted
or when globals were deleted.
I don't actually know how the global deletion side of this bug hasn't
been hit before, but for the other it just-so-happens that functions
aren't likely to be deleted in the particular part of the LTO pipeline
where we currently enable GMR, so we got lucky.
With this patch, I can self-host with GMR enabled in the normal pass
pipeline!
I was a bit concerned about the compile-time impact of this chang, which
is part of what motivated my prior string of patches to make the
per-function datastructure very dense and fast to walk. With those
changes in place, I can't measure a significant compile time difference
(the difference is around 0.1% which is *way* below the noise) before
and after this patch when building a linked bitcode for all of Clang.
Differential Revision: http://reviews.llvm.org/D11453
llvm-svn: 243385
Sagar Thakur [Tue, 28 Jul 2015 05:51:51 +0000 (05:51 +0000)]
[UBSan][MIPS] Fix cast-overflow tests for mips big endian
This fixes the bug https://llvm.org/bugs/show_bug.cgi?id=24152
The float value resides in the first 4 bytes of ValueHandle for both mips and mipsel.
Reviewers: dsanders, samsonov
Subscibers: rsmith, hans, mohit.bhakkad, jaydeep, llvm-commits
Differential: http://reviews.llvm.org/D11448
llvm-svn: 243384
Ilia K [Tue, 28 Jul 2015 05:43:47 +0000 (05:43 +0000)]
Support escapes and quotes in string and character values.
Summary:
Escape characters in strings and strings containing quotes were not appearing correctly in expression values.
Patch from paulmay@microsoft.com
Reviewers: abidh, ChuckR, paulmaybee
Subscribers: greggm, lldb-commits
Differential Revision: http://reviews.llvm.org/D11371
llvm-svn: 243383
Adam Nemet [Tue, 28 Jul 2015 05:01:53 +0000 (05:01 +0000)]
[LDist][LVer] Explicitly pass the set of memchecks to LoopVersioning, NFC
Before the patch, the checks were generated internally in
addRuntimeCheck. Now, we use the new overloaded version of
addRuntimeCheck that takes the ready-made set of checks as a parameter.
The checks are now generated by the client (LoopDistribution) with the
new RuntimePointerChecking::generateChecks API.
Also the new printChecks API is used to print out the checks for
debugging.
This is to continue the transition over to the new model whereby clients
will get the full set of checks from LAA, filter it and then pass it to
LoopVersioning and in turn to addRuntimeCheck.
llvm-svn: 243382
Yaron Keren [Tue, 28 Jul 2015 04:54:03 +0000 (04:54 +0000)]
Make local function isWhitespaceExceptNL static instead of in anonymous namespace
per the coding standard. Thanks Craig Tooper for noticing this.
llvm-svn: 243381
Craig Topper [Tue, 28 Jul 2015 04:28:46 +0000 (04:28 +0000)]
Remove unnecessary const_casts. NFC
llvm-svn: 243380
Bob Wilson [Tue, 28 Jul 2015 04:05:45 +0000 (04:05 +0000)]
Reserve some constant values for the Swift calling convention.
Swift has a custom calling convention that also requires some new flags
on arguments and one new attribute on alloca instructions. This patch
does not include the implementation of that calling convention - that
will be provided as part of the open-source release of Swift; this only
reserves the bitcode constant values so that they are not used for
other purposes.
llvm-svn: 243379
Sanjoy Das [Tue, 28 Jul 2015 03:50:09 +0000 (03:50 +0000)]
FileCheck'ify some wc/grep based tests; NFCI.
llvm-svn: 243378
Rui Ueyama [Tue, 28 Jul 2015 03:40:58 +0000 (03:40 +0000)]
COFF: Update README to mention that it now supports 32-bit x86.
The linker is now able to link not only LLVM/Clang/LLD for x86 but
even larger programs. I confirmed that it successsfully linked Chrome
for x86. Because the browser is a pretty large program, I think I can
say that the linker is now mostly feature complete. (I'm pretty sure
that there are hidden bugs somewhere, but they shouldn't be significant.)
llvm-svn: 243377
Nico Weber [Tue, 28 Jul 2015 03:37:54 +0000 (03:37 +0000)]
Fix what looks like accidentally repeated file contents. No behavior change.
llvm-svn: 243376
Rui Ueyama [Tue, 28 Jul 2015 03:24:23 +0000 (03:24 +0000)]
COFF: Do not ignore /merge if /debug is specified.
Previously, we ignore /merge option if /debug is specified
because I thought that was MSVC linker did. This was wrong.
/merge shouldn't be ignored even in debug mode.
llvm-svn: 243375
Rui Ueyama [Tue, 28 Jul 2015 03:15:57 +0000 (03:15 +0000)]
COFF: /HighEntropyVA is on by default only on 64-bit.
llvm-svn: 243374
Rui Ueyama [Tue, 28 Jul 2015 03:12:00 +0000 (03:12 +0000)]
COFF: Add /LargeAddressAware command line option.
llvm-svn: 243373
Rui Ueyama [Tue, 28 Jul 2015 02:54:18 +0000 (02:54 +0000)]
COFF: Fix 32-bit delay-import address table.
The address table entry is 32-bit wide on 32-bit and 64-bit on 64-bit.
Previously, it was 64-bit even on 32-bit.
llvm-svn: 243372
Nico Weber [Tue, 28 Jul 2015 02:37:37 +0000 (02:37 +0000)]
Split -Wmicrosoft into many specific warnings.
Also move "pragma comment" warning from -Wmicrosoft to -Wignored-pragmas.
-Wmicrosoft currently covers many different areas, some more useful than
others. Split it into many targeted flags, so that projects can choose to
enable only a subset of these warnings. This is also useful for incrementally
fixing and turning on these warnings.
-Wno-microsoft still disables all these warnings, and -Wmicrosoft still enables
them all. After this change, it's possible to pass `-Wno-microsoft
-Wmicrosoft-unqualified-friend` to only enable -Wmicrosoft-unqualified-friend,
and `-Wmicrosoft -Wno-microsoft-unqualified-friend` to enable all other
Microsoft warnings.
I put all the template-related warnings behind -Wmicrosoft-template; if that
turns out to be too coarse we can make that finer later on. (In practice, I
haven't seen the template-related warnings fire frequently.)
Reviewed at http://reviews.llvm.org/D11504
llvm-svn: 243371
Eric Fiselier [Tue, 28 Jul 2015 02:15:53 +0000 (02:15 +0000)]
Cleanup C++03 __invoke for Bullets 3 and 4.
The key changes in this patch are:
1. Remove the zero-argument overload in mem_fn. A member function must always
be invoked with at least one argument, the class instance. The zero-argument
operator()() in mem_fn would cause mem_fn to fail to compile when because
the call to '__invoke(pm)' is not well formed.
2. Prevent evaluation of '__apply_cv<Tp, Ret>' when 'Ret' is a function type.
'Ret' is a function type whenever 'Ret Tp::*' is a pointer to member function.
Attempting to add cv and ref qualifiers to a function type can cause a hard
compile error.
3. Remove the dummy overload __invoke(Rp Tp::*). It was present to help work
around #1. It will be replaced with a different '__invoke' overload that
represents a bad call to invoke.
After applying this patch the test func.wrap.func.inv/invoke.pass.cpp now
passes.
llvm-svn: 243370
Enrico Granata [Tue, 28 Jul 2015 02:13:03 +0000 (02:13 +0000)]
There is no reason why this formatter should not cascade. Make it cascade
llvm-svn: 243369
Eric Fiselier [Tue, 28 Jul 2015 01:52:08 +0000 (01:52 +0000)]
Get C++03 __invoke working for bullet 5 of INVOKE.
This patch does a couple of things to get __invoke working for free-functions
and call objects.
1. Turn all uses of declval<Tp>() into declval<Tp&>(). The C++03 __invoke only
supports lvalues but it will be used when the compiler supports rvalue
references but not variadic templates. This change makes sure we don't
generate an rvalue.
2. Call objects for bullet 5 are now passed by reference and not value. Copying
the functor is incorrect. It will fail to compile for non-copyable functors
and it will discard cv-qualifiers on the call object, possibly leading to the
wrong function being called. I suspect that the reason the call object
was originally taken by value was to support temporary call objects.
However __invoke is only used internally and it is never given a temporary.
llvm-svn: 243368
Enrico Granata [Tue, 28 Jul 2015 01:45:23 +0000 (01:45 +0000)]
Second attempt at the fix for the recursion in ValueObjectChild::CanUpdateWithInvalidExecutionContext()
This one should prevent the previous issues, and be the one true fix for rdar://
21949558
llvm-svn: 243367
Eric Fiselier [Tue, 28 Jul 2015 01:25:36 +0000 (01:25 +0000)]
Checking more __invoke tests.
Before I start trying to fix __invoke in C++03 it needs better test coverage.
This patch adds a large amount of tests for __invoke.
llvm-svn: 243366
Kostya Serebryany [Tue, 28 Jul 2015 01:25:00 +0000 (01:25 +0000)]
[libFuzzer] ensure that the dfsan tracing hooks actually run (using -verbosity=3 in tests)
llvm-svn: 243365
Rui Ueyama [Tue, 28 Jul 2015 01:06:58 +0000 (01:06 +0000)]
COFF: Skip non-DWARF debug info sections.
Leaving them in an executable is basically harmless but wastes disk space.
Because no one is using non-DWARF debug info linked by LLD, we can just
remove them.
llvm-svn: 243364
Kostya Serebryany [Tue, 28 Jul 2015 00:59:53 +0000 (00:59 +0000)]
[libFuzzer] when using cmp traces, first check that the CMP is evaluated to one value much more frequently than to the other value (heuristic)
llvm-svn: 243363
Kostya Serebryany [Tue, 28 Jul 2015 00:57:07 +0000 (00:57 +0000)]
[dfsan/libFuzzer] correctly ignore sanitizer coverage calls in dfsan
llvm-svn: 243362
Sanjay Patel [Tue, 28 Jul 2015 00:48:32 +0000 (00:48 +0000)]
fix invalid load folding with SSE/AVX FP logical instructions (PR22371)
This is a follow-up to the FIXME that was added with D7474 ( http://reviews.llvm.org/rL229531 ).
I thought this load folding bug had been made hard-to-hit, but it turns out to be very easy
when targeting 32-bit x86 and causes a miscompile/crash in Wine:
https://bugs.winehq.org/show_bug.cgi?id=38826
https://llvm.org/bugs/show_bug.cgi?id=22371#c25
The quick fix is to simply remove the scalar FP logical instructions from the load folding table
in X86InstrInfo, but that causes us to miss load folds that should be possible when lowering fabs,
fneg, fcopysign. So the majority of this patch is altering those lowerings to use *vector* FP
logical instructions (because that's all x86 gives us anyway). That lets us do the load folding
legally.
Differential Revision: http://reviews.llvm.org/D11477
llvm-svn: 243361
Justin Bogner [Tue, 28 Jul 2015 00:41:51 +0000 (00:41 +0000)]
InstrProf: Fix a misuse of the FunctionDecl API when generating coverage
This was calling FD->hasBody(), meaning "Does the function that this
decl refers to have a body?", rather than
FD->doesThisDeclarationHaveABody(), meaning "Is this decl a
non-deleted definition?".
We might want to consider renaming these APIs :/
llvm-svn: 243360
Evgeniy Stepanov [Tue, 28 Jul 2015 00:29:47 +0000 (00:29 +0000)]
[sanitizer] Fix FreeBSD build of sanitizer_common.
Broken in r243051.
llvm-svn: 243359
Rui Ueyama [Tue, 28 Jul 2015 00:17:25 +0000 (00:17 +0000)]
Use SmallDenseMap instead of std::map where we don't care about order of keys.
llvm-svn: 243358
Sanjoy Das [Tue, 28 Jul 2015 00:13:42 +0000 (00:13 +0000)]
[LSR] Move X86 specific test case to X86/
rL243348 added the test case in the wrong directory.
llvm-svn: 243357
David Blaikie [Tue, 28 Jul 2015 00:06:38 +0000 (00:06 +0000)]
[opaque pointer type] Avoid using pointee types to retrieve InlineAsm's function type
As a stop-gap, retrieving the InlineAsm's function type was done via the
pointee type of its (pointer) Value type.
Instead, pass down and store the FunctionType in the InlineAsm object.
The only wrinkle with this is the ConstantUniqueMap, which then needs to
ferry the FunctionType down through the InlineAsmKeyType. This could be
done a bit differently if the ConstantInfo trait were broadened a bit to
provide an extension point for access to the TypeClass object from the
ValType objects, so that the ConstantUniqueMap<InlineAsm> would then be
keyed on FunctionTypes instead of PointerTypes that point to
FunctionTypes.
This drops the number of IR tests that don't roundtrip through bitcode*
without calling PointerType::getElementType from 416 to 8 (out of
10733). 3 of those crash when roundtripping at ToT anyway.
* modulo various unavoidable uses of pointer types when validating IR
(for now) and in the way globals are parsed, unfortunately. These
cases will either go away (because such validation will no longer be
necessary or possible when pointee types are opaque), or have to be
made simultaneously with the removal of pointee types.
llvm-svn: 243356
Argyrios Kyrtzidis [Tue, 28 Jul 2015 00:01:13 +0000 (00:01 +0000)]
[test] Follow-up for r243343, also add a test case using an enum for designated enum.
llvm-svn: 243355
Adam Nemet [Mon, 27 Jul 2015 23:54:41 +0000 (23:54 +0000)]
[LAA] Split out a helper to print a collection of memchecks
This is effectively an NFC but we can no longer print the index of the
pointer group so instead I print its address. This still lets us
cross-check the section that list the checks against the section that
list the groups (see how I modified the test).
E.g. before we printed this:
Run-time memory checks:
Check 0:
Comparing group 0:
%arrayidxC = getelementptr inbounds i16, i16* %c, i64 %store_ind
%arrayidxC1 = getelementptr inbounds i16, i16* %c, i64 %store_ind_inc
Against group 1:
%arrayidxA = getelementptr i16, i16* %a, i64 %ind
%arrayidxA1 = getelementptr i16, i16* %a, i64 %add
...
Grouped accesses:
Group 0:
(Low: %c High: (78 + %c))
Member: {%c,+,4}<%for.body>
Member: {(2 + %c),+,4}<%for.body>
Now we print this (changes are underlined):
Run-time memory checks:
Check 0:
Comparing group (0x7f9c6040c320):
~~~~~~~~~~~~~~
%arrayidxC1 = getelementptr inbounds i16, i16* %c, i64 %store_ind_inc
%arrayidxC = getelementptr inbounds i16, i16* %c, i64 %store_ind
Against group (0x7f9c6040c358):
~~~~~~~~~~~~~~
%arrayidxA1 = getelementptr i16, i16* %a, i64 %add
%arrayidxA = getelementptr i16, i16* %a, i64 %ind
...
Grouped accesses:
Group 0x7f9c6040c320:
~~~~~~~~~~~~~~
(Low: %c High: (78 + %c))
Member: {(2 + %c),+,4}<%for.body>
Member: {%c,+,4}<%for.body>
llvm-svn: 243354
Renato Golin [Mon, 27 Jul 2015 23:44:45 +0000 (23:44 +0000)]
[ARM] Implement -Wa,-mfpu and friends for assemblers
This patch allows Clang to pass on -Wa,-mfpu, -Wa,-mhwdiv and
-Wa,-mcpu to the integrated assembler (via target-features), but
-march is still not being passed, but validated.
In case the command line has both -mxxx and -Wa,-mxxx, we warn
that the naked one will not be used in assembler mode.
llvm-svn: 243353
Renato Golin [Mon, 27 Jul 2015 23:44:42 +0000 (23:44 +0000)]
[ARM] Changes to Arch/CPU handling to help with -Wa,-mfpu etc. (nfc)
To be able to handle -Wa, options in the assembler (ClangAs), we need to
make the handling of options based on the value of the options, not direct
Arguments from the list, since the list is immutable.
No functional change in this patch, but this allows validating of -Wa,-mfpu
and friends in the same way we validate -mfpu and friends, *just* for the
assembler.
llvm-svn: 243352
Sanjay Patel [Mon, 27 Jul 2015 23:43:09 +0000 (23:43 +0000)]
fix typo; NFC
llvm-svn: 243351
Rui Ueyama [Mon, 27 Jul 2015 23:40:20 +0000 (23:40 +0000)]
COFF: Write import library symbols to a symbol table.
Previously no __imp_ symbols nor dllimport thunk functions were
written to a symbol table.
llvm-svn: 243350
David Blaikie [Mon, 27 Jul 2015 23:32:19 +0000 (23:32 +0000)]
[opaque pointers] Avoid the use of pointee types when parsing inline asm in IR
When parsing calls to inline asm the pointee type (of the pointer type
representing the value type of the InlineAsm value) was used. To avoid
using it, use the ValID structure to ferry the FunctionType directly
through to the InlineAsm construction.
This is a bit of a workaround - alternatively the inline asm could
explicitly describe the type but that'd be verbose/redundant in the IR
and so long as the inline asm calls directly in the context of a call or
invoke, this should suffice.
llvm-svn: 243349
Sanjoy Das [Mon, 27 Jul 2015 23:27:51 +0000 (23:27 +0000)]
[LSR] Generate and use zero extends
Summary:
If a scale or a base register can be rewritten as "Zext({A,+,1})" then
LSR will now consider a formula of that form in its normal cost
computation.
Depends on D9180
Reviewers: qcolombet, atrick
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D9181
llvm-svn: 243348
Sanjoy Das [Mon, 27 Jul 2015 23:27:43 +0000 (23:27 +0000)]
[TargetTransformInfo][NFCI] Add TargetTransformInfo::isZExtFree.
Summary:
This function is not used in this change but will be used in a
subsequent change.
Reviewers: mcrosier, chandlerc
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D9180
llvm-svn: 243347
Rui Ueyama [Mon, 27 Jul 2015 23:27:03 +0000 (23:27 +0000)]
COFF: Add REQUIRES arm to tests which use the ARM disassembler.
llvm-svn: 243346
JF Bastien [Mon, 27 Jul 2015 23:25:54 +0000 (23:25 +0000)]
WebAssembly: add a generic CPU
Summary: WebAssemblySubtarget.cpp expects a default 'generic' CPU to exist, and this seems to be prevalent with other targets. It makes sense to have something between MVP and bleeding-edge, even though for now it's the same as MVP. This removes a warning that's currently generated.
Subscribers: jfb, llvm-commits, sunfish
Differential Revision: http://reviews.llvm.org/D11546
llvm-svn: 243345
Greg Clayton [Mon, 27 Jul 2015 23:21:05 +0000 (23:21 +0000)]
Make sure we detect symbols in the new __DATA_DIRTY and __DATA_CONST segments and classify them correctly.
<rdar://problem/
20942073>
llvm-svn: 243344
Argyrios Kyrtzidis [Mon, 27 Jul 2015 23:16:53 +0000 (23:16 +0000)]
[sema] Fix infinite loop when using a boolean value as designated initializer.
For designated indices use the max array size type bitwidth, not the bitwidth of the index value itself.
rdar://
21942503
llvm-svn: 243343
Greg Clayton [Mon, 27 Jul 2015 23:02:14 +0000 (23:02 +0000)]
Fix test suite. For now we can't disable C++ for expressions since the return value is returned as a reference and this test fails on MacOSX.
llvm-svn: 243342
NAKAMURA Takumi [Mon, 27 Jul 2015 23:01:41 +0000 (23:01 +0000)]
Tweak llvm/test/CodeGen/X86/virtual-registers-cleared-in-machine-functions-liveins.ll not to fail for targeting win32.
llvm-svn: 243341
Alex Lorenz [Mon, 27 Jul 2015 22:42:41 +0000 (22:42 +0000)]
MIR Serialization: Serialize the unnamed basic block references.
This commit serializes the references from the machine basic blocks to the
unnamed basic blocks.
This commit adds a new attribute to the machine basic block's YAML mapping
called 'ir-block'. This attribute contains the actual reference to the
basic block.
Reviewers: Duncan P. N. Exon Smith
llvm-svn: 243340
JF Bastien [Mon, 27 Jul 2015 22:40:31 +0000 (22:40 +0000)]
WebAssembly: more MCAsmInfo nits.
Summary: As suggested by sunfish.
Subscribers: jfb, llvm-commits, sunfish
Differential Revision: http://reviews.llvm.org/D11544
llvm-svn: 243339
Colin LeMahieu [Mon, 27 Jul 2015 22:39:14 +0000 (22:39 +0000)]
[llvm-mc] Add --no-warn flag with -W alias to disable outputting warnings while assembling.
llvm-svn: 243338
Reid Kleckner [Mon, 27 Jul 2015 22:35:50 +0000 (22:35 +0000)]
Fix -Wmicrosoft-enum warning
llvm-svn: 243337
Alex Lorenz [Mon, 27 Jul 2015 22:31:04 +0000 (22:31 +0000)]
IR: Expose the method 'getLocalSlot' in the module slot tracker.
This commit publicly exposes the method 'getLocalSlot' in the
'ModuleSlotTracker' class.
This change is useful for MIR serialization, to serialize the unnamed basic
block and unnamed alloca references.
Reviewers: Duncan P. N. Exon Smith
llvm-svn: 243336
Alexandros Lamprineas [Mon, 27 Jul 2015 22:26:59 +0000 (22:26 +0000)]
- Added support for parsing HWDiv features using Target Parser.
- Architecture extensions are represented as a bitmap.
Phabricator: http://reviews.llvm.org/D11457
llvm-svn: 243335
Colin LeMahieu [Mon, 27 Jul 2015 21:56:53 +0000 (21:56 +0000)]
[llvm-mc] Pushing plumbing through for --fatal-warnings flag.
llvm-svn: 243334
Chaoren Lin [Mon, 27 Jul 2015 21:51:56 +0000 (21:51 +0000)]
Deprecate `SBValue::TypeIsPointerType`.
Reviewers: clayborg
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D11540
llvm-svn: 243333
Ying Chen [Mon, 27 Jul 2015 21:47:14 +0000 (21:47 +0000)]
Fix Windows buildbot failure after rev 243301
Summary:
- Visual Studio doesn't support "list initialization inside member initializer list"
- Call inner struct constructor explicitly
Reviewers:
enrico
Subscribers:
lldb-commits
llvm-svn: 243332
Sanjoy Das [Mon, 27 Jul 2015 21:42:49 +0000 (21:42 +0000)]
[IndVars] Make loop varying predicates loop invariant.
Summary:
Was D9784: "Remove loop variant range check when induction variable is
strictly increasing"
This change re-implements D9784 with the two differences:
1. It does not use SCEVExpander and does not generate new
instructions. Instead, it does a quick local search for existing
`llvm::Value`s that it needs when modifying the `icmp`
instruction.
2. It is more general -- it deals with both increasing and decreasing
induction variables.
I've added all of the tests included with D9784, and two more.
As an example on what this change does (copied from D9784):
Given C code:
```
for (int i = M; i < N; i++) // i is known not to overflow
if (i < 0) break;
a[i] = 0;
}
```
This transformation produces:
```
for (int i = M; i < N; i++)
if (M < 0) break;
a[i] = 0;
}
```
Which can be unswitched into:
```
if (!(M < 0))
for (int i = M; i < N; i++)
a[i] = 0;
}
```
I went back and forth on whether the top level logic should live in
`SimplifyIndvar::eliminateIVComparison` or be put into its own
routine. Right now I've put it under `eliminateIVComparison` because
even though the `icmp` is not *eliminated*, it no longer is an IV
comparison. I'm open to putting it in its own helper routine if you
think that is better.
Reviewers: reames, nicholas, atrick
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D11278
llvm-svn: 243331
Enrico Granata [Mon, 27 Jul 2015 21:27:02 +0000 (21:27 +0000)]
If a path contains a '/' before a ':', then the ':' is not a hostname separator, but just a part of the path (e.g. /tmp/fi:lename vs. pro:/tmp/fi:lename)
llvm-svn: 243330