Commit Graph

197423 Commits

Author SHA1 Message Date
Kostya Serebryany 16901a901d [fuzzer] when a single unit takes over 1 second to run and it is the slowest one so far, print it.
llvm-svn: 233637
2015-03-30 23:04:35 +00:00
David Majnemer cde33036ed [WinEH] Run cleanup handlers when an exception is thrown
Generate tables in the .xdata section representing what actions to take
when an exception is thrown.  This currently fills in state for
cleanups, catch handlers are still unfinished.

llvm-svn: 233636
2015-03-30 22:58:10 +00:00
Juergen Ributzka 5fe5ef9e0e Transfer implicit operands when expanding the RET_ReallyLR pseudo instruction.
When we expand the RET_ReallyLR pseudo instruction we also need to transfer the
implicit operands.

The return register is an implicit operand and without it the liveness
calculation generates an incorrect live-out set for the patchpoint.

This fixes rdar://problem/19068476.

llvm-svn: 233635
2015-03-30 22:45:56 +00:00
Kostya Serebryany 03db8b9225 [fuzzer] print various stats in a unified way
llvm-svn: 233624
2015-03-30 22:44:03 +00:00
Alexei Starovoitov 2a90cde4fd [bpf] add support for bswap instructions
BPF has cpu_to_be and cpu_to_le instructions.
For now assume little endian and generate cpu_to_be for ISD::BSWAP.

llvm-svn: 233620
2015-03-30 22:40:40 +00:00
Alexei Starovoitov 78f99be1df [bpf] fix build
fix build broken due to r233599.
Would still need to switch to MDLocation long term.

llvm-svn: 233619
2015-03-30 22:40:35 +00:00
Simon Atanasyan cb576ef415 [Mips] Move the `Elf_RegInfo` structure declaration to the separate file
No functional changes.

llvm-svn: 233618
2015-03-30 22:36:07 +00:00
Simon Atanasyan 2693b5a36c [ELF] Change type of `OutputSection::setType()` argument to int64_t
Type of `OutputSection::_type` field is int64_t. This change makes
the field's and the argument's types consistent and allows to assign
full range of values to the `OutputSection::_type` field.

llvm-svn: 233617
2015-03-30 22:36:01 +00:00
Simon Atanasyan d484653fed [Mips] clang-format the code
No functional changes.

llvm-svn: 233616
2015-03-30 22:35:56 +00:00
Eric Christopher 71b1e5f1c4 Rename const char *Triple argument to TT to avoid shadowing llvm::Triple.
llvm-svn: 233615
2015-03-30 22:31:14 +00:00
Eric Christopher 9c1bd05949 Remove unused MCSubtargetInfo argument from the X86 MCInstPrinter ctors.
llvm-svn: 233614
2015-03-30 22:16:37 +00:00
Kostya Serebryany 16d03bd051 DFSan-based fuzzer (proof of concept).
Summary:
This adds a simple DFSan-based (i.e. taint-guided) fuzzer mutator,
see the comments for details.

Test Plan: a test added

Reviewers: samsonov, pcc

Reviewed By: samsonov, pcc

Subscribers: llvm-commits

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

llvm-svn: 233613
2015-03-30 22:09:51 +00:00
Eric Christopher d639cdf427 Remove unused MCSubtargetInfo argument from the Sparc MCInstPrinter ctors.
llvm-svn: 233612
2015-03-30 22:09:43 +00:00
Eric Christopher 48e697f7fe Remove unused MCSubtargetInfo argument from the NVPTX MCInstPrinter ctors.
llvm-svn: 233611
2015-03-30 22:03:16 +00:00
Duncan P. N. Exon Smith 5a227fffe5 LexicalScopes: Use MDLocation directly instead of DebugLoc
There's no benefit to using `DebugLoc` here.  Moreover, this will let a
follow-up commit work with `MDScope` directly instead of `DebugLoc`.

llvm-svn: 233610
2015-03-30 21:54:46 +00:00
Eric Christopher 7099d51275 Remove unused MCSubtargetInfo argument from the ARM MCInstPrinter ctors.
llvm-svn: 233609
2015-03-30 21:52:28 +00:00
Eric Christopher 2226c72301 Remove unused MCSubtargetInfo argument from the AArch64 MCInstPrinter ctors.
llvm-svn: 233608
2015-03-30 21:52:26 +00:00
Eric Christopher c7c5592b7e Remove unused Target argument from MCInstPrinter ctor functions.
llvm-svn: 233607
2015-03-30 21:52:21 +00:00
Quentin Colombet 6749ae36b4 [RegisterCoalescer] Fix a potential misuse of direct operand index in the
terminal rule.
Spot by code inspection.

llvm-svn: 233606
2015-03-30 21:50:44 +00:00
Duncan P. N. Exon Smith c7ba53f9a9 DebugInfo: Use the new DebugLoc API from r233573
This should fix the build [1] after r233599 removed the old API.

[1]: http://lab.llvm.org:8011/builders/perf-x86_64-penryn-O3-polly-parallel-fast/builds/5265

llvm-svn: 233605
2015-03-30 21:47:17 +00:00
David Blaikie d288fb8681 [opaque pointer type] Change GetElementPtrInst::getIndexedType to take the pointee type
This pushes the use of PointerType::getElementType up into several
callers - I'll essentially just have to keep pushing that up the stack
until I can eliminate every call to it...

llvm-svn: 233604
2015-03-30 21:41:43 +00:00
Rafael Espindola 0d68b4c5ed Fix PR23045.
Keep a note in the materializer that we are stripping debug info so that
user doing a lazy read of the module don't hit outdated formats.

Thanks to Duncan for suggesting the fix.

llvm-svn: 233603
2015-03-30 21:36:43 +00:00
Duncan P. N. Exon Smith 4bd905e9c5 Transforms: Update unit tests to use verifyModule()
Since I'm slowly gutting `DISubprogram` and `DICompileUnit`, update the
`CloneFunc` unit tests to call `verifyModule()` (where the checks are
moving to).

llvm-svn: 233602
2015-03-30 21:35:14 +00:00
Duncan P. N. Exon Smith fd07a2af23 DwarfDebug: Avoid creating new DebugLocs in the backend
Don't use `DebugLoc::getFnDebugLoc()`, which creates new `MDLocation`s,
in the backend.  We just want to grab the subprogram here anyway.

llvm-svn: 233601
2015-03-30 21:32:28 +00:00
Paul Robinson c02e85859b Explain how to abandon a review.
llvm-svn: 233600
2015-03-30 21:27:28 +00:00
Duncan P. N. Exon Smith 1ceb0d2f86 DebugInfo: Remove dead code from old DebugLoc API
Remove old API for `DebugLoc` now that all the callers have been
updated.  If this broke your out-of-tree build, here's a quick map from
the old API to the new one:

    DebugLoc DebugLoc::getFromMDLocation(MDNode *)
      => DebugLoc::DebugLoc(MDLocation *)
      => explicit DebugLoc::DebugLoc(MDNode *) // works with broken code

    MDNode *DebugLoc::getAsMDNode(LLVMContext &)
      => MDLocation *DebugLoc::get()
      => DebugLoc::operator MDLocation *()
      => MDNode *DebugLoc::getAsMDNode() // works with broken code

    bool DebugLoc::isUnknown()
      => DebugLoc::operator MDLocation *()
          i.e.: if (MDLocation *DL = ...)
      => DebugLoc::operator bool() // works with broken code
          i.e.: if (DebugLoc DL = ...)

    void DebugLoc::getScopeAndInlinedAt(MDNode *&, MDNode *&)
      => use: MDNode *DebugLoc::getScope()
         and: MDLocation *DebugLoc::getInlinedAt()

    MDNode *DebugLoc::getScopeNode(LLVMContext &)
      => MDNode *DebugLoc::getInlinedAtScope()

    void DebugLoc::dump(LLVMContext &)
      => void DebugLoc::dump()

    void DebugLoc::getFnDebugLoc(LLVMContext &)
      => void DebugLoc::getFnDebugLoc()

    MDNode *DebugLoc::getScope(LLVMContext &)
      => MDNode *DebugLoc::getScope()

    MDNode *DebugLoc::getInlinedAt(LLVMContext &)
      => MDLocation *DebugLoc::getInlinedAt()

I've noted above the only functions that won't crash on broken code (due
to downcasting to `MDLocation`).  If your code could be dealing with
broken IR (i.e., you haven't run the verifier yet, or you've used a
temporary node that will eventually (but not yet) get RAUW'ed to an
`MDLocation`), you need to restrict yourself to those.

llvm-svn: 233599
2015-03-30 21:19:50 +00:00
Rafael Espindola 43006fba08 Use range loops and add missing braces.
llvm-svn: 233598
2015-03-30 21:18:36 +00:00
Duncan P. N. Exon Smith 4fff3ec3da Transforms: Fix a use of the old DebugLoc in unittests
Missed this one before.

llvm-svn: 233597
2015-03-30 21:05:29 +00:00
David Blaikie 3909da7f4b [opaque pointer type] More IRBuilder::createGEP (non-inbounds) migrations: CodeGenPrepare and SimplifyLibCalls
llvm-svn: 233596
2015-03-30 20:42:56 +00:00
Peter Collingbourne 915a4b13ef MC: For variable symbols, maintain MCSymbol::Section as a cache.
This fixes the visibility of symbols in certain edge cases involving aliases
with multiple levels of indirection.

Fixes PR19582.

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

llvm-svn: 233595
2015-03-30 20:41:21 +00:00
Derek Schuff 6ab52fabcf Add driver support for Native Client SDK
Add Tool and ToolChain support for clang to target the NaCl OS using the NaCl
SDK for x86-32, x86-64 and ARM.

Includes nacltools::Assemble and Link which are derived from gnutools. They
are similar to Linux but different enought that they warrant their own class.
Also includes a NaCl_TC in ToolChains derived from Generic_ELF with library
and include paths suitable for an SDK and independent of the system tools.

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

llvm-svn: 233594
2015-03-30 20:31:33 +00:00
Jordan Rose ad176b5e10 [analyzer] Add test for previous commit.
Again, this is being applied in a separate commit so that the previous commit
can be reverted while leaving the test in place.

rdar://problem/20335433

llvm-svn: 233593
2015-03-30 20:18:04 +00:00
Jordan Rose 3da3f8e045 [analyzer] Disable all retain count diagnostics on values that come from ivars.
This is imitating a pre-r228174 state where ivars are not considered tracked by
default, but with the addition that even ivars /with/ retain count information
(e.g. "[_ivar retain]; [ivar _release];") are not being tracked as well. This is
to ensure that we don't regress on values accessed through both properties and
ivars, which is what r228174 was trying to fix.

The issue occurs in code like this:

  [_contentView retain];
  [_contentView removeFromSuperview];
  [self addSubview:_contentView]; // invalidates 'self'
  [_contentView release];

In this case, the call to -addSubview: may change the value of self->_contentView,
and so the analyzer can't be sure that we didn't leak the original _contentView.
This is a correct conservative view of the world, but not a useful one. Until we
have a heuristic that allows us to not consider this a leak, not emitting a
diagnostic is our best bet.

This commit disables all of the ivar-related retain count tests, but does not
remove them to ensure that we don't crash trying to evaluate either valid or
erroneous code. The next commit will add a new test for the example above so
that this commit (and the previous one) can be reverted wholesale when a better
solution is implemented.

Rest of rdar://problem/20335433

llvm-svn: 233592
2015-03-30 20:18:00 +00:00
Jordan Rose 218772f87e [analyzer] Don't special-case ivars backing +0 properties.
Give up this checking in order to continue tracking that these values came from
direct ivar access, which will be important in the next commit.

Part of rdar://problem/20335433

llvm-svn: 233591
2015-03-30 20:17:47 +00:00
Duncan P. N. Exon Smith b8afdd6044 llvm-dis: Use the new `DebugLoc` API, NFC
Update tools/llvm-dis to use the new `DebugLoc` API.

llvm-svn: 233590
2015-03-30 20:04:06 +00:00
Duncan P. N. Exon Smith 2809cc7493 DebugInfo: Use new LLVM API for DebugLoc
Use the new API for `DebugLoc` added in r233573 before the old one
disappears.

llvm-svn: 233589
2015-03-30 20:01:41 +00:00
Richard Smith d7eef87e65 Updating code owners file per discussion with Doug at the 2014-10 dev meeting.
llvm-svn: 233588
2015-03-30 19:52:53 +00:00
Duncan P. N. Exon Smith ec819c096b Transforms: Use the new DebugLoc API, NFC
Update lib/Analysis and lib/Transforms to use the new `DebugLoc` API.

llvm-svn: 233587
2015-03-30 19:49:49 +00:00
Kit Barton e50adcb6b1 [PPC] Move argument range checks for HTM and crypto builtins to Sema
The argument range checks for the HTM and Crypto builtins were implemented in
CGBuiltin.cpp, not in Sema. This change moves them to the appropriate location
in SemaChecking.cpp. It requires the creation of a new method in the Sema class
to do checks for PPC-specific builtins.

http://reviews.llvm.org/D8672

llvm-svn: 233586
2015-03-30 19:40:59 +00:00
Duncan P. N. Exon Smith ab659fb3d0 IR: Use the new DebugLoc API, NFC
Update lib/IR and lib/Bitcode to use the new `DebugLoc` API.  Added an
explicit conversion to `bool` (avoiding a conversion to `MDLocation`),
since a couple of these use cases need to handle broken code.

llvm-svn: 233585
2015-03-30 19:40:05 +00:00
Paul Robinson 364266663b Verify 'optnone' can run DAG combiner when appropriate.
Adds a test to verify the behavior that r233153 restored: 'optnone'
does not spuriously disable the DAG combiner, and in fact there are
cases where the DAG combiner must run (even at -O0 or 'optnone') in
order for codegen to succeed.

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

llvm-svn: 233584
2015-03-30 19:37:44 +00:00
Justin Holewinski 0afca26e90 [NVPTX] Associate a minimum PTX version for each SM architecture
When a new SM architecture is introduced, it is only supported by the
current PTX version and later.  Make sure we are using at least the
minimum PTX version for the target architecture.

This also removes support for PTX ISA < 3.2.

llvm-svn: 233583
2015-03-30 19:30:55 +00:00
Duncan P. N. Exon Smith 9dffcd04f7 CodeGen: Use the new DebugLoc API, NFC
Update lib/CodeGen (and lib/Target) to use the new `DebugLoc` API.

llvm-svn: 233582
2015-03-30 19:14:47 +00:00
Kit Barton 58ee437c31 [PPC] Modify HTM and crypto intrinsics to inherit from GCCBuiltin
There was a change to the way some of the HTM and crypto builtins are being
handled in Clang. Previously, some of the builtins were dealt with in the
CodeGenFunction::EmitPPCBuiltinExpr method (in order to do range checking on
constant arguments). These check will been moved to Sema
http://reviews.llvm.org/D8672), which means those builtins will not be handled
in the EmitPPCBuiltinExpr method anymore. As a result, the definition of the
intrinsics in IntrinsicsPowerPC.td needs to be modified to inherit from the
GCCBuiltin definition.

http://reviews.llvm.org/D8673

llvm-svn: 233581
2015-03-30 18:46:15 +00:00
Duncan P. N. Exon Smith 51306ef9bc DebugInfo: Reflow printDebugLoc() to use early returns, NFC
llvm-svn: 233580
2015-03-30 18:45:11 +00:00
Lang Hames 3c9e20de2e [Orc] Separate callback manager selection from callback manager construction for
OrcLazyJIT in lli.

Separating these concerns enables more natural error handling.

llvm-svn: 233579
2015-03-30 18:37:01 +00:00
Duncan P. N. Exon Smith 1facf7a13d Bitcode: Reflow code to use early continues, NFC
llvm-svn: 233578
2015-03-30 18:29:18 +00:00
Duncan P. N. Exon Smith b525e1c07c SelectionDAG: Reflow code to use early returns, NFC
llvm-svn: 233577
2015-03-30 18:23:28 +00:00
Justin Holewinski f94d5b5137 [NVPTX] Add options for PTX 4.1/4.2 and SM 3.2/3.7/5.2/5.3
llvm-svn: 233575
2015-03-30 18:12:50 +00:00
Ulrich Weigand 283ad7d6b4 [SystemZ] Fix fallout from r233543 on no-assert builds
Test cases must not check for symbolic variable names that are not
present in IR generated by no-assert builds.

Fixed by testing a more complete subset of the va_arg dataflow,
without relying on variable names.

llvm-svn: 233574
2015-03-30 18:08:50 +00:00