Peter Collingbourne [Wed, 24 Jun 2015 00:12:36 +0000 (00:12 +0000)]
COFF: Remove unused field SectionChunk::SectionIndex.
llvm-svn: 240512
Peter Collingbourne [Wed, 24 Jun 2015 00:12:34 +0000 (00:12 +0000)]
COFF: Add some error checking to SymbolTable::addCombinedLTOObject().
llvm-svn: 240511
Ahmed Bougacha [Wed, 24 Jun 2015 00:07:16 +0000 (00:07 +0000)]
[X86] Don't generate vbroadcasti128 for v4i64 splats from memory.
We used to erroneously match:
(v4i64 shuffle (v2i64 load), <0,0,0,0>)
Whereas vbroadcasti128 is more like:
(v4i64 shuffle (v2i64 load), <0,1,0,1>)
This problem doesn't exist for vbroadcastf128, which kept matching
the intrinsic after r231182. We should perhaps re-introduce the
intrinsic here as well, but that's a separate issue still being
discussed.
While there, add some proper vbroadcastf128 tests. We don't currently
match those, like for loading vbroadcastsd/ss on AVX (the reg-reg
broadcasts where added in AVX2).
Fixes PR23886.
llvm-svn: 240488
Peter Collingbourne [Wed, 24 Jun 2015 00:05:50 +0000 (00:05 +0000)]
COFF: Ignore debug symbols.
Differential Revision: http://reviews.llvm.org/D10675
llvm-svn: 240487
Pete Cooper [Wed, 24 Jun 2015 00:05:07 +0000 (00:05 +0000)]
Remove unused GlobalVariable::replaceUsesOfWithOnConstant. NFC.
The only caller of this method is Value::replaceAllUsesWith which
explicitly checks that we are not a GlobalValue. So replace the
body with an unreachable to ensure that we never call it.
The unreachable itself is moved to GlobalValue not GlobalVariable
as that is the base class of all the globals we don't want to call
this method on.
Note, this patch is short lived as i'll soon refactor all callers
of this method.
llvm-svn: 240486
Ahmed Bougacha [Wed, 24 Jun 2015 00:03:48 +0000 (00:03 +0000)]
[X86] update_llc_test_checks vector-shuffle-*. NFC.
Some of them had gone stale.
llvm-svn: 240485
Rui Ueyama [Wed, 24 Jun 2015 00:00:52 +0000 (00:00 +0000)]
COFF: Add names for logging/debugging to COMDAT chunks.
Chunks are basically unnamed chunks of bytes, and we don't like
to give them names. However, for logging or debugging, we want to
know symbols names of functions for COMDAT chunks. (For example,
we want to print out "we have removed unreferenced COMDAT section
which contains a function FOOBAR.")
This patch is to do that.
llvm-svn: 240484
Rui Ueyama [Tue, 23 Jun 2015 23:56:39 +0000 (23:56 +0000)]
COFF: Make link order compatible with MSVC link.exe.
Previously, we added files in directive sections to the symbol
table as we read the sections, so the link order was depth-first.
That's not compatible with MSVC link.exe nor the old LLD.
This patch is to queue files so that new files are added to the
end of the queue and processed last. Now addFile() doesn't parse
files nor resolve symbols. You need to call run() to process
queued files.
llvm-svn: 240483
Alex Lorenz [Tue, 23 Jun 2015 23:42:28 +0000 (23:42 +0000)]
MIR Serialization: Serialize immediate machine operands.
Reviewers: Duncan P. N. Exon Smith
Differential Revision: http://reviews.llvm.org/D10573
llvm-svn: 240481
Sanjay Patel [Tue, 23 Jun 2015 23:26:22 +0000 (23:26 +0000)]
fix typo; NFC
llvm-svn: 240480
Richard Smith [Tue, 23 Jun 2015 23:13:31 +0000 (23:13 +0000)]
Fix test failure if this value doesn't end up named %0.
llvm-svn: 240479
Sanjay Patel [Tue, 23 Jun 2015 23:05:08 +0000 (23:05 +0000)]
don't repeat function names in comments; NFC
llvm-svn: 240478
Petar Jovanovic [Tue, 23 Jun 2015 22:52:19 +0000 (22:52 +0000)]
Add "-mcpu=" option to llvm-rtdyld
This patch adds the -mcpu= option to llvm-rtdyld. With this option, one
can test relocations for different types of CPUs (e.g. Mips64r6).
Patch by Vladimir Radosavljevic.
Differential Revision: http://reviews.llvm.org/D10503
llvm-svn: 240477
Douglas Katzman [Tue, 23 Jun 2015 22:43:50 +0000 (22:43 +0000)]
Use range-based loops when handling OPT_print_search_dirs.
llvm-svn: 240476
Alex Lorenz [Tue, 23 Jun 2015 22:39:23 +0000 (22:39 +0000)]
MIR Parser: Use correct source locations for machine instruction diagnostics.
This commit translates the source locations for MIParser diagnostics from
the locations in the machine instruction string to the locations in the
MIR file.
Reviewers: Duncan P. N. Exon Smith
Differential Revision: http://reviews.llvm.org/D10574
llvm-svn: 240474
Peter Collingbourne [Tue, 23 Jun 2015 22:26:48 +0000 (22:26 +0000)]
Update SafeStack TODO in the safestack.cc
This patch clarifies the TODO note at the top of safestack.cc and brings
it more in sync with what we (the CPI team) actually plan to work on in
the future.
Patch by Volodymyr Kuznetsov!
Differential Revision: http://reviews.llvm.org/D10600
llvm-svn: 240473
Peter Collingbourne [Tue, 23 Jun 2015 22:24:45 +0000 (22:24 +0000)]
SafeStack documentation improvements
This patch makes the following improvements to the SafeStack documentation:
Explicitly states the security guarantees of the SafeStack
Clarifies which of the security guarantees are probabilistic
Re-orders security limitations to put the most severe ones first
Explains how `__attribute__((no_sanitize("safe-stack")))` works and how to use it safely
Explains that SafeStack should be combined with a forward-edge protection mechanism, such as CPI, IFCC or others
Multiple readability and stylistic improvements
Patch by Volodymyr Kuznetsov!
Differential Revision: http://reviews.llvm.org/D10598
llvm-svn: 240472
Pete Cooper [Tue, 23 Jun 2015 21:55:11 +0000 (21:55 +0000)]
Devirtualize Constant::destroyConstant.
This reorganizes destroyConstant and destroyConstantImpl.
Now there is only destroyConstant in Constant itself, while
subclasses are required to implement destroyConstantImpl.
destroyConstantImpl no longer calls delete but is instead only
responsible for removing the constant from any maps in which it
is contained.
Reviewed by Duncan Exon Smith.
llvm-svn: 240471
Chris Bieneman [Tue, 23 Jun 2015 21:39:57 +0000 (21:39 +0000)]
Working on reconciling out-of-tree patches to compiler-rt for building for iOS.
Summary:
This is one of many changes needed for compiler-rt to get it building on iOS.
Darwin doesn't have _Unwind_VRS_Get, instead use _Unwind_GetIP directly.
Note: this change does not enable building for iOS, as there are more changes to come.
Reviewers: kubabrecka, bogner, samsonov
Reviewed By: samsonov
Subscribers: samsonov, llvm-commits
Differential Revision: http://reviews.llvm.org/D10516
llvm-svn: 240470
Chris Bieneman [Tue, 23 Jun 2015 21:39:54 +0000 (21:39 +0000)]
Working on reconciling out-of-tree patches to compiler-rt for building for iOS.
Summary:
This is one of many changes needed for compiler-rt to get it building on iOS.
This change ifdefs out headers and functionality that aren't available on iOS, and adds support for iOS and the iOS simulator to as an.
Note: this change does not enable building for iOS, as there are more changes to come.
Reviewers: glider, kubabrecka, bogner, samsonov
Reviewed By: samsonov
Subscribers: samsonov, zaks.anna, llvm-commits
Differential Revision: http://reviews.llvm.org/D10515
llvm-svn: 240469
Chris Bieneman [Tue, 23 Jun 2015 21:39:52 +0000 (21:39 +0000)]
Working on reconciling out-of-tree patches to compiler-rt for building for iOS.
Summary:
This is one of many changes needed for compiler-rt to get it building on iOS.
This change ifdefs out headers and functionality that aren't available on iOS.
Note: this change does not enable building for iOS, as there are more changes to come.
Reviewers: glider, kubabrecka, bogner, samsonov
Reviewed By: samsonov
Subscribers: samsonov, llvm-commits
Differential Revision: http://reviews.llvm.org/D10514
llvm-svn: 240468
Chris Bieneman [Tue, 23 Jun 2015 21:39:49 +0000 (21:39 +0000)]
Working on reconciling out-of-tree patches to compiler-rt for building for iOS.
Summary:
This is one of many changes needed for compiler-rt to get it building on iOS.
This change does the following:
- Don't include crt_externs on iOS (it isn't available)
- Support ARM thread state objects
Note: this change does not enable building for iOS, as there are more changes to come.
Reviewers: glider, kubabrecka, bogner, samsonov
Reviewed By: samsonov
Subscribers: samsonov, aemerson, llvm-commits
Differential Revision: http://reviews.llvm.org/D10510
llvm-svn: 240467
Greg Clayton [Tue, 23 Jun 2015 21:27:50 +0000 (21:27 +0000)]
Implement the "qSymbol" packet in order to be able to read queue information in debugserver and return the info in the stop reply packets.
A "qSymbol::" is sent when shared libraries have been loaded by hooking into the Process::ModulesDidLoad() function from within ProcessGDBRemote. This function was made virtual so that the ProcessGDBRemote version is called, which then first calls the Process::ModulesDidLoad(), and then it queries for any symbol lookups that the remote GDB server might want to do.
This allows debugserver to request the "dispatch_queue_offsets" symbol so that it can read the queue name, queue kind and queue serial number and include this data as part of the stop reply packet. Previously each thread would have to do 3 memory reads in order to read the queue name.
This is part of reducing the number of packets that are sent between LLDB and the remote GDB server.
<rdar://problem/
21494354>
llvm-svn: 240466
Simon Pilgrim [Tue, 23 Jun 2015 21:18:15 +0000 (21:18 +0000)]
[X86][SSE] Added full set of 128-bit vector shift tests.
Removed some old duplicate tests.
llvm-svn: 240465
Benjamin Kramer [Tue, 23 Jun 2015 21:15:15 +0000 (21:15 +0000)]
[Driver] Give GnuTool LLVM_LIBRARY_VISIBILITY.
This is consistent with all other classes in Tools.h.
llvm-svn: 240464
Bob Wilson [Tue, 23 Jun 2015 21:10:24 +0000 (21:10 +0000)]
Improve error handling for PR22560.
The ARM _MoveToCoprocessor and _MoveFromCoprocessor builtins require
integer constants for most arguments, but clang was not checking that.
With this change, we now report meaningful errors instead of crashing
in the backend.
llvm-svn: 240463
Bob Wilson [Tue, 23 Jun 2015 21:10:15 +0000 (21:10 +0000)]
PR22560: Fix argument order for ARM _MoveToCoprocessor builtins.
The Microsoft-extension _MoveToCoprocessor and _MoveToCoprocessor2
builtins take the register value to be moved as the first argument,
but the corresponding mcr and mcr2 LLVM intrinsics expect that value
to be the third argument. Handle this as a special case, while still
leaving those intrinsics as generic MSBuiltins. I considered the
alternative of handling these in EmitARMBuiltinExpr, but that does
not work well for the follow-up change that I'm going to make to improve
the error handling for PR22560 -- we need the GetBuiltinType() checks
for ICEArguments, and the ARM version of that code is only used for
Neon intrinsics where the last argument is special and not
checked in the normal way.
llvm-svn: 240462
Jim Ingham [Tue, 23 Jun 2015 21:02:45 +0000 (21:02 +0000)]
Fix the handling of the run lock in cases where you needed to run
a hand-called function from the private state thread. The problem
was that on the way out of the private state thread, we try to drop
the run lock. That is appropriate for the main private state thread,
but not the secondary private state thread. Only the thread that
spawned them can know whether this is an appropriate thing to do or
not.
<rdar://problem/
21375352>
llvm-svn: 240461
Alexey Samsonov [Tue, 23 Jun 2015 21:00:08 +0000 (21:00 +0000)]
Let llvm::ReplaceInstWithInst copy debug location from old to new instruction.
Currently some users of this function do this explicitly, and all the
rest forget to do this.
ThreadSanitizer was one of such users, and had missing debug
locations for calls into TSan runtime handling atomic operations,
eventually leading to poorly symbolized stack traces and malfunctioning
suppressions.
This is another change relevant to PR23837.
llvm-svn: 240460
Evgeniy Stepanov [Tue, 23 Jun 2015 20:57:26 +0000 (20:57 +0000)]
Pass 2 more variables to lit tests.
Pass ADB and ADB_SERIAL environment variables to lit tests.
This would allow running Android tests in compiler-rt when
there is more than one device attached to the host.
llvm-svn: 240459
Tobias Grosser [Tue, 23 Jun 2015 20:55:05 +0000 (20:55 +0000)]
Replace srem by function call in nonaffine test cases
This makes the test cases nonaffine even if Polly some days gains support for
the srem instruction, an instruction which is currently not modeled but which
can clearly be modeled statically. A call to a function without definition
will always remain non-affine, as there is just insufficient static information
for it to be modeled more precisely.
llvm-svn: 240458
Tobias Grosser [Tue, 23 Jun 2015 20:55:01 +0000 (20:55 +0000)]
Add git patch files to .gitignore
llvm-svn: 240457
Marshall Clow [Tue, 23 Jun 2015 20:48:55 +0000 (20:48 +0000)]
Mark a couple of features as 'in progress'
llvm-svn: 240456
Douglas Katzman [Tue, 23 Jun 2015 20:42:09 +0000 (20:42 +0000)]
Pedantically rename all Tool subclasses to be nouns, not verbs. NFC
Classes in Tools.h inherit ultimately from Tool, which is a noun,
but subclasses of Tool were named for their operation, such as "Compile",
wherein the constructor call "Compile(args...)" could be misconstrued
as actually causing a compile to happen.
Likewise various other methods were not harmonious with their effect,
in that "BuildLinker()" returned a "new namespace::Link(...)"
instead of a "new namespace::Linker(...)" which it now does.
Exceptions: Clang and ClangAs are un-renamed. Those are their rightful names.
And there is no particulary great way to name the "Lipo-er" and a few others.
Differential Revision: http://reviews.llvm.org/D10595
llvm-svn: 240455
Lang Hames [Tue, 23 Jun 2015 20:35:31 +0000 (20:35 +0000)]
[lld] Add MachO thread-local storage support.
This allows LLD to correctly link MachO objects that use thread-local storage.
Differential Revision: http://reviews.llvm.org/D10578
llvm-svn: 240454
David Majnemer [Tue, 23 Jun 2015 20:34:18 +0000 (20:34 +0000)]
[MS ABI] Account for the virtual inheritance quirk when mangling
Virtual inheritance member pointers are always relative to the vbindex,
even when the member pointer doesn't point into a virtual base. This is
corrected by adjusting the non-virtual offset backwards from the vbptr
back to the top of the most derived class. While we performed this
adjustment when manifesting member pointers as constants or when
performing conversions, we didn't perform the adjustment when mangling
them.
llvm-svn: 240453
Justin Bogner [Tue, 23 Jun 2015 20:29:09 +0000 (20:29 +0000)]
InstrProf: Fix a crash when an implicit def appears in a macro
llvm-svn: 240452
Jim Ingham [Tue, 23 Jun 2015 20:26:45 +0000 (20:26 +0000)]
Remove a few uses of lldb.target, which is not valid
in a scripted command.
llvm-svn: 240451
Pirama Arumuga Nainar [Tue, 23 Jun 2015 20:24:53 +0000 (20:24 +0000)]
Fix incorrect truncation at the overflow boundary
Summary:
This patch fixes incorrect truncation when the input wider value is
exactly 2^dstBits. For that value, the overflow to infinity is not
correctly handled. The fix is to replace a strict '>' with '>='.
Currently,
__truncdfsf2(
340282366900000000000000000000000000000.0) returns infinity
__truncdfsf2(
340282366920938463463374607431768211456.0) returns 0
__truncdfsf2(
400000000000000000000000000000000000000.0) returns infinity
Likewise, __truncdfhf2 and __truncsfhf2 (and consequently gnu_f2h_ieee)
are discontinuous at 65536.0.
This patch adds tests for all three cases, along with adding a missing
header include to fp_test.h.
Reviewers: joerg, ab, srhines
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D10594
llvm-svn: 240450
Jay Foad [Tue, 23 Jun 2015 20:17:45 +0000 (20:17 +0000)]
[msan] Mark one test as only supported on x86
Summary: This test uses x86 intrinsics, so it can't work on other platforms.
Reviewers: garious, eugenis, samsonov
Reviewed By: samsonov
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D10652
llvm-svn: 240449
Sanjoy Das [Tue, 23 Jun 2015 20:09:03 +0000 (20:09 +0000)]
Revert "[FaultMaps] Move FaultMapParser to Object/"
This reverts commit r240364 (git
c49542e5bb186). The issue r240364 was
trying to fix was fixed independently in r240362.
llvm-svn: 240448
Peter Collingbourne [Tue, 23 Jun 2015 20:02:31 +0000 (20:02 +0000)]
COFF: Fix null pointer dereference.
llvm-svn: 240447
Benjamin Kramer [Tue, 23 Jun 2015 19:55:04 +0000 (19:55 +0000)]
[MachO] Initialize all fields of NormalizedFile.
The ObjectFileYAML.roundTrip serializes a default-constructed
NormalizedFile to YAML, triggering uninitialized memory reads.
While there use in-class member initializers.
llvm-svn: 240446
Benjamin Kramer [Tue, 23 Jun 2015 19:54:57 +0000 (19:54 +0000)]
Add missing dependencies for the CMake shared lld build.
llvm-svn: 240445
Dawn Perchik [Tue, 23 Jun 2015 19:21:44 +0000 (19:21 +0000)]
Fix FIXME comments in MiBreakTestCase.test_lldbmi_break_insert_settings as suggested by abidh (MI)
llvm-svn: 240444
Kaelyn Takata [Tue, 23 Jun 2015 19:13:17 +0000 (19:13 +0000)]
Make the typo resolution in r240441 apply to all function calls.
Regular function calls (such as to cabs()) run into the same problem
with handling dependent exprs, not just builtins with custom type
checking.
Fixes PR23775.
llvm-svn: 240443
Steven Wu [Tue, 23 Jun 2015 18:56:48 +0000 (18:56 +0000)]
Adding the missing LTO API to lto.exports
Summary:
lto_codegen_set_should_embed_uselists is introduced in r235943 but not
added to lto.exports. Add to export list to expose the API.
Reviewers: dexonsmith
Subscribers: rafael, llvm-commits
Differential Revision: http://reviews.llvm.org/D10658
llvm-svn: 240442
Kaelyn Takata [Tue, 23 Jun 2015 18:42:21 +0000 (18:42 +0000)]
Ensure delayed typos have been corrected in calls to builtins before
checking those calls when not in C++ mode, since those code paths can't
handle dependent exprs.
Fixes PR23740.
llvm-svn: 240441
Dawn Perchik [Tue, 23 Jun 2015 18:35:31 +0000 (18:35 +0000)]
Add support for displaying the language in the frame-format string.
Enable ${language} to be specified in the frame-format string to see
the current frame's compile unit language in "frame info".
Test Plan:
debug a C++ program, run to main, and run the lldb commands:
settings set frame-format "frame lang=${language}\n"
frame info
you should see:
frame lang=c++
test case added in:
./dotest.py --executable lldb -f SettingsCommandTestCase.test_set_frame_format
Reviewers: clayborg
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D10561
llvm-svn: 240440
Rafael Espindola [Tue, 23 Jun 2015 18:34:25 +0000 (18:34 +0000)]
Don't pass a 32 bit value to "%08" PRIx64.
Should fix the arm bots.
llvm-svn: 240439
Mark Heffernan [Tue, 23 Jun 2015 18:26:50 +0000 (18:26 +0000)]
This change fixes three bugs in loop unswitching. This change causes an 81% speed-up on a benchmark that is based on EigenConvolutionKernel2D from Eigen3, where the lack of loop unswitching blocks hoisting of loads out of a nested loop (see bug 23816 for how loop unswitching and load hoisting are related).
Change 1: Unswitching on trivial conditions should always happen regardless of the computed unswitching cost, as really the cost is zero. While there is code to make that happen, the logic that checks the unswitching cost against a threshold was moved to an earlier point (revision 147935) than the point where trivial unswitching is detected, so trivial unswitching is currently blocked by the cost threshold. This change fixes that.
Change 2: Before revision 147935 (from 2012-01-11), the threshold parameter was a per-loop threshold. So an unswitching happened only if the cost of the unswitching was less than the threshold. In an indirect way (and I believe unintentionally), the logic for this since then has been that the threshold is an over-all budget across all loops for all loop unswitching done by a given LoopUnswitch loop pass object. So if an unswitching with cost 100 happens in one function, that in effect reduces the threshold from 100 to 0 for the loops even in another function. This persists for the lifetime of that loop pass object. This makes no difference for most small examples but it is important for large examples. This revision fixes that.
Change 3: The cost is currently calculated as std::min(NumInstructions, 5 * NumBlocks). So a loop with 2 blocks and a million instructions will have an unswitching cost of 10. I changed this to just NumInstructions, as it were before revision 147935, though I'm open to e.g. instead replacing std::min with std::max.
I've tried to make the change minimally invasive while staying with what I think was the original intent of the code.
Submitted on behalf of broune@.
llvm-svn: 240438
Artem Belevich [Tue, 23 Jun 2015 18:22:17 +0000 (18:22 +0000)]
[NVPTX] Added missing test case for llvm.nvvm.sqrt.f NVPTX intrinsic
Differential Revision: http://reviews.llvm.org/D10663
llvm-svn: 240437
Alex Lorenz [Tue, 23 Jun 2015 18:22:10 +0000 (18:22 +0000)]
ADT: Add a string APSInt constructor.
This commit moves the APSInt initialization code that's used by
the LLLexer class into a new APSInt constructor that constructs
APSInts from strings.
This change is useful for MIR Serialization, as it would allow
the MILexer class to use the same APSInt initialization as
LLexer when parsing immediate machine operands.
llvm-svn: 240436
Oleksiy Vyalov [Tue, 23 Jun 2015 18:21:55 +0000 (18:21 +0000)]
Mark SBFrame::GetFunctionName and SBFrame::IsInlined as const.
llvm-svn: 240435
Ben Langmuir [Tue, 23 Jun 2015 18:20:23 +0000 (18:20 +0000)]
Use AddString/ReadString instead of doing it manually NFC
llvm-svn: 240434
Ben Langmuir [Tue, 23 Jun 2015 18:20:18 +0000 (18:20 +0000)]
[Modules] Consider -fmodule-feature in module hash and when loading
Any extra features from -fmodule-feature are part of the module hash and
need to get validated on load. Also print them with -module-file-info.
llvm-svn: 240433
Jim Grosbach [Tue, 23 Jun 2015 18:20:13 +0000 (18:20 +0000)]
Driver: Pass -I options to cc1as for .include search paths.
llvm-svn: 240432
Rafael Espindola [Tue, 23 Jun 2015 18:04:54 +0000 (18:04 +0000)]
Pass -m to the linker in this test.
Fixes the test on a ppc host.
llvm-svn: 240431
Aaron Ballman [Tue, 23 Jun 2015 17:31:30 +0000 (17:31 +0000)]
Adding a title to appease the sphinx build bot.
llvm-svn: 240430
Pavel Labath [Tue, 23 Jun 2015 17:15:14 +0000 (17:15 +0000)]
Fix build breakage after llvm r240426
Test Plan: It builds, tests pass.
Reviewers: tstellarAMD, rafael
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D10660
llvm-svn: 240429
Aaron Ballman [Tue, 23 Jun 2015 17:14:51 +0000 (17:14 +0000)]
AttributeReference.rst is automatically generated by a server-side process currently. To cut down on accidental commits to this file that are not properly reflected in AttrDocs.td (such as r215806 - r215808), this file now contains nothing but a comment explaining the current state of affairs.
llvm-svn: 240428
Alex Lorenz [Tue, 23 Jun 2015 17:10:10 +0000 (17:10 +0000)]
AsmParser: Extend the API to make the global value and metadata node slot mappings publicly accessible.
This commit creates a new structure called 'SlotMapping' in the AsmParser library.
This structure can be passed into the public parsing APIs from the AsmParser library
in order to extract the data structures that map from slot numbers to unnamed global
values and metadata nodes.
This change is useful for MIR Serialization, as the MIR Parser has to lookup the
unnamed global values and metadata nodes by their slot numbers.
Reviewers: Duncan P. N. Exon Smith
Differential Revision: http://reviews.llvm.org/D10551
llvm-svn: 240427
Tom Stellard [Tue, 23 Jun 2015 16:41:57 +0000 (16:41 +0000)]
ELF: Fix defintion of STT_LOOS and STT_HIOS.
Reviewers: chandlerc, Bigcheese, rafael
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D10647
llvm-svn: 240426
Alex Lorenz [Tue, 23 Jun 2015 16:35:26 +0000 (16:35 +0000)]
MIR Serialization: Serialize physical register machine operands.
This commit introduces functionality that's used to serialize machine operands.
Only the physical register operands are serialized by this commit.
Reviewers: Duncan P. N. Exon Smith
Differential Revision: http://reviews.llvm.org/D10525
llvm-svn: 240425
John Brawn [Tue, 23 Jun 2015 16:02:11 +0000 (16:02 +0000)]
[ARM] ARMLoadStoreOpt::UpdateBaseRegUses should stop on def
When UpdateBaseRegUses sees an instruction that defines the base
register it must stop, as the base register value it is updating is no
longer live. Ideally we would already have seen the register be killed
(which is already checked for), but the kill flags may be inaccurate
and we have to account for this.
Differential Revision: http://reviews.llvm.org/D10566
llvm-svn: 240424
Rafael Espindola [Tue, 23 Jun 2015 15:45:38 +0000 (15:45 +0000)]
objdump: Don't print a (always 0) size for MachO symbols.
Only common symbol on MachO and COFF have a size.
For COFF we already had a custom format.
For MachO, there is no native objdump and we were printing it as ELF. Now
we only print the sizes for symbols that actually have them.
llvm-svn: 240422
Justin Bogner [Tue, 23 Jun 2015 15:38:24 +0000 (15:38 +0000)]
SystemZ: Avoid left shifting negative values (it's UB)
Found by ubsan.
llvm-svn: 240420
Benjamin Kramer [Tue, 23 Jun 2015 15:28:10 +0000 (15:28 +0000)]
[Option] Plug a leak when move-assigning an InputArgList.
The class has a non-trivial dtor so we have to clean up before we move
in new members. Remove misleading comment as a default move assignment
operator will never be synthesized for this class.
llvm-svn: 240417
Benjamin Kramer [Tue, 23 Jun 2015 14:51:40 +0000 (14:51 +0000)]
Make helper functions static. NFC.
llvm-svn: 240416
Benjamin Kramer [Tue, 23 Jun 2015 14:47:36 +0000 (14:47 +0000)]
[BranchFolding] Document why replacing HashMachineInstr with hash_code doesn't work
llvm-svn: 240415
Benjamin Kramer [Tue, 23 Jun 2015 14:47:29 +0000 (14:47 +0000)]
[MachineBasicBlock] Add getFirstNonDebugInstr to complement getLastNonDebugInstr
Use it in CodeGen where applicable. No functionality change intended.
llvm-svn: 240414
Benjamin Kramer [Tue, 23 Jun 2015 14:47:18 +0000 (14:47 +0000)]
[MachineBasicBlock] Use the const_cast(this) trick to reduce duplication
NFC.
llvm-svn: 240413
Marshall Clow [Tue, 23 Jun 2015 14:45:02 +0000 (14:45 +0000)]
When building libc++, we use '"' as a delimiter instead of '<' when including libc++ header files. This is so that the dylib gets built with our headers; rather than the system-installed ones. We do this in most places already, just fixing a couple of inconsistent uses.
llvm-svn: 240412
Rafael Espindola [Tue, 23 Jun 2015 14:42:34 +0000 (14:42 +0000)]
Be sure to set the DataLayout before checking the cache.
This makes sure the same mangling is used.
Should fix the OS X bots.
llvm-svn: 240411
Toma Tabacu [Tue, 23 Jun 2015 14:39:42 +0000 (14:39 +0000)]
[mips] [IAS] Add partial support for the ULHU pseudo-instruction.
Summary:
This only adds support for ULHU of an immediate address with/without a source register.
It does not include support for ULHU of the address of a symbol.
Reviewers: dsanders
Reviewed By: dsanders
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D9671
llvm-svn: 240410
Alexey Bataev [Tue, 23 Jun 2015 14:25:19 +0000 (14:25 +0000)]
[OPENMP] Initial support for 'depend' clause (4.0).
Parsing and sema analysis (without support for array sections in arguments) for 'depend' clause (used in 'task' directive, OpenMP 4.0).
llvm-svn: 240409
Rafael Espindola [Tue, 23 Jun 2015 14:11:09 +0000 (14:11 +0000)]
Remove unused arguments and move ManglerPrefixTy to the implementation.
llvm-svn: 240408
Toma Tabacu [Tue, 23 Jun 2015 14:00:54 +0000 (14:00 +0000)]
[mips] [IAS] Add support for generating DADDu to createAddu(). NFC.
Summary: This isn't used right now, but it will be in some upcoming changes.
Reviewers: dsanders
Reviewed By: dsanders
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D10568
llvm-svn: 240407
Rafael Espindola [Tue, 23 Jun 2015 13:59:36 +0000 (13:59 +0000)]
Update for LLVM api change.
llvm-svn: 240406
Rafael Espindola [Tue, 23 Jun 2015 13:59:29 +0000 (13:59 +0000)]
Simplify the Mangler interface now that DataLayout is mandatory.
We only need to pass in a DataLayout when mangling a raw string, not when
constructing the mangler.
llvm-svn: 240405
Petar Jovanovic [Tue, 23 Jun 2015 13:54:42 +0000 (13:54 +0000)]
[mips64] Emit correct addend for some PC-relative relocations
So far, LLVM has not emitted correct addend for N64 and N32 ABI. This patch
fixes that. It also removes fixup from MCJIT for R_MIPS_PC16 relocation.
Patch by Vladimir Radosavljevic.
Differential Revision: http://reviews.llvm.org/D10565
llvm-svn: 240404
Krzysztof Parzyszek [Tue, 23 Jun 2015 13:50:23 +0000 (13:50 +0000)]
[Hexagon] Use MF reference from parent class in HexagonPacketizerList
llvm-svn: 240403
Aaron Ballman [Tue, 23 Jun 2015 13:41:03 +0000 (13:41 +0000)]
Moving r215806, r215807, and r215808 into AttrDocs.td. These changes were originally applied to the RST file that is automatically generated by the server, and so the changes were never properly reflected online once the server overwrote AttributeReference.rst.
llvm-svn: 240402
Aaron Ballman [Tue, 23 Jun 2015 13:29:33 +0000 (13:29 +0000)]
Fixing a build bot break from r240400.
llvm-svn: 240401
Aaron Ballman [Tue, 23 Jun 2015 13:15:32 +0000 (13:15 +0000)]
Clarify pointer ownership semantics by hoisting the std::unique_ptr creation to the caller instead of hiding it in emitReport. NFC.
llvm-svn: 240400
Daniel Marjamaki [Tue, 23 Jun 2015 12:45:14 +0000 (12:45 +0000)]
[clang-tidy] Fix false positives in misc-macro-parentheses checker
llvm-svn: 240399
Toma Tabacu [Tue, 23 Jun 2015 12:34:19 +0000 (12:34 +0000)]
[mips] [IAS] Move some function definitions to MipsTargetStreamer.cpp. NFC.
Summary: For the sake of consistency and to make some upcoming changes a little less noisy.
Reviewers: dsanders
Reviewed By: dsanders
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D10639
llvm-svn: 240398
Ewan Crawford [Tue, 23 Jun 2015 12:32:06 +0000 (12:32 +0000)]
Add handling of async notify packets
This patch adds a listener to the AynscThread in ProcessGDBRemote, specifically for dealing with any async notification packets.
From the broadcast our listener receives we can process the notify packet from the event data. A handler function then sets the thread stop info from this packet, and updates lldb by setting the process private state to stopped. Allowing the async thread to go back to sleep and getting the main thread to handle the implications of a state change.
When sending a vCont in nonstop mode we also get a different reply from all-stop mode, an OK response as opposed to a stop reply. So a condition is added to handle this and set the process state without the stop-reply data.
Reviewers: clayborg
Subscribers: lldb-commits, labath, ted, aidan.dodds, deepak2427
Differential Revision: http://reviews.llvm.org/D10544
llvm-svn: 240397
Rafael Espindola [Tue, 23 Jun 2015 12:29:52 +0000 (12:29 +0000)]
Don't repeat names in comments.
llvm-svn: 240396
Rafael Espindola [Tue, 23 Jun 2015 12:21:54 +0000 (12:21 +0000)]
Use MCSymbols for FastISel.
The summary is that it moves the mangling earlier and replaces a few
calls to .addExternalSymbol with addSym.
I originally wanted to replace all the uses of addExternalSymbol with
addSym, but noticed it was a lot of work and doesn't need to be done
all at once.
llvm-svn: 240395
Daniel Jasper [Tue, 23 Jun 2015 11:31:32 +0000 (11:31 +0000)]
Revert r240302 ("Bring r240130 back.").
This causes errors like:
ld: error: blah.o: requires dynamic R_X86_64_PC32 reloc against '' which
may overflow at runtime; recompile with -fPIC
blah.cc:function f(): error: undefined reference to ''
blah.o:g(): error: undefined reference to ''
I have not yet come up with an appropriate reproduction.
llvm-svn: 240394
Alexander Kornienko [Tue, 23 Jun 2015 10:48:35 +0000 (10:48 +0000)]
Revert r240271 (Fixed/added namespace ending comments using clang-tidy. NFC)
llvm-svn: 240393
Daniel Sanders [Tue, 23 Jun 2015 10:11:36 +0000 (10:11 +0000)]
[mips] llvm-readobj can parse .MIPS.abiflags. No need to check the bytes.
Summary:
Reviewers: atanasyan
Reviewed By: atanasyan
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D10538
llvm-svn: 240392
NAKAMURA Takumi [Tue, 23 Jun 2015 10:01:20 +0000 (10:01 +0000)]
Fix a warning. [-Wsign-compare]
FIXME: Should "Level" be unsigned?
llvm-svn: 240391
Alexander Kornienko [Tue, 23 Jun 2015 09:49:53 +0000 (09:49 +0000)]
Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC)
Apparently, the style needs to be agreed upon first.
llvm-svn: 240390
Yaron Keren [Tue, 23 Jun 2015 09:45:42 +0000 (09:45 +0000)]
Silence VC warning C4715: '`anonymous namespace'::getNativeVectorSizeForA VXABI' :
not all control paths return a value.
llvm-svn: 240389
Daniel Jasper [Tue, 23 Jun 2015 09:26:37 +0000 (09:26 +0000)]
Write output file to temp directory. The tests shouldn't assume that
they can write to the current working directory.
llvm-svn: 240388
NAKAMURA Takumi [Tue, 23 Jun 2015 08:37:21 +0000 (08:37 +0000)]
Tweak clang/test/Modules/modules-with-same-name.m to run with GnuWin32's find.exe on newer version of Windows.
It seems "*.pcm" would be expanded with current directory by NTOS 6.x's msvcrt. GnuWin32 utils are affected.
To avoid the issue, put an expression that msvcrt's glob won't match, like "*.pc[m]".
llvm-svn: 240387
Elena Demikhovsky [Tue, 23 Jun 2015 08:19:46 +0000 (08:19 +0000)]
AVX-512: Added all forms of VPABS instruction
Added all intrinsics, tests for encoding, tests for intrinsics.
llvm-svn: 240386
Justin Bogner [Tue, 23 Jun 2015 07:32:55 +0000 (07:32 +0000)]
MCExpr: Avoid UB by evaluating this shift as unsigned
We hit undefined behaviour in some MCExpr tests when the LHS of a left
shift is -1. Twos-complement semantics are completely reasonable here,
so we should just do the shift in unsigned.
llvm-svn: 240385