Commit Graph

218114 Commits

Author SHA1 Message Date
Eric Fiselier 08ce75b6c6 Update paths in libc++ build instructions. Patch from Jonathan Anderson.
llvm-svn: 255561
2015-12-14 22:26:28 +00:00
Eric Fiselier d5262627eb Update how libc++/libc++abi link the tests. Follow up on r255559.
llvm-svn: 255560
2015-12-14 22:24:19 +00:00
Eric Fiselier 3c9babc55f [libc++abi] Use libgcc and libgcc_s to provide _Unwind symbols instead of libgcc_eh.a
Summary:
libgcc_eh.a cannot be used when building libc++abi as a shared library (the default configuration). See this post for some more discussion: https://gcc.gnu.org/ml/gcc/2012-03/msg00104.html

This patch reverts back to using libgcc_s when linking libc++abi.so. 


Reviewers: danalbert, chandlerc, mclow.lists, ismail, compnerd

Subscribers: vkalintiris, cfe-commits

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

llvm-svn: 255559
2015-12-14 22:20:04 +00:00
Chih-Hung Hsieh 7993e18e80 [X86] Part 2 to fix x86-64 fp128 calling convention.
Part 1 was submitted in http://reviews.llvm.org/D15134.
Changes in this part:
* X86RegisterInfo.td, X86RecognizableInstr.cpp: Add FR128 register class.
* X86CallingConv.td: Pass f128 values in XMM registers or on stack.
* X86InstrCompiler.td, X86InstrInfo.td, X86InstrSSE.td:
  Add instruction selection patterns for f128.
* X86ISelLowering.cpp:
  When target has MMX registers, configure MVT::f128 in FR128RegClass,
  with TypeSoftenFloat action, and custom actions for some opcodes.
  Add missed cases of MVT::f128 in places that handle f32, f64, or vector types.
  Add TODO comment to support f128 type in inline assembly code.
* SelectionDAGBuilder.cpp:
  Fix infinite loop when f128 type can have
  VT == TLI.getTypeToTransformTo(Ctx, VT).
* Add unit tests for x86-64 fp128 type.

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

llvm-svn: 255558
2015-12-14 22:08:36 +00:00
Todd Fiala f801290a91 Revert "Temporarily skip TestWithLimitDebugInfo on Darwin and OS X"
This reverts commit 30ed0826a1bb800454088ea1ae16c113a69b92b1.

llvm-svn: 255557
2015-12-14 22:04:20 +00:00
George Burgess IV 8d141e0120 [Sema] Make nullness warnings appear in C++.
Given the following code:

    int *_Nullable ptr;
    int *_Nonnull nn = ptr;

...In C, clang will warn you about `nn = ptr`, because you're assigning
a nonnull pointer to a nullable pointer. In C++, clang issues no such
warning. This patch helps ensure that clang doesn't ever miss an
opportunity to complain about C++ code.

N.B. Though this patch has a differential revision link, the actual
review took place over email.

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

llvm-svn: 255556
2015-12-14 22:00:49 +00:00
Sanjay Patel fa54acedd1 add fast-math-flags to 'call' instructions (PR21290)
This patch adds optional fast-math-flags (the same that apply to fmul/fadd/fsub/fdiv/frem/fcmp)
to call instructions in IR. Follow-up patches would use these flags in LibCallSimplifier, add 
support to clang, and extend FMF to the DAG for calls.

Motivating example:

%y = fmul fast float %x, %x
%z = tail call float @sqrtf(float %y)

We'd like to be able to optimize sqrt(x*x) into fabs(x). We do this today using a function-wide
attribute for unsafe-math, but we really want to trigger on the instructions themselves:

%z = tail call fast float @sqrtf(float %y)

because in an LTO build it's possible that calls with fast semantics have been inlined into a
function with non-fast semantics.

The code changes and tests are based on the recent commits that added "notail":
http://reviews.llvm.org/rL252368

and added FMF to fcmp:
http://reviews.llvm.org/rL241901

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

llvm-svn: 255555
2015-12-14 21:59:03 +00:00
Ben Craig 46642ffeeb Reordering fields to reduce padding in LLVM. NFC
llvm-svn: 255554
2015-12-14 21:57:05 +00:00
Ben Craig cd7e9f143b Reordering fields to reduce padding in Clang. NFC
llvm-svn: 255552
2015-12-14 21:54:11 +00:00
Dan Gohman 87b4aa8914 [WebAssembly] Add an assert to sanity-check dead flags.
The WebAssemblyStoreResults pass runs before LiveVariables, so it doesn't
expect to have to keep dead flags up to date; check this with an assert.

llvm-svn: 255551
2015-12-14 21:53:54 +00:00
Pete Cooper 52abc5f971 Start implementing FDE dumping when printing the eh_frame.
This code adds some simple decoding of the FDE's in an eh_frame.

There's still more to be done in terms of error handling and verification.

Also, we need to be able to decode the CFI's.

llvm-svn: 255550
2015-12-14 21:49:49 +00:00
Todd Fiala 6ea44cd89b Temporarily skip TestWithLimitDebugInfo on Darwin and OS X
This test is erroring out on a sequence call to a function.

llvm-svn: 255549
2015-12-14 21:49:39 +00:00
Kate Stone a11959dbf7 [Editline] Redesign automatic indentation fix command for robustness
The FixIndentationCommand implementation has proven to be fragile across various libedit iterations. This patch reworks the command to use the same basic strategy as when moving between lines in a multi-line edit session: when indentation changes are required, exit line editing completely and restart with amended content. This approach won't be susceptible to subtle behavior differences libedit has introduced over time.

llvm-svn: 255548
2015-12-14 21:43:59 +00:00
Omair Javaid 798ea5b6ff Correction in TestFrames.py test for arm targets in thumb mode
Differential revision: http://reviews.llvm.org/D15061

llvm-svn: 255547
2015-12-14 21:41:18 +00:00
Pete Cooper 23bfa7e925 Print the eh_frame section in MachoDump.
This is the start of work to dump the contents of the eh_frame section.

It currently emits CIE entries.  FDE entries will come later.

It also needs improved error checking which will follow soon.

http://reviews.llvm.org/D15502

Reviewed by Kevin Enderby and Lang Hames.

llvm-svn: 255546
2015-12-14 21:39:27 +00:00
Ben Craig 97c191c473 [PATCH] Adding checker to detect excess padding in records
The intent of this checker is to generate a report for any class / structure
that could reduce its padding by reordering the fields.  This results in a very
noisy checker.  To reduce the noise, this checker will currently only warn when
the number of bytes over "optimal" is more than 24.  This value is configurable
with -analyzer-config performance.Padding:AllowedPad=N.  Small values of
AllowedPad have the potential to generate hundreds of reports, and gigabytes
of HTML reports.

The checker searches for padding violations in two main ways.  First, it goes
record by record.  A report is generated if the fields could be reordered in a
way that reduces the padding by more than AllowedPad bytes.  Second, the
checker will generate a report if an array will cause more than AllowedPad
padding bytes to be generated.

The record checker currently skips many ABI specific cases.  Classes with base
classes are skipped because base class tail padding is ABI specific.  Bitfields
are just plain hard, and duplicating that code seems like a bad idea.  VLAs are
both uncommon and non-trivial to fix.

The array checker isn't very thorough right now.  It only checks to see if the
element type's fields could be reordered, and it doesn't recursively check to
see if any of the fields' fields could be reordered.  At some point in the
future, it would be nice if "arrays" could also look at array new usages and
malloc patterns that appear to be creating arrays.

llvm-svn: 255545
2015-12-14 21:38:59 +00:00
Krzysztof Parzyszek 5e6f2bd0cb [Hexagon] Add "const" to function parameters in HexagonInstrInfo
llvm-svn: 255544
2015-12-14 21:32:25 +00:00
Todd Fiala 685a7570ec test infra: enable single-worker rerun phase for flakey tests.
Use of --rerun-all-issues will enable any test method failure, not just
test methods marked with the flakey decorator, to rerun.

Currently this does not change the flakey logic's immediate rerun
attempt.  I want to make sure this doesn't cause any significant issues
before changing that part.

The rerun reporting is only known to work properly with the
default (new) BasicResultsFormatter reporting.  Once we work out
any issues, I'll go back and make sure the curses output handles
it properly as well.

llvm-svn: 255543
2015-12-14 21:28:46 +00:00
Zachary Turner e1eb5e39f5 Make skipIf decorator support not_in() functor.
llvm-svn: 255542
2015-12-14 21:26:49 +00:00
Diego Novillo d3babdbc8b Fix formatting. NFC.
llvm-svn: 255541
2015-12-14 20:37:15 +00:00
Krzysztof Parzyszek dac7102874 [Packetizer] Add AliasAnalysis as a parameter to the packetizer
This will make the depedence graph more accurate if an alias analysis
is provided. If nullptr is specified in its place, the behavior will
remain as it is currently.

llvm-svn: 255540
2015-12-14 20:35:13 +00:00
Petar Jovanovic 2f264c31d3 [PowerPC] Fix test/CodeGen/ppc-sfvarargs
The issue seems to be that .ll file may either use number of register
value or alias %numUsedRegs, so the check needs to cover both cases.

This will hopefully fix the last regression introduced by r255515.

llvm-svn: 255539
2015-12-14 20:30:02 +00:00
Pete Cooper 1d07869c29 Add missing vtable anchor's.
The following description is from http://reviews.llvm.org/D15481:

ICmpInst, GetElementPtrInst and PHINode have no anchor functions. This causes the vtable and the type info (if RTTI is enabled in user code) to be emitted in multiple translation units.

Before 3.7, the destructors were the key functions for these nodes, but they have been removed.

There have been discussions about this here: http://lists.llvm.org/pipermail/llvm-dev/2015-August/089010.html and here: http://lists.llvm.org/pipermail/llvm-dev/2015-December/092921.html.

Patch by Visoiu Mistrih Francis

llvm-svn: 255538
2015-12-14 20:29:16 +00:00
Krzysztof Parzyszek 8d73bdb316 [Packetizer] Make endPacket virtual
This will allow custom handling of packet finalization. The current
definition of endPacket will still perform the default finalization.

llvm-svn: 255537
2015-12-14 20:12:24 +00:00
David Majnemer 59be1d653a [ConstantFold] Fix bitcast to gep constant folding transform.
Make sure to check that the destination type is sized.
A check was present but was incorrectly checking the source type
instead.

Patch by Amaury SECHET!

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

llvm-svn: 255536
2015-12-14 19:30:32 +00:00
Yaron Keren 45ea8fa1f4 Save several std::string constructions using llvm::Twine.
llvm-svn: 255535
2015-12-14 19:28:40 +00:00
Peter Collingbourne 45cd0c3264 docs: Correct wording in LangRef relating to available_externally linkage.
Differential Revision: http://reviews.llvm.org/D15343

llvm-svn: 255534
2015-12-14 19:22:37 +00:00
Petar Jovanovic 59a981a8f3 [PowerPC] Fix make-check issues
Previous change r255515 introduced a couple of issues likely caused by
a different configure setup.

llvm-svn: 255533
2015-12-14 19:22:35 +00:00
John McCall 9d145df4c8 Allow pseudo-destructor calls on forward-declared Objective-C class pointers.
rdar://18522255

llvm-svn: 255531
2015-12-14 19:12:54 +00:00
Cong Hou c5f510bc23 Remove the successor probabilities normalization in tail duplication pass.
The normalization may cause assertion failures on SystemZ and some out-of-tree
tests. The root cause is that unknown probabilities are materialized into known
ones by calling getSuccProbability(), which is then used to add another
successor to the same MBB which results in mixed known and unknown
probabilities. But currently those mixed probabilities cannot be normalized.

I will compose another patch to fix the root issue.

llvm-svn: 255530
2015-12-14 19:11:54 +00:00
Sanjoy Das adfec011e1 [MergeFunctions] Use II instead of CI for InvokeInst; NFC
Using `CI` is slightly misleading.

llvm-svn: 255529
2015-12-14 19:11:45 +00:00
Sanjoy Das 2a74eb0000 Teach MergeFunctions about operand bundles
llvm-svn: 255528
2015-12-14 19:11:40 +00:00
Sanjoy Das 2de4d0aa18 Teach haveSameSpecialState about operand bundles
llvm-svn: 255527
2015-12-14 19:11:35 +00:00
Krzysztof Parzyszek d44a1fd506 Add "const" to function arguments in DFAPacketizer
llvm-svn: 255526
2015-12-14 18:54:44 +00:00
Zachary Turner f098e4fb19 Make debug info specification use categories system.
Reviewed By: Tamas Berghammer, Pavel Labath
Differential Revision: http://reviews.llvm.org/D15428

llvm-svn: 255525
2015-12-14 18:49:16 +00:00
Hans Wennborg 4ae76c2692 clang-cl: make /Wall turn on both -Wall and -Wextra (PR25563)
The documentation suggests /Wall should really turn on -Wextra and any
other warnings that are not enabled by default. That would correspond
to Clang's -Weverything, but is probably not what users want.

llvm-svn: 255524
2015-12-14 18:46:11 +00:00
Xinliang David Li e3bf4fd394 [PGO] Value profiling text format reader/writer support
This patch adds the missing functionality in parsable
text format support for value profiling.

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

llvm-svn: 255523
2015-12-14 18:44:01 +00:00
David Majnemer bbfc7219ef [IR] Remove terminatepad
It turns out that terminatepad gives little benefit over a cleanuppad
which calls the termination function.  This is not sufficient to
implement fully generic filters but MSVC doesn't support them which
makes terminatepad a little over-designed.

Depends on D15478.

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

llvm-svn: 255522
2015-12-14 18:34:23 +00:00
David Majnemer feeefb214d [MS ABI] Don't rely on terminatepad
We'd like to remove support for terminatepad from LLVM.  To do this, we
need to move Clang off of it first.  The intent behind terminatepad was
to carefully model exception specifications for the MSVC personality.

However, we don't support exception specifications for the MSVC
personality and neither does MSVC.  Instead, MSVC supports
all-or-nothing exception specifications.  We can model this limited
usage using cleanuppads which call std::terminate.

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

llvm-svn: 255521
2015-12-14 18:34:18 +00:00
Paul Robinson accc3e0376 FastISel needs to remove dead code when it bails out.
When FastISel fails to translate an instruction it hands off code
generation to SelectionDAG. Before it does so, it may have generated
local value instructions to feed phi nodes in successor blocks. These
instructions will then be generated again by SelectionDAG, causing
duplication and less efficient code, including extra spill
instructions.

Patch by Wolfgang Pieb!

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

llvm-svn: 255520
2015-12-14 18:33:18 +00:00
Marshall Clow 6e07ccdfe1 K-Ballo pointed out a mistake in the add_lvalue_ref tests I checked in; now more of them are passing. Thanks
llvm-svn: 255519
2015-12-14 18:11:51 +00:00
Marshall Clow 25090a91bb Missed this on the previous (255517) commit
llvm-svn: 255518
2015-12-14 18:02:23 +00:00
Marshall Clow 94b5bc4263 Fix a corner case that involved calling rethrow_if_nested with a type that had a deleted operator&. Added a test to catch this as well. Thanks to Ville for the heads-up.
llvm-svn: 255517
2015-12-14 18:01:56 +00:00
Petar Jovanovic 280f7101e8 [Power PC] llvm soft float support for ppc32
This is the second in a set of patches for soft float support for ppc32,
it enables soft float operations.

Patch by Strahinja Petrovic.

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

llvm-svn: 255516
2015-12-14 17:57:33 +00:00
Petar Jovanovic 88a328fbbe [Power PC] add soft float support for ppc32
This patch enables soft float support for ppc32 architecture and fixes
the ABI for variadic functions. This is the first in a set of patches
for soft float support in LLVM.

Patch by Strahinja Petrovic.

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

llvm-svn: 255515
2015-12-14 17:51:50 +00:00
Jonathan Peyton 67390c6cd3 Fix broken visual studio builds by disabling KMP_USE_TSX.
Visual studio can't handle the asm extension in the KMP_USE_TSX code sections.

llvm-svn: 255514
2015-12-14 17:39:30 +00:00
Marshall Clow 161eae2daa Add add_lvalue_ref tests for a few function types, with a note why not more
llvm-svn: 255513
2015-12-14 17:34:03 +00:00
Matt Arsenault d079285e05 AMDGPU: Use generic bitreverse intrinsic
Also fix bug in vector legalization for bitreverse.

llvm-svn: 255512
2015-12-14 17:25:38 +00:00
Sanjay Patel af674fbfd9 getParent() ^ 3 == getModule() ; NFCI
llvm-svn: 255511
2015-12-14 17:24:23 +00:00
Krzysztof Parzyszek 1065323eec [Hexagon] Xfail two tests that fail due to over-aligning arrays
llvm-svn: 255510
2015-12-14 17:17:20 +00:00