Commit Graph

226300 Commits

Author SHA1 Message Date
Jim Ingham e5ee6f04ab Figure out what the fixed expression is, and print it. Added another target setting to
quietly apply fixits for those who really trust clang's fixits.

Also, moved the retry into ClangUserExpression::Evaluate, where I can make a whole new ClangUserExpression 
to do the work.  Reusing any of the parts of a UserExpression in situ isn't supported at present.

<rdar://problem/25351938>

llvm-svn: 264793
2016-03-29 22:00:08 +00:00
Xinliang David Li bd54f5bd25 Fix comment in test
llvm-svn: 264792
2016-03-29 21:53:08 +00:00
Davide Italiano 47c33f0387 [ELF] Drive-by cleanup, make LTO.cpp clang-format clean.
llvm-svn: 264791
2016-03-29 21:48:25 +00:00
Davide Italiano 86f2bd5ca1 [LTO] Teach LTO about @llvm.used global.
If a symbol appears in @llvm.used, the linker is forced to treat
the symbol as there's a reference to it.

llvm-svn: 264790
2016-03-29 21:46:35 +00:00
Johannes Doerfert a144fb148b Exploit graph properties during domain generation
As a CFG is often structured we can simplify the steps performed
  during domain generation. When we push domain information we can
  utilize the information from a block A to build the domain of a
  block B, if A dominates B. When we pull domain information we can
  use information from a block A to build the domain of a block B
  if B post-dominates A. This patch implements both ideas and thereby
  simplifies domains that were not simplified by isl. For the FINAL
  basic block in
    test/ScopInfo/complex-successor-structure-3.ll .
  we used to build a universe set with 81 basic sets. Now it actually is
  represented as universe set.

  While the initial idea to utilize the graph structure depended on the
  dominator and post-dominator tree we can use the available region
  information as a coarse grained replacement. To this end we push the
  region entry domain to the region exit and pull it from the region
  entry for the region exit.

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

llvm-svn: 264789
2016-03-29 21:31:05 +00:00
Bruno Cardoso Lopes 03e18d41ad [Sema] Attempt [3] to fix tests for utf-8 invalid format string specifiers
Make the tests darwin only. The bots complaining already output UTF-8
invalid specifiers, test the output as we expect on darwin systems.

llvm-svn: 264788
2016-03-29 21:30:58 +00:00
Ed Schouten fc79d2ca42 Enable the SafeStack sanitizer on CloudABI by default.
Over the last month we've been testing SafeStack extensively. As far as
we know, it works perfectly fine. That why I'd like to see us having
this enabled by default for CloudABI.

This change introduces a getDefaultSanitizers() function that toolchains
can use to specify which sanitizers are enabled by default. Once all
flags are processed, only flags that had no -fno-sanitize overrides are
enabled.

Extend the thests for CloudABI to test both the default case and the
case in which we want to explicitly disable SafeStack.

Reviewed by:	eugenis, pcc
Differential Revision:	http://reviews.llvm.org/D18505

llvm-svn: 264787
2016-03-29 21:13:53 +00:00
Jonathan Peyton 4cfe93c599 Fix comment in kmp_wait_release.h
Removed reference to "ref ct" in a comment, as ref_ct no longer exists. Also
moved the comment to where the task_team is about to be tested if NULL.

llvm-svn: 264786
2016-03-29 21:08:29 +00:00
Rui Ueyama 319d7304c3 Simplify. NFC.
llvm-svn: 264785
2016-03-29 20:53:21 +00:00
Bruno Cardoso Lopes 10b1c8031f [Sema] Attempt [2] to fix tests for utf-8 invalid format string specifiers
Some buildbots still complain. Followup from r264752 and 264765.

llvm-svn: 264784
2016-03-29 20:47:09 +00:00
Betul Buyukkurt cb6f5f16e6 [PGO] Move the instrumentation point closer to the value site.
For terminator instructions, the value profiling instrumentation
happens in a basic block other than where the value site resides.
This CR moves the instrumentation point prior to the value site.
Mostly NFC.

llvm-svn: 264783
2016-03-29 20:44:09 +00:00
Johannes Doerfert e11e08bd1f Factor out "adjustDomainDimensions" function [NFC]
llvm-svn: 264782
2016-03-29 20:41:24 +00:00
Johannes Doerfert 29cb067000 Factor out "getFirstNonBoxedLoopFor" function [NFC]
llvm-svn: 264781
2016-03-29 20:32:43 +00:00
Derek Schuff 07636cd5e7 Add a print method to MachineFunctionProperties for better error messages
This makes check failures much easier to understand.
Make it empty (but leave it in the class) for NDEBUG builds.

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

llvm-svn: 264780
2016-03-29 20:28:20 +00:00
Aaron Ballman 32071a20bc Clarifying some of the requirements for building with Visual Studio on Windows. Namely, we require the latest Update to be installed (for sanity purposes), and we require CMake 2.8.12.2 for building LLVM with Visual Studio.
llvm-svn: 264779
2016-03-29 20:23:55 +00:00
Kevin Enderby 2d431c3dba Fix some bugs in the posix output of llvm-nm. Which is documented on
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/nm.html .

1) For Mach-O files the code was not printing the values in hex as is the default.
2) The values printed had leading zeros which they should not have.
3) The address for undefined symbols was printed as spaces instead of 0.
4) With the -A option with posix output for an archive did not use square
brackets around the archive member name.

rdar://25311883 and rdar://25299678

llvm-svn: 264778
2016-03-29 20:18:07 +00:00
Jonathan Peyton ee2f96c79b Fix incorrect indention in kmp_alloc.c
llvm-svn: 264777
2016-03-29 20:10:00 +00:00
Jonathan Peyton a58563d8c9 Remove dead KMP_USE_POOLED_ALLOC code
llvm-svn: 264776
2016-03-29 20:05:27 +00:00
Johannes Doerfert 5fb9b21c24 Bail as early as possible
Instead of waiting for the domain construction to finish we will now
  bail as early as possible in case a complexity problem is encountered.
  This might save compile time but more importantly it makes the "abort"
  explicit. While we can always check if we invalidated the assumed
  context we can simply propagate the result of the construction back.
  This also removes the HasComplexCFG flag that was used for the very
  same reason.

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

llvm-svn: 264775
2016-03-29 20:02:05 +00:00
Nico Weber 4884dcf709 clang-cl: Silently ignore /d2FastFail flag.
It's some debugging flag for cl.exe related to how it writes crash dumps.

llvm-svn: 264774
2016-03-29 19:41:02 +00:00
Vedant Kumar dcafeddfb7 [profile] Make a test work if run by the super-user
llvm-svn: 264773
2016-03-29 19:24:58 +00:00
Rui Ueyama 4e62db4167 Replace a FIXME with a regular comment.
Because it doesn't have to be fixed even though it is probably
better to do.

llvm-svn: 264772
2016-03-29 19:19:03 +00:00
James Y Knight 7306cd47d4 [SPARC] Use AtomicExpandPass to expand AtomicRMW instructions.
They were previously expanded to CAS loops in a custom isel expansion,
but AtomicExpandPass knows how to do that generically.

Testing is covered by the existing sparc atomics.ll testcases.

llvm-svn: 264771
2016-03-29 19:09:54 +00:00
Rui Ueyama 01ddc06484 Make BitcodeCompiler::compile a non-template function. NFC.
llvm-svn: 264770
2016-03-29 19:08:46 +00:00
Matthias Braun 72a58c3e28 MachineVerifier: On dead-def live segments, check that corresponding machine operand has a dead flag
llvm-svn: 264769
2016-03-29 19:07:43 +00:00
Matthias Braun 1c20c8280a LiveVariables: Fix typo and shorten comment
llvm-svn: 264768
2016-03-29 19:07:40 +00:00
Duncan P. N. Exon Smith 40b44e1d0a IR: Add DbgInfoIntrinsic::getVariableLocation
Create a common accessor, DbgInfoIntrinsic::getVariableLocation, which
doesn't care about the type of debug info intrinsic.  Use this to
further unify the implementations of DbgDeclareInst::getAddress and
DbgValueInst::getValue.

Besides being a cleanup, I'm planning to use this to prepare DEBUG
output without having to branch on the concrete type.

llvm-svn: 264767
2016-03-29 18:56:03 +00:00
Ryan Govostes 89daa29fa6 [asan] Make the Darwin/dead-strip.c test require El Capitan or newer
llvm-svn: 264766
2016-03-29 18:54:29 +00:00
Bruno Cardoso Lopes dc195d005f [Sema] Attempt to fix tests for utf-8 invalid format string specifiers
Followup from r264752.

Attempt to appease buildbots:
 http://lab.llvm.org:8011/builders/clang-ppc64be-linux/builds/2882
 http://lab.llvm.org:8011/builders/clang-s390x-linux/builds/2619

llvm-svn: 264765
2016-03-29 18:38:44 +00:00
Ryan Govostes 23851940e5 Revert "[asan] Make the global_metadata_darwin.ll test require El Capitan or newer"
llvm-svn: 264764
2016-03-29 18:27:24 +00:00
Teresa Johnson b703c77b03 [ThinLTO] Remove post-pass metadata linking support
Since we have moved to a model where functions are imported in bulk from
each source module after making summary-based importing decisions, there
is no longer a need to link metadata as a postpass, and all users have
been removed.

This essentially reverts r255909 and follow-on fixes.

llvm-svn: 264763
2016-03-29 18:24:19 +00:00
Greg Clayton fee32cd9e2 When creating typedefs, don't call Type::GetName() since that might recursively call "lldb_private::Type::ResolveClangType(lldb_private::Type::ResolveStateTag)" and cause a crash. A lldb_private::Type should have a valid name if it is created without a backing CompilerType. Also provide a name that we can recognize so if we see it in a as the typename of a variable, we will know to check it out. This crash is happening quite a bit and we need to determine if this is due to incorrect debug info, or just due to some bug in LLDBD.
<rdar://problem/25192037>

llvm-svn: 264762
2016-03-29 18:22:07 +00:00
Rafael Espindola cba3e8b4b5 Change how we handle R_MIPS_LO16.
Mips aligns PT_LOAD to 16 bits (0x10000). That means that the lower 16
bits are always the same, so we can, effectively, say that the
relocation is relative.

llvm-svn: 264761
2016-03-29 18:18:19 +00:00
Eric Liu ff6d0d8b2e Removed class FormatStyle, which is a struct, forward declaration from Refactoring.h to avoid compilation error.
llvm-svn: 264760
2016-03-29 18:17:11 +00:00
Samuel Benzaquen b2ccba5257 [clang-tidy] Add check to detect dangling references in value handlers.
Summary:
Add check misc-dangling-handle to detect dangling references in value
handlers like std::experimental::string_view.
It provides a configuration option to specify other handle types that
should also be checked.

Right now it detects:
 - Construction from temporaries.
 - Assignment from temporaries.
 - Return statements from temporaries or locals.
 - Insertion into containers from temporaries.

Reviewers: alexfh

Subscribers: cfe-commits

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

llvm-svn: 264759
2016-03-29 18:02:26 +00:00
Ryan Govostes 4fdc1f0a94 [asan] Make the global_metadata_darwin.ll test require El Capitan or newer
llvm-svn: 264758
2016-03-29 17:58:49 +00:00
Chris Bieneman 54e3b5ace0 [Order Files] Fix order file usage
The CMake EXISTS operator needs to have the variable expanded. Not expanding this was causing the if statement to always be false, which made it impossible to pass linker order files in.

llvm-svn: 264757
2016-03-29 17:51:08 +00:00
Nirav Dave 2aab7f4358 Add support for no-jump-tables
Add function soft attribute to the generation of Jump Tables in CodeGen
as initial step towards clang support of gcc's no-jump-table support

Reviewers: hans, echristo

Subscribers: llvm-commits

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

llvm-svn: 264756
2016-03-29 17:46:23 +00:00
Derek Schuff 42666eeea2 Add MachineVerifier check for AllVRegsAllocated MachineFunctionProperty
Summary:
Check that any function that has the property set is free of virtual
register operands.

Also, it is actually VirtRegMap (and not the register allocators) that
acutally remove the VReg operands (except for RegAllocFast).

Reviewers: qcolombet

Subscribers: MatzeB, llvm-commits, qcolombet

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

llvm-svn: 264755
2016-03-29 17:40:22 +00:00
Manman Ren f46262e0b7 Swift Calling Convention: add swiftself attribute.
Differential Revision: http://reviews.llvm.org/D17866

llvm-svn: 264754
2016-03-29 17:37:21 +00:00
Greg Clayton 6e5c1fed08 Don't try to call getTypeSize() on a class if it isn't complete as clang will assert and kill the process.
llvm-svn: 264753
2016-03-29 17:36:38 +00:00
Bruno Cardoso Lopes 0c18d03d91 [Sema] Handle UTF-8 invalid format string specifiers
Improve invalid format string specifier handling by printing out
invalid specifiers characters with \x, \u and \U. Previously clang
would print gargabe whenever the character is unprintable.

Example, before:
  NSLog(@"%\u25B9"); => warning: invalid conversion specifier ' [-Wformat-invalid-specifier]
after:
  NSLog(@"%\u25B9"); => warning: invalid conversion specifier '\u25b9' [-Wformat-invalid-specifier]

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

rdar://problem/24672159

llvm-svn: 264752
2016-03-29 17:35:02 +00:00
Chris Bieneman ac400900da [Darwin] [Builtins] Cleaning up OS X exclude lists. NFC.
This just gets rid of a bunch of empty object file warnings. It doesn't impact the generated archives.

llvm-svn: 264751
2016-03-29 17:34:13 +00:00
Chris Bieneman 8de525696f [Darwin] [Builtins] Remove multi3 from the exclude list.
This addresses PR27077. For some historical reason Darwin wasn't shipping multi3 in the compiler builtin library or in the OS builtin library. This caused building ffmpeg to fail because Polly was generating calls to multi3. It is easy enough to just add the builtin.

llvm-svn: 264750
2016-03-29 17:24:23 +00:00
Chris Bieneman c4613f457a [Darwin] [Builtins] Cleaning up 10.4 exclude lists NFC
This just gets rid of a bunch of empty object file warnings. It doesn't impact the generated archives.

llvm-svn: 264749
2016-03-29 17:24:21 +00:00
Sanjay Patel 7c61507991 [x86] add tests to show current memset codegen
llvm-svn: 264748
2016-03-29 17:09:27 +00:00
Sanjoy Das 2381fcd557 [SCEV] Extract out a MatchBinaryOp; NFCI
MatchBinaryOp abstracts out the IR instructions from the operations they
represent.  While this change is NFC, we will use this factoring later
to map things like `(extractvalue 0 (sadd.with.overflow X Y))` to `(add
X Y)`.

llvm-svn: 264747
2016-03-29 16:40:44 +00:00
Sanjoy Das 260ad4dd63 [SCEV] Use Operator::getOpcode instead of manual dispatch; NFC
llvm-svn: 264746
2016-03-29 16:40:39 +00:00
Eric Liu 4c1ef97adb Added formatAndApplyAllReplacements that works on multiple files in libTooling.
Summary:
formatAndApplyAllReplacements takes a set of Replacements, applies them on a
Rewriter, and reformats the changed code.

Reviewers: klimek, djasper

Subscribers: ioeric, klimek, cfe-commits

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

llvm-svn: 264745
2016-03-29 16:31:53 +00:00
Justin Lebar 3db0b85fc8 Make InlineSimple's one-arg constructor explicit. NFC
llvm-svn: 264744
2016-03-29 16:26:06 +00:00