platform/upstream/llvm.git
9 years ago[GC Docs] Minor wording clarification
Philip Reames [Wed, 25 Feb 2015 23:07:34 +0000 (23:07 +0000)]
[GC Docs] Minor wording clarification

llvm-svn: 230570

9 years ago[CMake] Properly detect whether we're building runtime for i386 or i686.
Alexey Samsonov [Wed, 25 Feb 2015 23:07:32 +0000 (23:07 +0000)]
[CMake] Properly detect whether we're building runtime for i386 or i686.

llvm-svn: 230569

9 years agoMS ABI: Turn throw into std::terminate for now, make try/catch "work"
David Majnemer [Wed, 25 Feb 2015 23:01:21 +0000 (23:01 +0000)]
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

9 years agoObject: Handle Mach-O kext bundle files
Justin Bogner [Wed, 25 Feb 2015 22:59:20 +0000 (22:59 +0000)]
Object: Handle Mach-O kext bundle files

This particular subtype of Mach-O was missing. Add it.

llvm-svn: 230567

9 years agoInstrProf: Make the __llvm_profile_runtime_user symbol hidden
Justin Bogner [Wed, 25 Feb 2015 22:52:20 +0000 (22:52 +0000)]
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

9 years agoIR: Drop newline from AssemblyWriter::printMDNodeBody()
Duncan P. N. Exon Smith [Wed, 25 Feb 2015 22:46:38 +0000 (22:46 +0000)]
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

9 years agoonly propagate equality comparisons of FP values that we are certain are non-zero
Sanjay Patel [Wed, 25 Feb 2015 22:46:08 +0000 (22:46 +0000)]
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

9 years agoInstrProf: Remove dead code in CoverageMappingReader
Justin Bogner [Wed, 25 Feb 2015 22:44:50 +0000 (22:44 +0000)]
InstrProf: Remove dead code in CoverageMappingReader

Remove a default argument that's never passed and a constructor that's
never called.

llvm-svn: 230563

9 years agoOptimize finding the Complete Definition of an ObjC class for debug with .o files...
Greg Clayton [Wed, 25 Feb 2015 22:41:34 +0000 (22:41 +0000)]
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

9 years agoMove TargetLoweringBase::getTypeConversion to the .cpp file from
Eric Christopher [Wed, 25 Feb 2015 22:41:30 +0000 (22:41 +0000)]
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

9 years agoInstCombine: extract instead of shuffle when performing vector/array type punning
JF Bastien [Wed, 25 Feb 2015 22:30:51 +0000 (22:30 +0000)]
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

9 years ago[dwarfdump] Fix frame info register number dump.
Frederic Riss [Wed, 25 Feb 2015 22:30:09 +0000 (22:30 +0000)]
[dwarfdump] Fix frame info register number dump.

llvm-svn: 230559

9 years ago[modules] Even if we already have a definition of a class, loading in another
Richard Smith [Wed, 25 Feb 2015 22:20:13 +0000 (22:20 +0000)]
[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

9 years agolibc++: support newlib's ctype
JF Bastien [Wed, 25 Feb 2015 22:16:46 +0000 (22:16 +0000)]
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

9 years agoAdd qModuleInfo request in order to get module information (uuid, triple,..) by modul...
Oleksiy Vyalov [Wed, 25 Feb 2015 22:15:44 +0000 (22:15 +0000)]
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

9 years agoIR: Annotate dump methods with LLVM_DUMP_METHOD
Duncan P. N. Exon Smith [Wed, 25 Feb 2015 22:08:21 +0000 (22:08 +0000)]
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

9 years agoTry to appease buildbots.
Frederic Riss [Wed, 25 Feb 2015 22:07:43 +0000 (22:07 +0000)]
Try to appease buildbots.

It seems ArrayRefs to multi-dimensional arrays confuse some compilers.

llvm-svn: 230554

9 years ago[PowerPC] Make LDtocL and friends invariant loads
Hal Finkel [Wed, 25 Feb 2015 21:36:59 +0000 (21:36 +0000)]
[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

9 years agoAdd the IMPACT2015 publications
Johannes Doerfert [Wed, 25 Feb 2015 21:31:38 +0000 (21:31 +0000)]
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

9 years ago[dwarfdump] Make debug_frame dump actually useful.
Frederic Riss [Wed, 25 Feb 2015 21:30:22 +0000 (21:30 +0000)]
[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

9 years ago[dwarfdump] Don't print meaningless pointer.
Frederic Riss [Wed, 25 Feb 2015 21:30:19 +0000 (21:30 +0000)]
[dwarfdump] Don't print meaningless pointer.

CIE pointers were never filled in before, and printing the pointer
is totally pointless anyway.

llvm-svn: 230550

9 years agoDWARFDebugFrame: Move some code around. NFC.
Frederic Riss [Wed, 25 Feb 2015 21:30:16 +0000 (21:30 +0000)]
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

9 years agoDWARFDebugFrame: Add some trivial accessors. NFC.
Frederic Riss [Wed, 25 Feb 2015 21:30:13 +0000 (21:30 +0000)]
DWARFDebugFrame: Add some trivial accessors. NFC.

To be used for dumping.

llvm-svn: 230548

9 years agoDWARFDebugFrame: Actually collect CIEs associated with FDEs.
Frederic Riss [Wed, 25 Feb 2015 21:30:09 +0000 (21:30 +0000)]
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

9 years agoAdd myself to the contributors of Polly
Johannes Doerfert [Wed, 25 Feb 2015 21:26:03 +0000 (21:26 +0000)]
Add myself to the contributors of Polly

llvm-svn: 230546

9 years agoAdd non-affine subregions to the TODO list
Johannes Doerfert [Wed, 25 Feb 2015 21:20:57 +0000 (21:20 +0000)]
Add non-affine subregions to the TODO list

llvm-svn: 230545

9 years ago[LTO API] fix memory leakage introduced at r230290.
Manman Ren [Wed, 25 Feb 2015 21:20:53 +0000 (21:20 +0000)]
[LTO API] fix memory leakage introduced at r230290.

r230290 released the LLVM module but not the LTOModule.

rdar://19024554

llvm-svn: 230544

9 years agoX86, Win64: Allow 'mov' to restore the stack pointer if we have a FP
David Majnemer [Wed, 25 Feb 2015 21:13:37 +0000 (21:13 +0000)]
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

9 years ago[Orc][Kaleidoscope] Clean up the Orc/Kaleidoscope tutorials to minimize the diffs
Lang Hames [Wed, 25 Feb 2015 20:58:28 +0000 (20:58 +0000)]
[Orc][Kaleidoscope] Clean up the Orc/Kaleidoscope tutorials to minimize the diffs
between them.

llvm-svn: 230542

9 years agoFix >80 line after r230530.
Kuba Brecka [Wed, 25 Feb 2015 20:56:04 +0000 (20:56 +0000)]
Fix >80 line after r230530.

llvm-svn: 230541

9 years agoLowerBitSets: Align referenced globals.
Peter Collingbourne [Wed, 25 Feb 2015 20:42:41 +0000 (20:42 +0000)]
LowerBitSets: Align referenced globals.

This change aligns globals to the next highest power of 2 bytes, up to a
maximum of 128. This makes it more likely that we will be able to compress
bit sets with a greater alignment. In many more cases, we can now take
advantage of a new optimization also introduced in this patch that removes
bit set checks if the bit set is all ones.

The 128 byte maximum was found to provide the best tradeoff between instruction
overhead and data overhead in a recent build of Chromium. It allows us to
remove ~2.4MB of instructions at the cost of ~250KB of data.

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

llvm-svn: 230540

9 years ago[CMake] Fix the clang-cl self host build.
Zachary Turner [Wed, 25 Feb 2015 20:42:19 +0000 (20:42 +0000)]
[CMake] Fix the clang-cl self host build.

This allows clang-cl to self-host cleanly with no magic setup
steps required.

After this patch, all you have to do is set CC=CXX=clang-cl and
run cmake -G Ninja.

These changes only exist to support C++ features which are
unsupported in clang-cl, so regardless of whether the user
specifies they want to use them, we still have to disable them.

llvm-svn: 230539

9 years agoRemove non-existent file from module map.
Richard Smith [Wed, 25 Feb 2015 20:20:39 +0000 (20:20 +0000)]
Remove non-existent file from module map.

llvm-svn: 230538

9 years ago[asan] restict no_asan_gen_globals.c test to 64-bit due to PR22682
Kostya Serebryany [Wed, 25 Feb 2015 20:19:23 +0000 (20:19 +0000)]
[asan] restict no_asan_gen_globals.c test to 64-bit due to PR22682

llvm-svn: 230537

9 years agoCFI: Add a check-cfi-and-supported rule.
Peter Collingbourne [Wed, 25 Feb 2015 20:14:05 +0000 (20:14 +0000)]
CFI: Add a check-cfi-and-supported rule.

This rule works like check-cfi, but fails if the tests are unsupported.
This is useful to run on bots if we want to be sure that the tests aren't
silently being skipped.

llvm-svn: 230536

9 years agoFixing a problem with insert location in WinEH outlining
Andrew Kaylor [Wed, 25 Feb 2015 20:12:49 +0000 (20:12 +0000)]
Fixing a problem with insert location in WinEH outlining

llvm-svn: 230535

9 years agoAllow (Object *)kMyGlobalCFObj casts without bridging
Ben Langmuir [Wed, 25 Feb 2015 20:09:06 +0000 (20:09 +0000)]
Allow (Object *)kMyGlobalCFObj casts without bridging

Previously we allowed these casts only for constants declared in system
headers, which we assume are retain/release-neutral. Now also allow them
for constants in user headers, treating them as +0.  Practically, this
means that we will now allow:
id x = (id)kMyGlobalConst;

But unlike with system headers we cannot mix them with +1 values:
id y = (id)(b ? kMyGlobalConst : [Obj newValAtPlusOne]); // error
id z = (id)(b ? kSystemGlobalConst: [Obj newValAtPlusOne]); // OK

Thanks to John for suggesting this improvement.

llvm-svn: 230534

9 years agoBugfix: SCEVExpander incorrectly marks increment operations as no-wrap
Sanjoy Das [Wed, 25 Feb 2015 20:02:59 +0000 (20:02 +0000)]
Bugfix: SCEVExpander incorrectly marks increment operations as no-wrap

(The change was landed in r230280 and caused the regression PR22674.
This version contains a fix and a test-case for PR22674).

When emitting the increment operation, SCEVExpander marks the
operation as nuw or nsw based on the flags on the preincrement SCEV.
This is incorrect because, for instance, it is possible that {-6,+,1}
is <nuw> while {-6,+,1}+1 = {-5,+,1} is not.

This change teaches SCEV to mark the increment as nuw/nsw only if it
can explicitly prove that the increment operation won't overflow.

Apart from the attached test case, another (more realistic)
manifestation of the bug can be seen in
Transforms/IndVarSimplify/pr20680.ll.

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

llvm-svn: 230533

9 years agoAdd missing #include found by modules buildbot.
Richard Smith [Wed, 25 Feb 2015 19:55:49 +0000 (19:55 +0000)]
Add missing #include found by modules buildbot.

llvm-svn: 230532

9 years agoRevert "Fix warnings found with clang-cl."
Zachary Turner [Wed, 25 Feb 2015 19:52:41 +0000 (19:52 +0000)]
Revert "Fix warnings found with clang-cl."

SWIG doesn't like enum : unsigned.  Revert this until I can
fix this in a way that swig likes.

llvm-svn: 230531

9 years ago[compiler-rt] Symbolizer refactoring: Move SymbolizerProcess interface to header
Kuba Brecka [Wed, 25 Feb 2015 19:50:38 +0000 (19:50 +0000)]
[compiler-rt] Symbolizer refactoring: Move SymbolizerProcess interface to header

Reviewed at http://reviews.llvm.org/D7868

llvm-svn: 230530

9 years ago[compiler-rt] Symbolizer refactoring: Move string parsing into separate functions
Kuba Brecka [Wed, 25 Feb 2015 19:35:08 +0000 (19:35 +0000)]
[compiler-rt] Symbolizer refactoring: Move string parsing into separate functions

Reviewed at http://reviews.llvm.org/D7869

llvm-svn: 230529

9 years agoUpdate isl to 0980603 'isl_tab_pip.c: parallel_constraints: drop useless assignment'
Tobias Grosser [Wed, 25 Feb 2015 19:34:52 +0000 (19:34 +0000)]
Update isl to 0980603 'isl_tab_pip.c: parallel_constraints: drop useless assignment'

This update contains:

  - Fixes of minor issues detected by clang's scan_build
  - More schedule tree infrastructure additions

This update slightly changes the output of our dependence analysis, but these
changes are purely syntactially.

llvm-svn: 230528

9 years agoclang-cl: Ignore /Fd silently
Reid Kleckner [Wed, 25 Feb 2015 19:17:50 +0000 (19:17 +0000)]
clang-cl: Ignore /Fd silently

While it's true that we don't create the PDB as requested on the command
line, this is a well-documented limitation. Warning about it doesn't
help people using legacy build systems with clang-cl, and it makes the
clang-cl self-host very noisy.

llvm-svn: 230527

9 years agoReland (2x) r230314, "Fix codegen for virtual methods that are (re-) exported from...
Reid Kleckner [Wed, 25 Feb 2015 19:17:48 +0000 (19:17 +0000)]
Reland (2x) r230314, "Fix codegen for virtual methods that are (re-) exported from multiple modules."

This reverts commits r230477 and r230478.

llvm-svn: 230526

9 years agoReland r230446, "MS ABI: Try to respect external AST source record layouts"
Reid Kleckner [Wed, 25 Feb 2015 19:17:45 +0000 (19:17 +0000)]
Reland r230446, "MS ABI: Try to respect external AST source record layouts"

It broke test/PCH/headersearch.cpp because it was using -Wpadding, which
only works for Itanium layout. Before this commit, we would use Itanium
record layout when using PCH, which is crazy. Now that the test uses an
explicit Itanium triple, we can reland.

llvm-svn: 230525

9 years agoUse Itanium triple in test using -Wpadding
Reid Kleckner [Wed, 25 Feb 2015 19:04:51 +0000 (19:04 +0000)]
Use Itanium triple in test using -Wpadding

-Wpadding is not implemented in the Microsoft record layout builder.
This test only passes on Windows because PCH forces us to use the
Itanium record layout builder. I'm about to fix that, so change the
test to not rely on that ridiculous behavior.

llvm-svn: 230524

9 years agoSolve hang on Windows when lldb fails to launch the process.
Zachary Turner [Wed, 25 Feb 2015 18:56:47 +0000 (18:56 +0000)]
Solve hang on Windows when lldb fails to launch the process.

The DebuggerThread was detecting the launch error, but it was
ignored by ProcessWindows::DoLaunch, causing LLDB to wait forever
in the debugger loop.

This fixes the test case that explicitly attempts to launch a
process from a non-existant path.

Patch by Adrian McCarthy
Differential Revision: http://reviews.llvm.org/D7874

llvm-svn: 230523

9 years agoFix warnings found with clang-cl.
Zachary Turner [Wed, 25 Feb 2015 18:42:47 +0000 (18:42 +0000)]
Fix warnings found with clang-cl.

Earlier this week I was able to get clang-cl on Windows to be
able to self host.  This opened the door to being able to
get a whole new slew of warnings for the Windows build.

This patch fixes all of the warnings, many of which were real
bugs.

llvm-svn: 230522

9 years agoRemoved all header files for OpenMP 2.5
Andrey Churbanov [Wed, 25 Feb 2015 18:38:08 +0000 (18:38 +0000)]
Removed all header files for OpenMP 2.5

llvm-svn: 230521

9 years agoExport the common header files to exports/ with CMake
Andrey Churbanov [Wed, 25 Feb 2015 18:32:30 +0000 (18:32 +0000)]
Export the common header files to exports/ with CMake

llvm-svn: 230520

9 years agoSet the Intel compiler as default when building for the MIC without CMake
Andrey Churbanov [Wed, 25 Feb 2015 18:30:50 +0000 (18:30 +0000)]
Set the Intel compiler as default when building for the MIC without CMake

llvm-svn: 230519

9 years ago[PowerPC] Cleanup unused target-specific SDAG nodes
Hal Finkel [Wed, 25 Feb 2015 18:06:45 +0000 (18:06 +0000)]
[PowerPC] Cleanup unused target-specific SDAG nodes

We had somehow accumulated a few target-specific SDAG nodes dealing with PPC64
TOC access that were referenced only in TableGen patterns. The associated
(pseudo-)instructions are used, but are being generated directly. NFC.

llvm-svn: 230518

9 years agoAArch64: Add debug message for large shift constants.
Matthias Braun [Wed, 25 Feb 2015 18:03:50 +0000 (18:03 +0000)]
AArch64: Add debug message for large shift constants.

As requested in code review.

llvm-svn: 230517

9 years ago[asan] temporary disable the test on non-x86-64 while we are investigating PR22699
Kostya Serebryany [Wed, 25 Feb 2015 18:03:03 +0000 (18:03 +0000)]
[asan] temporary disable the test on non-x86-64 while we are investigating PR22699

llvm-svn: 230516

9 years agoFix really obscure bug in CannotBeNegativeZero() (PR22688)
Sanjay Patel [Wed, 25 Feb 2015 18:00:15 +0000 (18:00 +0000)]
Fix really obscure bug in CannotBeNegativeZero() (PR22688)

With a diabolically crafted test case, we could recurse
through this code and return true instead of false.

The larger engineering crime is the use of magic numbers.
Added FIXME comments for those.

llvm-svn: 230515

9 years agoMake __leave test pass in -Asserts builds.
Nico Weber [Wed, 25 Feb 2015 17:44:04 +0000 (17:44 +0000)]
Make __leave test pass in -Asserts builds.

llvm-svn: 230514

9 years agoUpdate for clang r230512
David Majnemer [Wed, 25 Feb 2015 17:36:49 +0000 (17:36 +0000)]
Update for clang r230512

llvm-svn: 230513

9 years agoSema: Parenthesized bound destructor member expressions can be called
David Majnemer [Wed, 25 Feb 2015 17:36:15 +0000 (17:36 +0000)]
Sema: Parenthesized bound destructor member expressions can be called

We would wrongfully reject (a.~A)() in both the destructor and
pseudo-destructor cases.

This fixes PR22668.

llvm-svn: 230512

9 years agofix a typo
Chris Lattner [Wed, 25 Feb 2015 17:28:41 +0000 (17:28 +0000)]
fix a typo

llvm-svn: 230510

9 years agoMacOSX symbol table change to combine the N_GSYM debug map entry with the "_OBJC_CLAS...
Greg Clayton [Wed, 25 Feb 2015 17:25:02 +0000 (17:25 +0000)]
MacOSX symbol table change to combine the N_GSYM debug map entry with the "_OBJC_CLASS_$_", "_OBJC_METACLASS_$_", and "_OBJC_IVAR_$_" non debug symbols. This allows the symbol that represents the object file to contain the eSymbolTypeObjCClass and eSymbolTypeObjCMetaClass and will help us to be able to efficiently lookup the real definition of an objective C class without loading all .o files linearly to find the .o file that contains the true definition.

llvm-svn: 230509

9 years agoFix the dumping of symbol tables to be correctly alligned for all entries when using...
Greg Clayton [Wed, 25 Feb 2015 17:22:05 +0000 (17:22 +0000)]
Fix the dumping of symbol tables to be correctly alligned for all entries when using "image dump symtab".

llvm-svn: 230508

9 years agoAddress post-commit feedback on r230344: Don't use weak hooks on Sanitizer Go build...
Timur Iskhodzhanov [Wed, 25 Feb 2015 17:19:42 +0000 (17:19 +0000)]
Address post-commit feedback on r230344: Don't use weak hooks on Sanitizer Go build for Windows

llvm-svn: 230507

9 years agoReland r230019 - [ASan] Make the argument of '__sanitizer_annotate_contiguous_contain...
Timur Iskhodzhanov [Wed, 25 Feb 2015 17:03:34 +0000 (17:03 +0000)]
Reland r230019 - [ASan] Make the argument of '__sanitizer_annotate_contiguous_container' is not aligned error message easier to understand

This incorporates the fix for ARM architecture suggested by Renato Golin.

llvm-svn: 230506

9 years agoFix duplicate test code introduced by running "patch -p0" twice
Timur Iskhodzhanov [Wed, 25 Feb 2015 17:01:09 +0000 (17:01 +0000)]
Fix duplicate test code introduced by running "patch -p0" twice

Sorry, SVN had some weird problems so I had to revert and reapply the patch
locally a couple of times and didn't notice I've added file contents to the same
file....

llvm-svn: 230505

9 years agoFix formatting
Tobias Grosser [Wed, 25 Feb 2015 16:59:15 +0000 (16:59 +0000)]
Fix formatting

llvm-svn: 230504

9 years agoReland r230460 with a test fix for -Asserts builds.
Nico Weber [Wed, 25 Feb 2015 16:25:00 +0000 (16:25 +0000)]
Reland r230460 with a test fix for -Asserts builds.

Original CL description:
Produce less broken basic block sequences for __finally blocks.

The way cleanups (such as PerformSEHFinally) get emitted is that codegen
generates some initialization code, then calls the cleanup's Emit() with the
insertion point set to a good place, then the cleanup is supposed to emit its
stuff, and then codegen might tack in a jump or similar to where the insertion
point is after the cleanup.

The PerformSEHFinally cleanup tries to just stash away the block it's supposed
to codegen into, and then does codegen later, into that stashed block.  However,
after codegen'ing the __finally block, it used to set the insertion point to
the finally's continuation block (where the __finally cleanup goes when its body
is completed after regular, non-exceptional control flow).  That's not correct,
as that block can (and generally does) already ends in a jump.  Instead,
remember the insertion point that was current before the __finally got emitted,
and restore that.

Fixes two of the crashes in PR22553.

llvm-svn: 230503

9 years agoAdd missing "return" statements.
Hafiz Abid Qadeer [Wed, 25 Feb 2015 16:01:12 +0000 (16:01 +0000)]
Add missing "return" statements.

ExecutionContext::GetAddressByteSize() was calling GettAddressByteSize () on Target and Process class but was ignoring the return type. I have added the missing return.
No regression in the test suite. Committed as obvious.

llvm-svn: 230502

9 years agoReland r230419 - add __asan_default_suppressions() hook with a fix for Windows
Timur Iskhodzhanov [Wed, 25 Feb 2015 16:00:26 +0000 (16:00 +0000)]
Reland r230419 - add __asan_default_suppressions() hook with a fix for Windows

llvm-svn: 230501

9 years ago[MIPS]Multiple and add instructions for Mips are currently available in mips32r2...
Vladimir Medic [Wed, 25 Feb 2015 15:24:37 +0000 (15:24 +0000)]
[MIPS]Multiple and add instructions for Mips are currently available in mips32r2/mips64r2 and later but should also be available in mips4, mips5, and mips64. This patch fixes the requested features and updates the corresponding test files.

llvm-svn: 230500

9 years ago[X86][MMX] Reapply: Add MMX instructions to foldable tables
Bruno Cardoso Lopes [Wed, 25 Feb 2015 15:14:02 +0000 (15:14 +0000)]
[X86][MMX] Reapply: Add MMX instructions to foldable tables

Reapply r230248.

Teach the peephole optimizer to work with MMX instructions by adding
entries into the foldable tables. This covers folding opportunities not
handled during isel.

llvm-svn: 230499

9 years ago[X86][MMX] Prevent MMX_MOVD64rm folding
Bruno Cardoso Lopes [Wed, 25 Feb 2015 15:13:52 +0000 (15:13 +0000)]
[X86][MMX] Prevent MMX_MOVD64rm folding

MMX_MOVD64rm zero-extends i32 load results into i64 registers.

The peephole optimizer will try to fold it in other MMX foldable
instructions, the wrong thing to do, since there's no MMX memory
instruction that loads from i32 and does implict zero extension.

Remove 'canFoldAsLoad' from MOVD64rm in order to prevent such folding.
The current MMX tests already test this, but since there are no MMX
instructions in the foldable tables yet, this did not trigger. This
commit prepares the addition of those instructions.

llvm-svn: 230498

9 years ago[clang-tidy] Use the new ArrayRef<FixItHint> inserter.
Alexander Kornienko [Wed, 25 Feb 2015 14:42:02 +0000 (14:42 +0000)]
[clang-tidy] Use the new ArrayRef<FixItHint> inserter.

llvm-svn: 230497

9 years agoImprove handling of stack accesses in Thumb-1
Renato Golin [Wed, 25 Feb 2015 14:41:06 +0000 (14:41 +0000)]
Improve handling of stack accesses in Thumb-1

Thumb-1 only allows SP-based LDR and STR to be word-sized, and SP-base LDR,
STR, and ADD only allow offsets that are a multiple of 4. Make some changes
to better make use of these instructions:

* Use word loads for anyext byte and halfword loads from the stack.
* Enforce 4-byte alignment on objects accessed in this way, to ensure that
  the offset is valid.
* Do the same for objects whose frame index is used, in order to avoid having
  to use more than one ADD to generate the frame index.
* Correct how many bits of offset we think AddrModeT1_s has.

Patch by John Brawn.

llvm-svn: 230496

9 years agoAdd support for inserting ArrayRef<FixItHint> into DiagnosticBuilder.
Alexander Kornienko [Wed, 25 Feb 2015 14:40:56 +0000 (14:40 +0000)]
Add support for inserting ArrayRef<FixItHint> into DiagnosticBuilder.

This is going to be needed in clang-tidy as more checks add complex fixits.

llvm-svn: 230495

9 years agoInstrProf: Fix warnings for mixed declarations and code. NFC.
Vasileios Kalintiris [Wed, 25 Feb 2015 13:50:18 +0000 (13:50 +0000)]
InstrProf: Fix warnings for mixed declarations and code. NFC.

llvm-svn: 230494

9 years agoRemove use_pthread option from getBuildFlags in the test environment
Tamas Berghammer [Wed, 25 Feb 2015 13:26:28 +0000 (13:26 +0000)]
Remove use_pthread option from getBuildFlags in the test environment

Removing the option to require the usage of pthread based on an argument
of the getBuildFlags method in lldbtest.py because it can be specified
by a variable in the makefile for the given test case. Using the
variable in the makefile works in all supported platforms.

Differential revision: http://reviews.llvm.org/D7861

llvm-svn: 230493

9 years agoTruncate target file for stdout and stderr
Tamas Berghammer [Wed, 25 Feb 2015 13:21:45 +0000 (13:21 +0000)]
Truncate target file for stdout and stderr

Add O_TRUNC when opening file for redirecting stdout and stderr of the
process. It is neccessary because if the file exists then on some
platform the original content is kept while it isn't overwritten by the
new data causing pollution of the saved stdout and stderr.

llvm-svn: 230492

9 years ago[clang-tidy] Correct spelling error in test file name. NFC.
Alexander Kornienko [Wed, 25 Feb 2015 13:17:14 +0000 (13:17 +0000)]
[clang-tidy] Correct spelling error in test file name. NFC.

Patch by Richard Thomson!
http://reviews.llvm.org/D7603

llvm-svn: 230491

9 years ago[clang-tidy] Correct confusion between overwrite and override. NFC.
Alexander Kornienko [Wed, 25 Feb 2015 13:05:33 +0000 (13:05 +0000)]
[clang-tidy] Correct confusion between overwrite and override. NFC.

Patch by Richard Thomson!
http://reviews.llvm.org/D7604

llvm-svn: 230490

9 years agoSilencing a "result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift...
Aaron Ballman [Wed, 25 Feb 2015 13:05:24 +0000 (13:05 +0000)]
Silencing a "result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)" warning in MSVC; NFC.

llvm-svn: 230489

9 years agoSilencing a -Wsign-compare warning triggered in MSVC; NFC.
Aaron Ballman [Wed, 25 Feb 2015 13:02:23 +0000 (13:02 +0000)]
Silencing a -Wsign-compare warning triggered in MSVC; NFC.

llvm-svn: 230488

9 years agoFix global makefiles for the tests to support android
Tamas Berghammer [Wed, 25 Feb 2015 13:02:08 +0000 (13:02 +0000)]
Fix global makefiles for the tests to support android

Two changes are required to compile the tests for android
* Disable the usage of -lpthread as it is included by default on
  android
* Add -pie to the linker flags because android only support position
  independent executables

Differential revision: http://reviews.llvm.org/D7856

llvm-svn: 230487

9 years agoAdd option to set environment variables from dotest.py
Tamas Berghammer [Wed, 25 Feb 2015 12:22:40 +0000 (12:22 +0000)]
Add option to set environment variables from dotest.py

Setting environment variables are required when testing on a remote
target requiring different flags then the ones specified on the host OS.

Differential revision: http://reviews.llvm.org/D7854

llvm-svn: 230485

9 years agoAdd trailing return types (and noexcept specifications) to the 'diamond operators...
Marshall Clow [Wed, 25 Feb 2015 12:20:52 +0000 (12:20 +0000)]
Add trailing return types (and noexcept specifications) to the 'diamond operators'. Fixes PR#22600.

llvm-svn: 230484

9 years ago[clang-tidy] Fixed a false positive case in misc-inaccurate-erase checker.
Gabor Horvath [Wed, 25 Feb 2015 12:17:03 +0000 (12:17 +0000)]
[clang-tidy] Fixed a false positive case in misc-inaccurate-erase checker.

llvm-svn: 230483

9 years agoReplace obsolete -mattr=n64 command line option with -target-abi=n64. No functional...
Vladimir Medic [Wed, 25 Feb 2015 11:43:01 +0000 (11:43 +0000)]
Replace obsolete -mattr=n64 command line option with -target-abi=n64. No functional changes.

llvm-svn: 230482

9 years agoFix comment in test/tools/lldb-mi/main.cpp
Ilia K [Wed, 25 Feb 2015 11:04:40 +0000 (11:04 +0000)]
Fix comment in test/tools/lldb-mi/main.cpp

llvm-svn: 230481

9 years agoGlobalLayoutBuilder::addFragment(): Prune incorrect usage of \param(s). [-Wdocumentation]
NAKAMURA Takumi [Wed, 25 Feb 2015 11:04:36 +0000 (11:04 +0000)]
GlobalLayoutBuilder::addFragment(): Prune incorrect usage of \param(s). [-Wdocumentation]

llvm-svn: 230480

9 years agoFix UTF8 chars to ASCII.
NAKAMURA Takumi [Wed, 25 Feb 2015 11:02:00 +0000 (11:02 +0000)]
Fix UTF8 chars to ASCII.

llvm-svn: 230479

9 years agoWhitespace.
NAKAMURA Takumi [Wed, 25 Feb 2015 10:50:06 +0000 (10:50 +0000)]
Whitespace.

llvm-svn: 230478

9 years agoRevert r230448, "Reland r230314 "Fix codegen for virtual methods that are (re-) expor...
NAKAMURA Takumi [Wed, 25 Feb 2015 10:49:59 +0000 (10:49 +0000)]
Revert r230448, "Reland r230314 "Fix codegen for virtual methods that are (re-) exported from multiple modules."", since I have reverted r230446.

llvm-svn: 230477

9 years agoSkip symlinks to the original file when searching for debug info
Pavel Labath [Wed, 25 Feb 2015 10:44:35 +0000 (10:44 +0000)]
Skip symlinks to the original file when searching for debug info

Summary:
Symbols::LocateExecutableSymbolFile tries to locate the file in containing the debug info in a
splitdebug configuration. It tries to skip over the original file in its search path, but it was
easily fooled by symlinks. This changes the function to use llvm::sys::fs::equivalent, which can
correctly compare symlinks.

As a side effect, I had to fix one test because the address for the "abort" function resolves on
my system to "__GI_abort" now. With the debug info, the libc on my system contains two symbols
associated with the address of the abort function, and lldb prefers __GI_abort, possibly because
the debug info is associated with it. It would be nice at some point to have it prefer the public
symbol name.

Reviewers: emaste, zturner

Subscribers: lldb-commits

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

llvm-svn: 230476

9 years agoWhitespace.
NAKAMURA Takumi [Wed, 25 Feb 2015 10:32:20 +0000 (10:32 +0000)]
Whitespace.

llvm-svn: 230475

9 years agoRevert r230446, "MS ABI: Try to respect external AST source record layouts"
NAKAMURA Takumi [Wed, 25 Feb 2015 10:32:13 +0000 (10:32 +0000)]
Revert r230446, "MS ABI: Try to respect external AST source record layouts"

It fails on Clang::PCH/headersearch.cpp for targeting msvc.

llvm-svn: 230474

9 years agoclang-format: Fix spacing for function with ref-qualification ..
Daniel Jasper [Wed, 25 Feb 2015 10:30:06 +0000 (10:30 +0000)]
clang-format: Fix spacing for function with ref-qualification ..

.. when using SpacesInCStyleCastParentheses != SpacesInParentheses.

Before:
  FormatStyle Spaces = getLLVMStyle();
  Deleted &operator=(const Deleted &)& = default;

  Spaces.SpacesInParentheses = true;
  Deleted(const Deleted &)& = default;

  Spaces.SpacesInCStyleCastParentheses = true;
  Spaces.SpacesInParentheses= false;
  Deleted( const Deleted & )& = default;

After:
  FormatStyle Spaces = getLLVMStyle();
  Deleted &operator=(const Deleted &)& = default;;

  Spaces.SpacesInParentheses= true;
  Deleted( const Deleted & )& = default;

  Spaces.SpacesInCStyleCastParentheses = true;
  Spaces.SpacesInParentheses= false;
  Deleted(const Deleted &)& = default;

Patch by Jean-Philippe Dufraigne. Thank you!

llvm-svn: 230473

9 years agoRevert "Produce less broken basic block sequences for __finally blocks."
Daniel Jasper [Wed, 25 Feb 2015 10:07:14 +0000 (10:07 +0000)]
Revert "Produce less broken basic block sequences for __finally blocks."

The test is broken on buildbots:
http://lab.llvm.org:8080/green/job/clang-stage2-configure-Rlto_check/2279/

This reverts commit adda738b6dc533c42db5f5f5b31344098a3aba7d.

llvm-svn: 230472

9 years agoAVX-512: Gather and Scatter patterns
Elena Demikhovsky [Wed, 25 Feb 2015 09:46:31 +0000 (09:46 +0000)]
AVX-512: Gather and Scatter patterns
Gather and scatter instructions additionally write to one of the source operands - mask register.
In this case Gather has 2 destination values - the loaded value and the mask.
Till now we did not support code gen pattern for gather - the instruction was generated from
intrinsic only and machine node was hardcoded.
When we introduce the masked_gather node, we need to select instruction automatically,
in the standard way.
I added a flag "hasTwoExplicitDefs" that allows to handle 2 destination operands.

(Some code in the X86InstrFragmentsSIMD.td is commented out, just to split one big
patch in many small patches)

llvm-svn: 230471

9 years ago[OPENMP] Rename methods of OpenMPRuntime class. NFC.
Alexey Bataev [Wed, 25 Feb 2015 08:32:46 +0000 (08:32 +0000)]
[OPENMP] Rename methods of OpenMPRuntime class. NFC.

llvm-svn: 230470

9 years ago[Mips] Support mips-r6 path suffix for Adnroid MIPS toolchain
Simon Atanasyan [Wed, 25 Feb 2015 07:31:12 +0000 (07:31 +0000)]
[Mips] Support mips-r6 path suffix for Adnroid MIPS toolchain

This path suffix is used if user provides the -mips32r6 command line
options.

llvm-svn: 230469