Commit Graph

185990 Commits

Author SHA1 Message Date
NAKAMURA Takumi 8d8f396d86 R600/LLVMBuild.txt: Add TransformUtils.
llvm-svn: 221228
2014-11-04 02:16:53 +00:00
Tim Northover 43361440bd Docs: give binutils/gold instructions for CMake too.
Patch by Steve King.

llvm-svn: 221227
2014-11-04 02:16:03 +00:00
Reid Kleckner dd3f3edafa Revert "Transforms: reapply SVN r219899"
This reverts commit r220811 and r220839. It made an incorrect change to
musttail handling.

llvm-svn: 221226
2014-11-04 02:02:14 +00:00
Alexey Samsonov 8f1632d5c1 [TSan] Don't strip binary/library name until the moment we print it.
This commit changes the place where TSan runtime turns full path
to binary or shared library into its basename
(/usr/foo/mybinary -> mybinary). Instead of doing it as early as possible
(when we obtained the full path from the symbolizer), we now do it as
late as possible (right before printing the error report).

This seems like a right thing to do - stripping to basename is a detail
of report formatting implementation, and should belong there. Also, we
might need the full path at some point - for example, to match the
suppressions.

llvm-svn: 221225
2014-11-04 01:55:20 +00:00
Eric Fiselier 49c541a754 Add test for type properties of std::reference_wrapper
llvm-svn: 221224
2014-11-04 01:54:44 +00:00
Mark Heffernan 2e25042a93 Remove setPreservesCFG from instcombine. The pass, in particular, does not
preserve LoopSimplify because instcombine may replace branch predicates
with undef which loop simplify then replaces with always exit.  Replace
setPreservesCFG with the more constrained preservation of DomTree and
LoopInfo.

llvm-svn: 221223
2014-11-04 01:51:01 +00:00
Michael J. Spencer 04162eaced [llvm-api-change] Use findProgramByName.
llvm-svn: 221222
2014-11-04 01:30:55 +00:00
Michael J. Spencer f9074b5a91 Use findProgramByName.
llvm-svn: 221221
2014-11-04 01:29:59 +00:00
Michael J. Spencer 65ffd92f07 [Support][Program] Add findProgramByName(Name, OptionalPaths)
llvm-svn: 221220
2014-11-04 01:29:29 +00:00
Reid Kleckner bfe73d7506 Use the LLVM_GNUC_PREREQ macro instead of the longhand version check
llvm-svn: 221219
2014-11-04 01:28:33 +00:00
Reid Kleckner 6847d05f06 Remove the END_WITH_NULL macro now that Clang doesn't use it
llvm-svn: 221218
2014-11-04 01:15:53 +00:00
Reid Kleckner 8cd0079d16 Use the new LLVM_END_WITH_NULL name
llvm-svn: 221217
2014-11-04 01:13:43 +00:00
Kevin Enderby 72cdbf47a9 Remove the static version of getScatteredRelocationType() now that r221211 added
a public version MachOObjectFile::getScatteredRelocationType().

This should fix the build bot for the unused function error.

llvm-svn: 221216
2014-11-04 01:12:39 +00:00
Reid Kleckner e1e1df83f9 Rename END_WITH_NULL to LLVM_END_WITH_NULL and move to Compiler.h
We shouldn't put this kind of attribute stuff in DataTypes.h.

Leave the END_WITH_NULL name for now so I can update clang without
making build spam.

llvm-svn: 221215
2014-11-04 01:12:21 +00:00
Sanjoy Das e839965faa The patchpoint lowering logic would crash with live constants equal to
the tombstone or empty keys of a DenseMap<int64_t, T>.  This patch
fixes the issue (and adds a tests case).

llvm-svn: 221214
2014-11-04 00:59:21 +00:00
Greg Clayton 8691dc5b75 Fixed SBTarget::ReadMemory() to work correctly and the TestTargetAPI.py test case that was reading target memory in TargetAPITestCase.test_read_memory_with_dsym and TargetAPITestCase.test_read_memory_with_dwarf.
The problem was that SBTarget::ReadMemory() was making a new section offset lldb_private::Address by doing:


size_t
SBTarget::ReadMemory (const SBAddress addr,
                      void *buf,
                      size_t size,
                      lldb::SBError &error)
{
        ...
        lldb_private::Address addr_priv(addr.GetFileAddress(), NULL);
        bytes_read = target_sp->ReadMemory(addr_priv, false, buf, size, err_priv);


This is wrong. If you get the file addresss from the "addr" argument and try to read memory using that, it will think the file address is a load address and it will try to resolve it accordingly. This will work fine if your executable is loaded at the same address (no slide), but it won't work if there is a slide.

The fix is to just pass along the "addr.ref()" instead of making a new addr_priv as this will pass along the lldb_private::Address that is inside the SBAddress (which is what we want), and not always change it into something that becomes a load address (if we are running), or abmigious file address (think address zero when you have 150 shared libraries that have sections that start at zero, which one would you pick). The main reason for passing a section offset address to SBTarget::ReadMemory() is so you _can_ read from the actual section + offset that is specified in the SBAddress. 

llvm-svn: 221213
2014-11-04 00:56:30 +00:00
David Majnemer 4eb0a3fd25 PECOFF: Use the string table for long section names in EXEs/DLLs
Normally, PE files have section names of eight characters or less.
However, this is problematic for DWARF because DWARF section names are
things like .debug_aranges.

Instead of truncating the section name, redirect the section name into
the string table.

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

llvm-svn: 221212
2014-11-04 00:53:57 +00:00
Kevin Enderby 9907d0a3c2 Add the code and test cases for 32-bit Intel to llvm-objdump’s Mach-O symbolizer.
llvm-svn: 221211
2014-11-04 00:43:16 +00:00
Colin LeMahieu 5241881bbc [Hexagon] Reverting 220584 to address ASAN errors.
llvm-svn: 221210
2014-11-04 00:14:36 +00:00
Sanjoy Das 429c9cae09 Change logic in StackMaps::recordStackMapOpers to use the isInt<32>
predicate instead of bitwise operations.

This is not a functional change.

llvm-svn: 221209
2014-11-04 00:06:57 +00:00
Sean Callanan 11533184d7 Added a test case for reading ivars from the
Objective-C runtime.  We'll need to do more
(subclasses, partially-defined classes, etc.)
but this tests that at least the basics work.

llvm-svn: 221208
2014-11-04 00:06:34 +00:00
Zachary Turner 8f21174700 Implement a framework for live debugging on Windows.
When processes are launched for debugging on Windows now, LLDB
will detect changes such as DLL loads and unloads, breakpoints,
thread creation and deletion, etc.

These notifications are not yet propagated to LLDB in a way that
LLDB understands what is happening with the process.  This only
picks up the notifications from the OS in a way that they can be
sent to LLDB with subsequent patches.

Reviewed by: Scott Graham

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

llvm-svn: 221207
2014-11-04 00:00:12 +00:00
Reid Kleckner 06ea7d6213 Lower __builtin_fabs* to @llvm.fabs.*
mingw64's headers implement fabs by calling __builtin_fabs, so using the
library call results in an infinite loop. If the backend legalizes
@llvm.fabs as a call to fabs later, things should work out, as the crt
provides a definition.

llvm-svn: 221206
2014-11-03 23:52:09 +00:00
Reid Kleckner 4cad00abf3 Remove dead AST type argument to EmitFAbs
llvm-svn: 221205
2014-11-03 23:51:40 +00:00
Akira Hatanaka bc950d52d7 Rename variables to conform to llvm coding standards.
Differential Revision: http://reviews.llvm.org/D6062

llvm-svn: 221204
2014-11-03 23:24:10 +00:00
Hal Finkel 840257a49c Use AA in LoadCombine
LoadCombine can be smarter about aborting when a writing instruction is
encountered, instead of aborting upon encountering any writing instruction, use
an AliasSetTracker, and only abort when encountering some write that might
alias with the loads that could potentially be combined.

This was originally motivated by comments made (and a test case provided) by
David Majnemer in response to PR21448. It turned out that LoadCombine was not
responsible for that PR, but LoadCombine should also be improved so that
unrelated stores (and @llvm.assume) don't interrupt load combining.

llvm-svn: 221203
2014-11-03 23:19:16 +00:00
David Blaikie 5b02a19f90 Use common range handling for the CU's ranges
This generalizes the range handling for ranges in both the skeleton and
full unit, laying the foundation for the addition of more ranges (rather
than just the CU's special case) in the skeleton CU with fission+gmlt.

llvm-svn: 221202
2014-11-03 23:10:59 +00:00
Greg Clayton a3f3fd35ae Fix this test to set a breakpoint at the correct location that will always get hit so it doesn't intermittently fail on MacOSX.
llvm-svn: 221201
2014-11-03 23:10:56 +00:00
Rafael Espindola 234d3bce01 Remove local handling of ASAN_OPTIONS and UBSAN_OPTIONS.
They are now forwarded by TestingConfig.py.

llvm-svn: 221200
2014-11-03 23:09:25 +00:00
Akira Hatanaka 9ee2c26b49 [AArch64] Make function processLogicalImmediate more efficient. NFC.
llvm-svn: 221199
2014-11-03 23:06:31 +00:00
Rafael Espindola 169758b50e Handle ASAN_OPTIONS and UBSAN_OPTIONS in TestingConfig.py
Currently they are passed to tests of llvm itself, but not, for example, lld.

With this patch the options are visible in every test.

llvm-svn: 221198
2014-11-03 23:04:56 +00:00
Greg Clayton ed59d756d8 Fixed a test suite error on MacOSX where people were using ".data" as the data section name for all file formats. Instead fix the test by finding the section by section type so the test is agnostic to the file format (and passes on MacOSX).
llvm-svn: 221197
2014-11-03 23:02:08 +00:00
Greg Clayton c91d49b505 Fixed a test suite error on MacOSX where people were using ".data" as the data section name for all file formats. Instead fix the test by finding the section by section type so the test is agnostic to the file format (and passes on MacOSX).
llvm-svn: 221196
2014-11-03 22:58:38 +00:00
Alexey Samsonov 7acb67607b [TSan] Remove bogus unused global variables
llvm-svn: 221195
2014-11-03 22:46:13 +00:00
Alexey Samsonov 40733a8024 [TSan] Use StackTrace from sanitizer_common where applicable
Summary:
This change removes `__tsan::StackTrace` class. There are
now three alternatives:
  # Lightweight `__sanitizer::StackTrace`, which doesn't own a buffer
  of PCs. It is used in functions that need stack traces in read-only
  mode, and helps to prevent unnecessary allocations/copies (e.g.
  for StackTraces fetched from StackDepot).
  # `__sanitizer::BufferedStackTrace`, which stores buffer of PCs in
  a constant array. It is used in TraceHeader (non-Go version)
  # `__tsan::VarSizeStackTrace`, which owns buffer of PCs, dynamically
  allocated via TSan internal allocator.

Test Plan: compiler-rt test suite

Reviewers: dvyukov, kcc

Reviewed By: kcc

Subscribers: llvm-commits, kcc

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

llvm-svn: 221194
2014-11-03 22:23:44 +00:00
Alexey Samsonov 46ecdeecc4 [TSan} Build Go version with -std=c++11
llvm-svn: 221192
2014-11-03 22:18:12 +00:00
Rafael Espindola 6ecaf237ef refactor duplicated code. NFC.
llvm-svn: 221191
2014-11-03 22:17:49 +00:00
Alexey Samsonov e6bbcfa3df [TSan] Fix signed-compare warning in the unit test
llvm-svn: 221190
2014-11-03 22:17:39 +00:00
Tobias Grosser 7f14dd53e9 Revert "Temporary disable formatting error"
This reverts commit r221159, as clang-format is again back to its old behaviour
and we do not cause any buildbot error messages any more.

llvm-svn: 221189
2014-11-03 22:11:20 +00:00
Reid Kleckner 899baf3625 Move the no-prototype calling conv check after decl merging
Now we don't warn on this code:
  void __stdcall f(void);
  void __stdcall f();

My previous commit regressed this functionality because I didn't update
the relevant test case which used a definition.

llvm-svn: 221188
2014-11-03 21:56:03 +00:00
David Majnemer 7e2b9882b1 InstCombine: Remove infinite loop caused by FoldOpIntoPhi
FoldOpIntoPhi could create an infinite loop if the PHI could potentially
reach a BB it was considering inserting instructions into.  The
instructions it would insert would eventually lead to other combines
firing which would, again, lead to FoldOpIntoPhi firing.

The solution is to handicap FoldOpIntoPhi so that it doesn't attempt to
insert instructions that the PHI might reach.

This fixes PR21377.

llvm-svn: 221187
2014-11-03 21:55:12 +00:00
David Blaikie 542616d47c Push the CURangeList down into the skeleton CU (where available) rather than the full CU
So that it may be shared between skeleton/full compile unit, for CU
ranges and other ranges to be added for fission+gmlt.

(at some point we might want some kind of object shared between the
skeleton and full compile units for all those things we only want one of
in that scope, rather than having the full unit always look through to
the skeleton... - alternatively, we might be able to have the skeleton
pointer (or another, separate pointer) point to the skeleton or to the
unit itself in non-fission, so we don't have to special case its
absence)

llvm-svn: 221186
2014-11-03 21:52:56 +00:00
Ahmed Bougacha ec0f3d755f [X86] Add debug print name for X86ISD::[US]MUL8. NFC-ish.
The opcodes were added in r220516, but I forgot to add the print names.

llvm-svn: 221185
2014-11-03 21:25:18 +00:00
Reid Kleckner 1eaa844f3e Don't diagnose no-prototype callee-cleanup function definitions
We already have a warning on the call sites of code like this:
  void f() { }
  void g() { f(1, 2, 3); }
t.c:2:21: warning: too many arguments in call to 'f'

We can limit ourselves to diagnosing unprototyped forward declarations
of f to cut down on noise.

llvm-svn: 221184
2014-11-03 21:24:50 +00:00
Rafael Espindola f0c7dbd1c8 [lit] Forward LD_PRELOAD to tests.
With this patch I can use asan to test the gold plugin without having
to build gold itself with asan.

llvm-svn: 221183
2014-11-03 21:24:43 +00:00
David Blaikie ce343492ee Add DwarfCompileUnit::BaseAddress to track the base address used by relative addressing in debug_ranges and debug_loc
This is one of a few steps to generalize range handling to include the
CU range (thus the CU's range list will be moved into the range list
list, losing track of the base address in the process), which means
generalizing ranges from both the skeleton and full unit under fission.

And... then I can used that generalized support for ranges in
fission+gmlt where there'll be a bunch more ranges in the skeleton.

llvm-svn: 221182
2014-11-03 21:15:30 +00:00
Greg Clayton 118593a3af The change previously committed as 220983 broke large binary memory reads. I kept the "idx - 1" fix from 220983, but reverted the while loop that was incorrectly added.
The details are: large packets (like large memory reads (m packets) or large binary memory reads (x packet)) can get responses that come in across multiple read() calls. The while loop that was added meant that if only a partial packet came in (like only "$abc" coming for a response) GDBRemoteCommunication::CheckForPacket() was called, it would deadlock in the while loop because no more data is going to come in as this function needs to be called again with more data from another read. So the original fix will need to be corrected and resubmitted.

<rdar://problem/18853744>

llvm-svn: 221181
2014-11-03 21:02:54 +00:00
Rafael Espindola b8ceaf15cd Fix leak found by asan.
llvm-svn: 221180
2014-11-03 20:55:23 +00:00
Rafael Espindola 1f9a45fdfb Fix a leak found by asan.
llvm-svn: 221179
2014-11-03 20:49:17 +00:00
Akira Hatanaka b961534818 [ARM, inline-asm] Fix ARMTargetLowering::getRegForInlineAsmConstraint to return
register class tGPRRegClass if the target is thumb1.

This commit fixes a crash that occurs during register allocation which was
triggered when a virtual register defined by an inline-asm instruction had to
be spilled.
 
rdar://problem/18740489

llvm-svn: 221178
2014-11-03 20:37:04 +00:00