Commit Graph

215159 Commits

Author SHA1 Message Date
Tobias Grosser 98e566e213 Simplify test case
Commit r252422 introduced an unnecessary complicated test case. Reduce it to
the part that actually triggered the original issue.

llvm-svn: 252611
2015-11-10 15:42:44 +00:00
Marshall Clow bfba968360 Explicitly #include <utility> so that we get std::move. Thanks to Walter for the bug report.
llvm-svn: 252610
2015-11-10 15:22:08 +00:00
Tobias Grosser b43cc62fe1 stringFromIslObj: Do not crash when printing 'null' objects
No test case, as this code path is currently only used for debugging.

llvm-svn: 252609
2015-11-10 15:09:44 +00:00
Daniel Marjamaki 1e9ef81187 [clang-tidy] misc-macro-parentheses: fix fp when using object member pointers
Fixes http://llvm.org/PR25208.

llvm-svn: 252608
2015-11-10 14:32:25 +00:00
Tobias Grosser 262538435f ScopInfo: Make getDimensionSize better reflect which dimensions carry sizes
In polly the first dimensions of an array as well as all scalars do not carry
any size information. This commit makes this explicit in the interface of
getDimensionSize. Before this commit getDimensionSize(0) returned the size of
the first dimension that carried a size. After this commit getDimensionSize(i)
will either return the size of dimension 'i' or assert in case 'i' does not
carry a size or does not exist at all.

This very same behaviour was already present in getDimensionSizePw(). This
commit also adds assertions that ensure getDimensionSizePw() is called
appropriately.

llvm-svn: 252607
2015-11-10 14:24:21 +00:00
James Molloy 9d55f19cfa Reapply "[ARM] Combine CMOV into BFI where possible"
Added fixes for stage2 failures: CMOV is not commutable; commuting the operands results in the condition being flipped! d'oh!

Original commit message:

If we have a CMOV, OR and AND combination such as:
  if (x & CN)
      y |= CM;

And:
  * CN is a single bit;
    * All bits covered by CM are known zero in y;

Then we can convert this to a sequence of BFI instructions. This will always be a win if CM is a single bit, will always be no worse than the TST & OR sequence if CM is two bits, and for thumb will be no worse if CM is three bits (due to the extra IT instruction).

llvm-svn: 252606
2015-11-10 14:22:05 +00:00
Aidan Dodds c78e89962a Differential Revision: http://reviews.llvm.org/D14538
llvm-svn: 252605
2015-11-10 14:10:57 +00:00
Igor Laevsky 01c3692a10 Strip metadata when speculatively hoisting instructions
This is fix for PR24059.

When we are hoisting instruction above some condition it may turn out
that metadata on this instruction was control dependant on the condition.
This metadata becomes invalid and we need to drop it.

This patch should cover most obvious places of speculative execution (which
I have found by greping isSafeToSpeculativelyExecute). I think there are more
cases but at least this change covers the severe ones.

Differential Revision: http://reviews.llvm.org/D14398

llvm-svn: 252604
2015-11-10 14:10:31 +00:00
Oliver Stannard 21aa762226 Update test to use explicit triple
This is needed for targets which do not support big-endian with the default
triple.

llvm-svn: 252603
2015-11-10 14:09:08 +00:00
Tobias Grosser 4ea2e07a60 ScopInfo: Make printing of ScopArrayInfo more similar to declarations in C
Memory references are now printed as follows:

           Old                          New
Scalars:   i64 MemRef_val[*]            i64 MemRef_val;
Arrays:    i64 MemRef_A[*][%m][%o][8]   i64 MemRef_A[*][%m][%o];

We do not print any more information about the element size in the type. Such
information has already been available in a comment after the scalar/array
declaration. It was redundant and did not match well with what people were used
from C.

llvm-svn: 252602
2015-11-10 14:02:54 +00:00
Aaron Ballman 4960df0db3 No longer creating the install-clang target for IDEs, as it was never meant for those.
llvm-svn: 252601
2015-11-10 12:51:25 +00:00
Tilmann Scheller 990a8d88c8 [PowerPC] Remove redundant code.
The local variable Hi is never being read.

Issue identified by the Clang static analyzer.

llvm-svn: 252600
2015-11-10 12:29:37 +00:00
Sean Eveson 00e780e1cc [Analyzer] Fix comments and formatting. NFC.
llvm-svn: 252599
2015-11-10 11:48:55 +00:00
Asiri Rathnayake f520c1445f Make it possible to build a no-exceptions variant of libcxx.
Fixes a small omission in libcxx that prevents libcxx being built when
-DLIBCXX_ENABLE_EXCEPTIONS=0 is specified.

This patch adds XFAILS to all those tests that are currently failing
on the new -fno-exceptions library variant. Follow-up patches will
update the tests (progressively) to cope with the new library variant.

Change-Id: I4b801bd8d8e4fe7193df9e55f39f1f393a8ba81a
llvm-svn: 252598
2015-11-10 11:41:22 +00:00
Oliver Stannard d414c99b9c [AArch64] Fix halfword load merging for big-endian targets
For big-endian targets, when we merge two halfword loads into a word load, the
order of the halfwords in the loaded value is reversed compared to
little-endian, so the load-store optimiser needs to swap the destination
registers.

This does not affect merging of two word loads, as we use ldp, which treats the
memory as two separate 32-bit words.

llvm-svn: 252597
2015-11-10 11:04:18 +00:00
Pavel Labath bf5210f8ed Mark TestMiInterpreterExec.test_lldbmi_thread_continue as flaky on linux
llvm-svn: 252596
2015-11-10 10:33:12 +00:00
Hans Wennborg 21ce8ecb09 Inliner: Do zero-cost inlines even if above a negative threshold (PR24851)
Differential Revision: http://reviews.llvm.org/D14499

llvm-svn: 252595
2015-11-10 09:47:48 +00:00
Igor Kudrin f6f45476f5 [ELF2] Remove Writer::getVAStart, use TargetInfo::getVAStart instead.
llvm-svn: 252593
2015-11-10 08:39:27 +00:00
Igor Breger b6b27af46a AVX512 : Implemented encoding and DAG lowering for VMOVHPS/PD and VMOVLPS/PD instructions.
Differential Revision: http://reviews.llvm.org/D14492

llvm-svn: 252592
2015-11-10 07:09:07 +00:00
Jason Molenda 649a607e11 Add support for tvos and watchos to ObjectFileMachO.
Add support for the new dyld shared cache format on
ios etc devices.
Small changes for classifying ObjC metadata symbols.

llvm-svn: 252588
2015-11-10 05:21:54 +00:00
Craig Topper fd778eebac [X86] Use setzero instead of set1(0) in a few places in intrinsic headers.
llvm-svn: 252587
2015-11-10 05:08:08 +00:00
Craig Topper 7148166785 [X86] Remove temporary variables from macros in x86 intrinsic headers. Prevents duplicate names appearing from multiple macro expansions. NFC
llvm-svn: 252586
2015-11-10 05:08:05 +00:00
Craig Topper 166f8b20a3 [X86] Fix bad intrinsic header comment. NFC.
llvm-svn: 252585
2015-11-10 05:08:00 +00:00
Jason Molenda d91c3fdfb8 Upstream a small change from Greg Clayton for the REPL support:
"Modify internal breakpoints so they resolve just like external
breakpoints do. This allow you to set symbol and file + line internal
breakpoints and have them get updated correctly."

<rdar://problem/16931767>

llvm-svn: 252584
2015-11-10 04:18:12 +00:00
Jason Molenda dad8af4cf6 The other half of a change made by Enrico for trying to get a correct
triple for a process.  He writes, "Changes to the way setting the
triple works on a target so that if the target has passed a fully
specified triple, and the newly passed triple is not a revamp of
the current one, and the current one is fully specified, then do
not replace the existing triple."

Triple handling got a bit more complicated on mac with the addition
of ios/watchos/tvos and their simulators, and tracking the correct
os versions for them so expressions are compiled with the expected
APIs available to the user.

<rdar://problem/19820698> 

llvm-svn: 252583
2015-11-10 04:11:37 +00:00
David Blaikie 578a31fe0a Remove another variable unused in -Asserts build
llvm-svn: 252582
2015-11-10 04:10:04 +00:00
Jason Molenda 57e1201e31 The MacOSXi386 ABI should be used for watchos simulator debug sessions.
Also, add an async error message if the dyld solib loaded callback function
can't find an ABI (which results in no solibs being loaded in the process).
This is a big error and we should call attention to it.

<rdar://problem/23471384> 

llvm-svn: 252581
2015-11-10 03:21:59 +00:00
David Blaikie e35168f008 Remove some unused variables to clean up the -Werror build
llvm-svn: 252580
2015-11-10 03:16:28 +00:00
Colin LeMahieu 3c7ecf9af1 [Hexagon] Adding instruction aliases and tests.
llvm-svn: 252579
2015-11-10 01:58:26 +00:00
Andy Ayers 809cbe9ea0 Support for emitting inline stack probes
For CoreCLR on Windows, stack probes must be emitted as inline sequences that probe successive stack pages
between the current stack limit and the desired new stack pointer location. This implements support for
the inline expansion on x64.

For in-body alloca probes, expansion is done during instruction lowering. For prolog probes, a stub call
is initially emitted during prolog creation, and expanded after epilog generation, to avoid complications
that arise when introducing new machine basic blocks during prolog and epilog creation.

Added a new test case, modified an existing one to exclude non-x64 coreclr (for now).

Add test case

Fix tests

llvm-svn: 252578
2015-11-10 01:50:49 +00:00
Richard Diamond 88ae650d6a Fix mingw targets. Bandaid for r252532's buildbot brakage.
Reviewers: brad.king, beanz

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D14523

llvm-svn: 252576
2015-11-10 01:03:51 +00:00
Xinliang David Li 854dad77ec Rollback 252570 for further investigation
llvm-svn: 252575
2015-11-10 00:58:22 +00:00
Colin LeMahieu 13cc3ab785 [Hexagon] Fixing compound register printing and reenabling more tests.
llvm-svn: 252574
2015-11-10 00:51:56 +00:00
Tim Northover 339c83e27f AArch64: add experimental support for address tagging.
AArch64 has the ability to use the top 8-bits of an "address" for extra
information, with the memory subsystem automatically masking them off for loads
and stores. When that's happening, we can sometimes skip masks on memory
operations in the compiler.

However, this requires the host OS and support stack to preserve those bits so
it can't be enabled everywhere. In principle iOS 8.0 and above do take the
required precautions and but we'll put it under a flag for now.

llvm-svn: 252573
2015-11-10 00:44:23 +00:00
Chris Bieneman 7d824da189 [CMake] Temporary workaround to support building builtins on darwin with a toolchain that may not support all x86 and arm architectures.
This is at least a little better than my first attempt. We still really need a way to do compile checks without linking.

llvm-svn: 252572
2015-11-10 00:41:18 +00:00
Joerg Sonnenberger 5c1ac90715 Use the generic Sparc CPU handling for Linux, FreeBSD and OpenBSD, too.
This currently changes the default toward the more historic -Av8/-Av9,
but as discussed with James Y Knight, consistency is for now more
important than figuring out which default CPU each OS should be using.

llvm-svn: 252571
2015-11-10 00:40:29 +00:00
Xinliang David Li 7efc57bc19 [PGO] Add LLVM main include dir to profile runtime build
Runtime code implicitly depends on the defintions and const
values defined in LLVM proper, but currently such dependency
is made implicitly by duplicating code across two dirs. As 
part of the PGO cleanup effort, there will be changes to share
common sources. This is a preparation patch to enable it (NFC).

Differential Revision: http://reviews.llvm.org/D14487

llvm-svn: 252570
2015-11-10 00:35:37 +00:00
Chris Bieneman 86af9e07ff Revert "[CMake] [macho_embedded] Check to make sure the compiler supports the architectures before generating build targets"
This commit reverts r252525. I was not really thinking about this fix properly. This doesn't work because it relys on try_compile checks which do a full compile & link. I'm going to put in a temporary solution as an interm step until we have a way to perform compiler checks without linking.

llvm-svn: 252569
2015-11-10 00:31:22 +00:00
Kevin Enderby dc0dbe1f69 Fix llvm-nm(1) printing of llvm-bitcode files for -format darwin to match darwin’s nm(1).
Also a small fix to match printing of Mach-O objects with -format posix.

llvm-svn: 252567
2015-11-10 00:31:08 +00:00
Derek Schuff ffa143ce81 [WebAssembly] Support 'unreachable' expression
Lower LLVM's 'unreachable' terminator to ISD::TRAP, and lower ISD::TRAP to
wasm's 'unreachable' expression.

WebAssembly type-checks expressions, but a noreturn function with a
return type that doesn't match the context will cause a check
failure. So we lower LLVM 'unreachable' to ISD::TRAP and then lower that
to WebAssembly's 'unreachable' expression, which typechecks in any
context and causes a trap if executed.

Differential Revision: http://reviews.llvm.org/D14515

llvm-svn: 252566
2015-11-10 00:30:57 +00:00
Matt Arsenault 6d87f28afd Remove unnecessary call to getAllocatableRegClass
I'm not sure what the point of this was. I'm not sure why
you would ever define an instruction that produces an unallocatable
register class. No tests fail with this removed, and it seems like
it should be a verifier error to define such an instruction.

This was problematic for AMDGPU because it would make bad decisions
by arbitrarily changing the register class when unsetting isAllocatable
for VS_32/VS_64, which is currently set as a workaround to this problem.

AMDGPU uses the VS_32/VS_64 register classes to represent operands which
can use either VGPRs or SGPRs. When  isAllocatable is unset for these,
this would need to pick  either the SGPR or VGPR class and insert either
a copy we don't want, or an illegal copy we would need to deal with
later. A semi-arbitrary register class ordering decision is made in tablegen,
which resulted in always picking a VGPR class because it happens to have
more registers than the SGPR register class. We really just want to
use whatever register class the original register had.

llvm-svn: 252565
2015-11-10 00:30:14 +00:00
Xinliang David Li ee4158957b [PGO] Make indexed value profile data more compact
- Make indexed value profile data more compact by peeling out 
  the per-site value count field into its own smaller sized array.
- Introduced formal data structure definitions to specify value 
  profile data layout in indexed format. Previously the layout 
  of the data is only assumed in the client code (scattered in 
  three different places : size computation, EmitData, and ReadData
- The new data structure  serves as a central place for layout documentation.
- Add interfaces to force BE output for value profile data (testing purpose)
- Add byte swap unit tests

Differential Revision: http://reviews.llvm.org/D14401

llvm-svn: 252563
2015-11-10 00:24:45 +00:00
Joerg Sonnenberger 9d3e4f6651 Use the normal switch over getArch() approach and not a long if chain.
llvm-svn: 252562
2015-11-10 00:23:12 +00:00
Colin LeMahieu b7a5f9fc29 [Hexagon] Fixing store instructions and reenabling a few more tests.
llvm-svn: 252561
2015-11-10 00:22:00 +00:00
Enrico Granata 97e31cdeed Code cleanup
llvm-svn: 252560
2015-11-10 00:21:10 +00:00
Vedant Kumar 0affb93894 [Driver] Use platform-appropriate profiling libraries for WatchOS, TVOS
When adding profiling instrumentation, use libclang_rt.profile_tvos.a
for TVOS targets and libclang_rt.profile_watchos.a for WatchOS targets.

I've also fixed up a comment and added an assert() that prevents us from
defaulting to an incorrect platform.

Differential Revision: http://reviews.llvm.org/D14521

Reviewed-by: t.p.northover
llvm-svn: 252558
2015-11-10 00:20:34 +00:00
Akira Hatanaka 3bfc3e2d2a [ARM] Handle t2ADDri in ARMAsmPrinter::EmitUnwindingInstruction.
This fixes a bug in ARMAsmPrinter::EmitUnwindingInstruction where
llvm_unreachable was reached because t2ADDri wasn't handled.

Test case provided by Tim Northover.

rdar://problem/23270609

http://reviews.llvm.org/D14518

llvm-svn: 252557
2015-11-10 00:10:41 +00:00
Colin LeMahieu 8ab7e8e1b5 [Hexagon] Fixing load instruction parsing and reenabling tests.
llvm-svn: 252555
2015-11-10 00:02:27 +00:00
Enrico Granata 5696085a8f More rework of the updating logic for ValueObjectChild. Still just refactoring with no feature change
llvm-svn: 252553
2015-11-09 23:59:53 +00:00
Matthias Braun 7e624d5f11 MachineVerifier: Streamline live interval related error reporting
Simply perform additional report_context() calls after a report()
instead of adding more and more overloaded variations of report().  Also
improve several instances where information was output in an ad-hoc way
probably because no matching report() overload was available.

llvm-svn: 252552
2015-11-09 23:59:33 +00:00