Commit Graph

194560 Commits

Author SHA1 Message Date
Michael J. Spencer 6a272cdc83 [ELF][x86-64] Make the X86_64LinkingContext and X86_64TargetHandler derivable.
llvm-svn: 230593
2015-02-26 00:47:34 +00:00
Jonathan Roelofs 49ff203ec4 Add remote testing support to the lit config.
Executors can be specified at configure time by using the -DLIBCXX_EXECUTOR=""
option. Examples include:

  $ cmake <other_flags> -DLIBCXX_EXECUTOR="TimeoutExecutor(30,LocalExecutor())"
      This runs individual tests with a maximum duration

  $ cmake <other_flags> -DLIBCXX_EXECUTOR="SSHExecutor('hostname','username')"
      This runs tests on a remote target, using scp to shuttle binaries to the
      target, and ssh to invoke commands there.

  $ cmake <other_flags> -DLIBCXX_EXECUTOR="PrefixExecutor('/path/to/run/script',LocalExecutor())"
      This assumes the script knows how to copy run the executables passed to it,
      and allows for the ultimate control. This is useful for running things
      inside emulators like Valgrind & QEMU.

TODO: This doesn't claim to support ShTest tests yet, that will take a bit more
  thought & finagling (I'm still not sure how to orchestrate copy-in for those cases.

  I've also punted on what to do about tests that read data files. The testsuite
  has several tests that need to read *.dat files placed next to them, and
  currently those aren't copied over when using, say, an SSHExecutor. The
  affected tests are:

     libc++ :: std/input.output/file.streams/fstreams/filebuf.virtuals/pbackfail.pass.cpp
     libc++ :: std/input.output/file.streams/fstreams/filebuf.virtuals/underflow.pass.cpp
     libc++ :: std/input.output/file.streams/fstreams/ifstream.assign/member_swap.pass.cpp
     libc++ :: std/input.output/file.streams/fstreams/ifstream.assign/move_assign.pass.cpp
     libc++ :: std/input.output/file.streams/fstreams/ifstream.assign/nonmember_swap.pass.cpp
     libc++ :: std/input.output/file.streams/fstreams/ifstream.cons/move.pass.cpp
     libc++ :: std/input.output/file.streams/fstreams/ifstream.cons/pointer.pass.cpp
     libc++ :: std/input.output/file.streams/fstreams/ifstream.cons/string.pass.cpp
     libc++ :: std/input.output/file.streams/fstreams/ifstream.members/close.pass.cpp
     libc++ :: std/input.output/file.streams/fstreams/ifstream.members/open_pointer.pass.cpp
     libc++ :: std/input.output/file.streams/fstreams/ifstream.members/open_string.pass.cpp
     libc++ :: std/input.output/file.streams/fstreams/ifstream.members/rdbuf.pass.cpp
     libc++ :: std/localization/locales/locale.convenience/conversions/conversions.buffer/pbackfail.pass.cpp
     libc++ :: std/localization/locales/locale.convenience/conversions/conversions.buffer/underflow.pass.cpp

Note: One thing to watch out for when using the SSHExecutor for cross-testing is
  that you'll also want to specify a TargetInfo object (so that the host's
  features aren't used for available-features checks and flags setup).

http://reviews.llvm.org/D7380

llvm-svn: 230592
2015-02-26 00:42:17 +00:00
Ramkumar Ramachandra 3408f3e296 PlaceSafepoints: use IRBuilder helpers
Use the IRBuilder helpers for gc.statepoint and gc.result, instead of
coding the construction by hand. Note that the gc.statepoint IRBuilder
handles only CallInst, not InvokeInst; retain that part of hand-coding.

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

llvm-svn: 230591
2015-02-26 00:35:56 +00:00
Reid Kleckner d6aab731e0 Silence unused variable warning in NDEBUG build
llvm-svn: 230590
2015-02-26 00:33:41 +00:00
Eric Christopher 8213f7f87d Fix a [-Werror,-Wreorder] initialization ordering error.
llvm-svn: 230589
2015-02-26 00:29:54 +00:00
Peter Collingbourne 4b0924dad6 docs: Document CFI padding and all-ones optimizations. Link to viewvc.
llvm-svn: 230588
2015-02-26 00:18:04 +00:00
Reid Kleckner 1df0fea593 Add -fuse-line-directive flag to control usage of #line with -E
Currently -fms-extensions controls this behavior, which doesn't make
much sense. It means we can't identify what is and isn't a system header
when compiling our own preprocessed output, because #line doesn't
represent this information.

If someone is feeding Clang's preprocessed output to another compiler,
they can use this flag.

Fixes PR20553.

Reviewers: rsmith

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

llvm-svn: 230587
2015-02-26 00:17:25 +00:00
Richard Smith ebdfc00995 Remove some unused includes of llvm/IR headers from parts of Clang that really
shouldn't depend on LLVM IR.

llvm-svn: 230586
2015-02-26 00:01:03 +00:00
Eric Christopher 5f54195e4a Remove a FIXME.
Explanation: This function is in TargetLowering because it uses
RegClassForVT which would need to be moved to TargetRegisterInfo
and would necessitate moving isTypeLegal over as well - a massive
change that would just require TargetLowering having a TargetRegisterInfo
class member that it would use.

llvm-svn: 230585
2015-02-26 00:00:35 +00:00
Eric Christopher 834d6420c1 Fix a couple of depedent->dependent typos.
llvm-svn: 230584
2015-02-26 00:00:33 +00:00
Eric Christopher 23a3a7c871 Remove an argument-less call to getSubtargetImpl from TargetLoweringBase.
This required plumbing a TargetRegisterInfo through computeRegisterProperties
and into findRepresentativeClass which uses it for register class
iteration. This required passing a subtarget into a few target specific
initializations of TargetLowering.

llvm-svn: 230583
2015-02-26 00:00:24 +00:00
Ramkumar Ramachandra f8ea847e48 MemDepPrinter: Fix some nits introduced in r228596
Differential Revision: http://reviews.llvm.org/D7644

llvm-svn: 230582
2015-02-25 23:55:00 +00:00
Philip Reames c5b0f56bb8 [GC docs] More minor word tweaks to make the GC bits clearer
llvm-svn: 230581
2015-02-25 23:52:06 +00:00
Larisse Voufo 697b32a0cb Improvement on sized deallocation from r230160:
Do not declare sized deallocation functions dependently on whether it is found in global scope. Instead, enforce the branching in emitted code by (1) declaring the functions extern_weak and (2) emitting sized delete expressions as a branching between both forms delete.

llvm-svn: 230580
2015-02-25 23:48:43 +00:00
Larisse Voufo 17151eba64 Fix typo.
llvm-svn: 230579
2015-02-25 23:48:35 +00:00
Michael J. Spencer 39c30439c1 Remove unused variables.
llvm-svn: 230578
2015-02-25 23:48:33 +00:00
Larisse Voufo 351f309dab Move -fdefine-sized-deallocation and -fno-sized-deallocation options from driver into CC1 for now.
llvm-svn: 230577
2015-02-25 23:48:25 +00:00
Philip Reames f80bbfffc2 [GC Docs] Update LangRef to link to Statepoint docs
Add a brief section linking to the experimental statepoint intrinsics analogous to the one we have linking to patchpoint.  

While I'm here, cleanup some wording about what the gc "name" attribute actually means.  It's not the name of a *collector* it's the name of the *strategy* which may be compatible with multiple collectors.

llvm-svn: 230576
2015-02-25 23:45:20 +00:00
Michael J. Spencer 751bb41be4 [ELF][x86] Detemplatify ELFT. There's only a single valid instantiation.
llvm-svn: 230574
2015-02-25 23:27:13 +00:00
Kostya Serebryany ba9422971c [asan] reenable odr-violation.cc test on non-x86-64 after confirming that it's fixed. PR22699
llvm-svn: 230573
2015-02-25 23:23:01 +00:00
Philip Reames e66255016d [GC docs] Fill in description of the statepoint-example GC strategy
llvm-svn: 230572
2015-02-25 23:22:43 +00:00
Peter Collingbourne 69b004d987 UBSan: Use the correct function prologue for x32.
llvm-svn: 230571
2015-02-25 23:18:42 +00:00
Philip Reames 09b52fd1ae [GC Docs] Minor wording clarification
llvm-svn: 230570
2015-02-25 23:07:34 +00:00
Alexey Samsonov 819045cdd6 [CMake] Properly detect whether we're building runtime for i386 or i686.
llvm-svn: 230569
2015-02-25 23:07:32 +00:00
David Majnemer dbdab4037e MS ABI: Turn throw into std::terminate for now, make try/catch "work"
This lets us compile programs which make use of exceptional constructs
statically without executing any of them dynamically.

llvm-svn: 230568
2015-02-25 23:01:21 +00:00
Justin Bogner a7ad4b3f3b Object: Handle Mach-O kext bundle files
This particular subtype of Mach-O was missing. Add it.

llvm-svn: 230567
2015-02-25 22:59:20 +00:00
Justin Bogner 2e427d4dbd InstrProf: Make the __llvm_profile_runtime_user symbol hidden
This symbol exists only to pull in the required pieces of the runtime,
so nothing ever needs to refer to it. Making it hidden avoids the
potential for issues with duplicate symbols when linking profiled
libraries together.

llvm-svn: 230566
2015-02-25 22:52:20 +00:00
Duncan P. N. Exon Smith 738889f752 IR: Drop newline from AssemblyWriter::printMDNodeBody()
Remove a newline from `AssemblyWriter::printMDNodeBody()`, and add one
to `AssemblyWriter::writeMDNode()`.  NFCI for assembly output.

However, this drops an inconsistent newline from `Metadata::print()`
when `this` is an `MDNode`.  Now the newline added by `Metadata::dump()`
won't look so verbose.

llvm-svn: 230565
2015-02-25 22:46:38 +00:00
Sanjay Patel cc29f4f2cb only propagate equality comparisons of FP values that we are certain are non-zero
This is a follow-on to r227491 which tightens the check for propagating FP
values. If a non-constant value happens to be a zero, we would hit the same
bug as before.

Bug noted and patch suggested by Eli Friedman.

llvm-svn: 230564
2015-02-25 22:46:08 +00:00
Justin Bogner 3588686baf InstrProf: Remove dead code in CoverageMappingReader
Remove a default argument that's never passed and a constructor that's
never called.

llvm-svn: 230563
2015-02-25 22:44:50 +00:00
Greg Clayton bc63aaccf7 Optimize finding the Complete Definition of an ObjC class for debug with .o files with lots of .o files.
When we have a debug map we have an executable with a bunch of STAB symbols and each source file has a N_SO symbol which scopes a bunch of symbols inside of it. We can use this to our advantage here when looking for the complete definition of an objective C class by looking for a symbol whose name matches the class name and whose type is eSymbolTypeObjCClass. If we find one, that symbol will be contained within a N_SO symbol. This symbol gets turned into a symbol whose type is eSymbolTypeSourceFile and that symbol will contain the eSymbolTypeObjCClass which helps us to locate the correct .o file and allows us to only look in that file.

To further accelerate things, if we are looking for the implementation, we can avoid looking at all .o files if we don't find a matching symbol because we have a debug map, which means the objective C symbol for the class can't have been stripped, so we can safely not search all remaining .o files. This will save us lots of time when trying to look for "NSObject" and any other AppKit and Foundation classes that we never have implementation definitions for.

<rdar://problem/19234225>

llvm-svn: 230562
2015-02-25 22:41:34 +00:00
Eric Christopher 75dbd7ca3e Move TargetLoweringBase::getTypeConversion to the .cpp file from
the .h file. It's used in only one place (other than recursively)
and there's no need to include it everywhere.

Saves almost 900k from total llvm object file size.

llvm-svn: 230561
2015-02-25 22:41:30 +00:00
JF Bastien d52c990a90 InstCombine: extract instead of shuffle when performing vector/array type punning
Summary: SROA generates code that isn't quite as easy to optimize and contains unusual-sized shuffles, but that code is generally correct. As discussed in D7487 the right place to clean things up is InstCombine, which will pick up the type-punning pattern and transform it into a more obvious bitcast+extractelement, while leaving the other patterns SROA encounters as-is.

Test Plan: make check

Reviewers: jvoung, chandlerc

Subscribers: llvm-commits
llvm-svn: 230560
2015-02-25 22:30:51 +00:00
Frederic Riss de3743453f [dwarfdump] Fix frame info register number dump.
llvm-svn: 230559
2015-02-25 22:30:09 +00:00
Richard Smith 8cebe37fe9 [modules] Even if we already have a definition of a class, loading in another
one can give us more lookup results (due to implicit special members). Be sure
to complete the redecl chain for every kind of DeclContext before performing a
lookup into it, rather than only doing so for NamespaceDecls.

llvm-svn: 230558
2015-02-25 22:20:13 +00:00
JF Bastien e9401f61c2 libc++: support newlib's ctype
Summary: Newlib supports ctype differently from other platforms, this patch teaches libc++ about yet another platform that does ctype differently.

Reviewers: jroelofs

Subscribers: cfe-commits, danalbert, EricWF, jvoung, jfb, mclow.lists

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

llvm-svn: 230557
2015-02-25 22:16:46 +00:00
Oleksiy Vyalov 6801be3354 Add qModuleInfo request in order to get module information (uuid, triple,..) by module path from remote platform.
http://reviews.llvm.org/D7709

llvm-svn: 230556
2015-02-25 22:15:44 +00:00
Duncan P. N. Exon Smith 89c1eaa531 IR: Annotate dump methods with LLVM_DUMP_METHOD
It turns out we have a macro to ensure that debuggers can access
`dump()` methods.  Use it.  Hopefully this will prevent me (and others)
from committing crimes like in r223802 (search for /10000/, or just see
the fix in r224407).

llvm-svn: 230555
2015-02-25 22:08:21 +00:00
Frederic Riss ac10b0d61d Try to appease buildbots.
It seems ArrayRefs to multi-dimensional arrays confuse some compilers.

llvm-svn: 230554
2015-02-25 22:07:43 +00:00
Hal Finkel cf59921670 [PowerPC] Make LDtocL and friends invariant loads
LDtocL, and other loads that roughly correspond to the TOC_ENTRY SDAG node,
represent loads from the TOC, which is invariant. As a result, these loads can
be hoisted out of loops, etc. In order to do this, we need to generate
GOT-style MMOs for TOC_ENTRY, which requires treating it as a legitimate memory
intrinsic node type. Once this is done, the MMO transfer is automatically
handled for TableGen-driven instruction selection, and for nodes generated
directly in PPCISelDAGToDAG, we need to transfer the MMOs manually.

Also, we were not transferring MMOs associated with pre-increment loads, so do
that too.

Lastly, this fixes an exposed bug where R30 was not added as a defined operand of
UpdateGBR.

This problem was highlighted by an example (used to generate the test case)
posted to llvmdev by Francois Pichet.

llvm-svn: 230553
2015-02-25 21:36:59 +00:00
Johannes Doerfert 1d8b9c1b1f Add the IMPACT2015 publications
It is important we add more publications with/about Polly so people
  can see that work and research is actually ongoing.

llvm-svn: 230552
2015-02-25 21:31:38 +00:00
Frederic Riss c0dd7243ee [dwarfdump] Make debug_frame dump actually useful.
This adds support for pretty-printing instruction operands. The new
output looks like:

00000000 00000010 ffffffff CIE
  Version:               1
  Augmentation:
  Code alignment factor: 1
  Data alignment factor: -4
  Return address column: 8

  DW_CFA_def_cfa:  reg4 +4
  DW_CFA_offset:  reg8 -4
  DW_CFA_nop:
  DW_CFA_nop:

00000014 00000010 00000000 FDE cie=00000000 pc=00000000...00000022
  DW_CFA_advance_loc:  3
  DW_CFA_def_cfa_offset:  +12
  DW_CFA_nop:

llvm-svn: 230551
2015-02-25 21:30:22 +00:00
Frederic Riss 2fe0e54fd6 [dwarfdump] Don't print meaningless pointer.
CIE pointers were never filled in before, and printing the pointer
is totally pointless anyway.

llvm-svn: 230550
2015-02-25 21:30:19 +00:00
Frederic Riss 056ad058bb DWARFDebugFrame: Move some code around. NFC.
Move the FrameEntry::dumpInstructions down in the file at some
place where it can see the declarations of FDE and CIE.

llvm-svn: 230549
2015-02-25 21:30:16 +00:00
Frederic Riss 41bb2c6d4f DWARFDebugFrame: Add some trivial accessors. NFC.
To be used for dumping.

llvm-svn: 230548
2015-02-25 21:30:13 +00:00
Frederic Riss baf195f7eb DWARFDebugFrame: Actually collect CIEs associated with FDEs.
This is the first commit in a small series aiming at making
debug_frame dump more useful (right now it prints a list of
opeartions without their operands).

llvm-svn: 230547
2015-02-25 21:30:09 +00:00
Johannes Doerfert ae70ec88ae Add myself to the contributors of Polly
llvm-svn: 230546
2015-02-25 21:26:03 +00:00
Johannes Doerfert a8727861b5 Add non-affine subregions to the TODO list
llvm-svn: 230545
2015-02-25 21:20:57 +00:00
Manman Ren 082a336a89 [LTO API] fix memory leakage introduced at r230290.
r230290 released the LLVM module but not the LTOModule.

rdar://19024554

llvm-svn: 230544
2015-02-25 21:20:53 +00:00
David Majnemer e1bbad9eb2 X86, Win64: Allow 'mov' to restore the stack pointer if we have a FP
The Win64 epilogue structure is very restrictive, it permits a very
small number of opcodes and none of them are 'mov'.

This means that given:
  mov %rbp, %rsp
  pop %rbp

The mov isn't the epilogue, only the pop is.  This is problematic unless
a frame pointer is present in which case we are free to do whatever we'd
like in the "body" of the function.  If a frame pointer is present,
unwinding will undo the prologue operations in reverse order regardless
of the fact that we are at an instruction which is reseting the stack
pointer.

llvm-svn: 230543
2015-02-25 21:13:37 +00:00