Kuba Brecka [Fri, 5 Dec 2014 22:19:35 +0000 (22:19 +0000)]
Recommit of r223513 and r223514.
Reviewed at http://reviews.llvm.org/D6488
llvm-svn: 223533
Kuba Brecka [Fri, 5 Dec 2014 22:19:18 +0000 (22:19 +0000)]
Recommit of r223513 and r223514.
Reviewed at http://reviews.llvm.org/D6488
llvm-svn: 223532
Nick Kledzik [Fri, 5 Dec 2014 22:03:28 +0000 (22:03 +0000)]
[mach-o] fix leak in atoms -> normalized
llvm-svn: 223530
Nick Kledzik [Fri, 5 Dec 2014 22:03:26 +0000 (22:03 +0000)]
[mach-o] Switch MachOFile and MachODylibFile to use BumpPtr in lld::File
llvm-svn: 223529
Nick Kledzik [Fri, 5 Dec 2014 22:03:23 +0000 (22:03 +0000)]
Add BumpPtrAllocator to lld::File. Switch SimpleDefinedAtom to allocate
its SimpleRefernces using the BumpPtrAllocator.
llvm-svn: 223528
Nick Kledzik [Fri, 5 Dec 2014 22:03:20 +0000 (22:03 +0000)]
[mach-o] Pass vectors by reference and name empty vector.
llvm-svn: 223527
Richard Smith [Fri, 5 Dec 2014 21:52:58 +0000 (21:52 +0000)]
Make DiagnosticErrorTrap work even if SuppressAllDiagnostics is enabled.
Patch by Brad King!
llvm-svn: 223525
Rui Ueyama [Fri, 5 Dec 2014 21:52:02 +0000 (21:52 +0000)]
[PECOFF] Fix exported symbols in an import library.
Looks like if you have symbol foo in a module-definition file
(.def file), and if the actual symbol name to match that export
description is _foo@x (where x is an integer), the exported
symbol name becomes this.
- foo in the .dll file
- foo@x in the .lib file
I have checked in a few fixes recently for exported symbol name mangling.
I haven't found a simple rule that governs all the mangling rules.
There may not ever exist. For now, this is a patch to improve .lib
file compatibility.
llvm-svn: 223524
Colin LeMahieu [Fri, 5 Dec 2014 21:51:12 +0000 (21:51 +0000)]
[Hexagon] Relocating logical instructions and templates later in the td file.
llvm-svn: 223523
Colin LeMahieu [Fri, 5 Dec 2014 21:38:29 +0000 (21:38 +0000)]
[Hexagon] Adding sub/and/or reg, imm forms
llvm-svn: 223522
Rafael Espindola [Fri, 5 Dec 2014 21:36:06 +0000 (21:36 +0000)]
Remove dead code. We are only lazy about functions with bodies.
llvm-svn: 223521
Kuba Brecka [Fri, 5 Dec 2014 21:32:46 +0000 (21:32 +0000)]
Reverting r223513 and r223514.
llvm-svn: 223520
Kuba Brecka [Fri, 5 Dec 2014 21:32:22 +0000 (21:32 +0000)]
Reverting r223513 and r223514.
llvm-svn: 223519
Sanjay Patel [Fri, 5 Dec 2014 21:28:14 +0000 (21:28 +0000)]
Optimize merging of scalar loads for 32-byte vectors [X86, AVX]
Fix the poor codegen seen in PR21710 ( http://llvm.org/bugs/show_bug.cgi?id=21710 ).
Before we crack 32-byte build vectors into smaller chunks (and then subsequently
glue them back together), we should look for the easy case where we can just load
all elements in a single op.
An example of the codegen change is:
From:
vmovss 16(%rdi), %xmm1
vmovups (%rdi), %xmm0
vinsertps $16, 20(%rdi), %xmm1, %xmm1
vinsertps $32, 24(%rdi), %xmm1, %xmm1
vinsertps $48, 28(%rdi), %xmm1, %xmm1
vinsertf128 $1, %xmm1, %ymm0, %ymm0
retq
To:
vmovups (%rdi), %ymm0
retq
Differential Revision: http://reviews.llvm.org/D6536
llvm-svn: 223518
Peter Collingbourne [Fri, 5 Dec 2014 21:22:36 +0000 (21:22 +0000)]
[DFSAN][MIPS] adding support of DFSAN for MIPS64
Minor changes to enable DFSAN on MIPS64
Patch by Kumar Sukhani!
Differential Revision: http://reviews.llvm.org/D6437
llvm-svn: 223517
Peter Collingbourne [Fri, 5 Dec 2014 21:22:32 +0000 (21:22 +0000)]
[DFSAN][MIPS][LLVM] Defining ShadowPtrMask variable for MIPS64
Patch by Kumar Sukhani!
corresponding compiler-rt patch: http://reviews.llvm.org/D6437
clang patch: http://reviews.llvm.org/D6147
Differential Revision: http://reviews.llvm.org/D6459
llvm-svn: 223516
Colin LeMahieu [Fri, 5 Dec 2014 21:09:27 +0000 (21:09 +0000)]
[Hexagon] Updating mux_ir/ri/ii/rr with encoding bits
llvm-svn: 223515
Kuba Brecka [Fri, 5 Dec 2014 21:05:04 +0000 (21:05 +0000)]
AddressSanitizer - Don't instrument globals from cstring_literals sections. (compiler-rt part)
Reviewed at http://reviews.llvm.org/D6488
llvm-svn: 223514
Kuba Brecka [Fri, 5 Dec 2014 21:04:43 +0000 (21:04 +0000)]
AddressSanitizer - Don't instrument globals from cstring_literals sections. (llvm part)
Reviewed at http://reviews.llvm.org/D6488
llvm-svn: 223513
Rafael Espindola [Fri, 5 Dec 2014 21:04:36 +0000 (21:04 +0000)]
Simplify the loop linking function bodies. NFC.
llvm-svn: 223512
Enrico Granata [Fri, 5 Dec 2014 20:59:08 +0000 (20:59 +0000)]
Add commands
type format info
type summary info
type synthetic info
These commands all take an expression, evaluate it, and show which of the respective formatter (if any) applies to the result of the expression
Fixes rdar://
12059317
llvm-svn: 223511
Jan Wen Voung [Fri, 5 Dec 2014 20:55:53 +0000 (20:55 +0000)]
Use 32-bit ebp for NaCl64 in a limited case: llvm.frameaddress.
Summary:
Follow up to [x32] "Use ebp/esp as frame and stack pointer":
http://reviews.llvm.org/D4617
In that earlier patch, NaCl64 was made to always use rbp.
That's needed for most cases because rbp should hold a full
64-bit address within the NaCl sandbox so that load/stores
off of rbp don't require sandbox adjustment (zeroing the top
32-bits, then filling those by adding r15).
However, llvm.frameaddress returns a pointer and pointers
are 32-bit for NaCl64. In this case, use ebp instead, which
will make the register copy type check. A similar mechanism
may be needed for llvm.eh.return, but is not added in this change.
Test Plan: test/CodeGen/X86/frameaddr.ll
Reviewers: dschuff, nadav
Subscribers: jfb, llvm-commits
Differential Revision: http://reviews.llvm.org/D6514
llvm-svn: 223510
Bill Seurer [Fri, 5 Dec 2014 20:32:05 +0000 (20:32 +0000)]
[PowerPC]Update Power VSX test cases to also test fast-isel
Update of some of the VSX test cases for Power to check fast-isel codegen as well as the regular codegen.
http://reviews.llvm.org/D6357
llvm-svn: 223509
Kuba Brecka [Fri, 5 Dec 2014 20:26:09 +0000 (20:26 +0000)]
Implement AddressSanitizer suppressions.
Adds 3 new suppression types, "interceptor_name", "interceptor_via_fun", "interceptor_via_lib".
Reviewed at http://reviews.llvm.org/D6280.
llvm-svn: 223508
Bill Seurer [Fri, 5 Dec 2014 20:15:56 +0000 (20:15 +0000)]
[PowerPC]Add VSX loads/stores to fastisel for PPC target
This patch adds VSX floating point loads and stores to fastisel.
Along with the change to tablegen (D6220), VSX instructions are now fully supported in fastisel.
http://reviews.llvm.org/D6274
llvm-svn: 223507
Colin LeMahieu [Fri, 5 Dec 2014 20:07:19 +0000 (20:07 +0000)]
[Hexagon] Adding tfrih/l instructions.
llvm-svn: 223506
Andrea Di Biagio [Fri, 5 Dec 2014 20:02:22 +0000 (20:02 +0000)]
[X86] Improved lowering of packed vector shifts to vpsllq/vpsrlq.
SSE2/AVX non-constant packed shift instructions only use the lower 64-bit of
the shift count.
This patch teaches function 'getTargetVShiftNode' how to deal with shifts
where the shift count node is of type MVT::i64.
Before this patch, function 'getTargetVShiftNode' only knew how to deal with
shift count nodes of type MVT::i32. This forced the backend to wrongly
truncate the shift count to MVT::i32, and then zero-extend it back to MVT::i64.
llvm-svn: 223505
Colin LeMahieu [Fri, 5 Dec 2014 19:51:23 +0000 (19:51 +0000)]
[Hexagon] Adding add reg, imm form with encoding bits and test.
llvm-svn: 223504
Rafael Espindola [Fri, 5 Dec 2014 19:35:07 +0000 (19:35 +0000)]
Remove unused arguments. NFC.
llvm-svn: 223503
Eric Christopher [Fri, 5 Dec 2014 19:23:55 +0000 (19:23 +0000)]
These two calls were grabbing the same register info. Unify them.
llvm-svn: 223502
Eric Christopher [Fri, 5 Dec 2014 19:21:49 +0000 (19:21 +0000)]
Fix a bunch of [-Werror,-Winconsistent-missing-override] warnings.
llvm-svn: 223501
Duncan P. N. Exon Smith [Fri, 5 Dec 2014 19:13:42 +0000 (19:13 +0000)]
BFI: Saturate when combining edges to a successor
When a loop gets bundled up, its outgoing edges are quite large, and can
just barely overflow 64-bits. If one successor has multiple incoming
edges -- and that successor is getting all the incoming mass --
combining just its edges can overflow. Handle that by saturating rather
than asserting.
This fixes PR21622.
llvm-svn: 223500
Eric Christopher [Fri, 5 Dec 2014 19:09:02 +0000 (19:09 +0000)]
Fix a few default label in switch which covers all
enumeration values [-Werror,-Wcovered-switch-default]
warnings.
llvm-svn: 223499
Zachary Turner [Fri, 5 Dec 2014 18:46:14 +0000 (18:46 +0000)]
Subtract the size of the breakpoint opcode from the PC when getting the bp site.
llvm-svn: 223498
Zachary Turner [Fri, 5 Dec 2014 18:46:04 +0000 (18:46 +0000)]
Load / unload modules in the target when the OS events occur.
This causes all deferred breakpoints to be correctly resolved as
the modules that they reside in are loaded.
llvm-svn: 223497
Zachary Turner [Fri, 5 Dec 2014 18:45:53 +0000 (18:45 +0000)]
Implement an empty DynamicLoader plugin for Windows.
llvm-svn: 223496
Colin LeMahieu [Fri, 5 Dec 2014 18:24:06 +0000 (18:24 +0000)]
[Hexagon] Adding DoubleRegs decoder. Moving C2_mux and A2_nop. Adding combine imm-imm form.
llvm-svn: 223494
Adrian Prantl [Fri, 5 Dec 2014 18:19:38 +0000 (18:19 +0000)]
Fix a bug when pretty-printing DW_OP_deref.
llvm-svn: 223493
Adrian Prantl [Fri, 5 Dec 2014 18:19:32 +0000 (18:19 +0000)]
Regenerate this stale testcase from source.
llvm-svn: 223492
Ahmed Bougacha [Fri, 5 Dec 2014 18:04:40 +0000 (18:04 +0000)]
[CodeGenPrepare] Use variables for reused values. NFC.
llvm-svn: 223491
Matt Arsenault [Fri, 5 Dec 2014 18:03:58 +0000 (18:03 +0000)]
Workaround attribute ordering issue with kernel only attributes
Placing the attribute after the kernel keyword would incorrectly
reject the attribute, so use the smae workaround that other
kernel only attributes use.
Also add a FIXME because there are two different phrasings now
for the same error, althoug amdgpu_num_[sv]gpr uses a consistent one.
llvm-svn: 223490
Matt Arsenault [Fri, 5 Dec 2014 18:03:55 +0000 (18:03 +0000)]
Use else if when checking multiple attributes.
Only one of these can really match.
llvm-svn: 223489
Colin LeMahieu [Fri, 5 Dec 2014 17:58:06 +0000 (17:58 +0000)]
[Hexagon] [NFC] Rearranging patterns and mux instruction.
llvm-svn: 223488
Colin LeMahieu [Fri, 5 Dec 2014 17:55:51 +0000 (17:55 +0000)]
[Hexagon] [NFC] Rearranging def order.
llvm-svn: 223487
Rafael Espindola [Fri, 5 Dec 2014 17:53:15 +0000 (17:53 +0000)]
Refactor duplicated code. NFC.
llvm-svn: 223486
Colin LeMahieu [Fri, 5 Dec 2014 17:38:36 +0000 (17:38 +0000)]
[Hexagon] Adding combine reg-reg forms.
llvm-svn: 223485
Zachary Turner [Fri, 5 Dec 2014 17:38:20 +0000 (17:38 +0000)]
Fix compilation errors after clang modules checkin.
llvm-svn: 223484
Sergey Matveev [Fri, 5 Dec 2014 17:31:13 +0000 (17:31 +0000)]
[ASan] Refactor thread starting code.
Move thread context creation into AsanThread::Create().
llvm-svn: 223483
Colin LeMahieu [Fri, 5 Dec 2014 17:27:39 +0000 (17:27 +0000)]
[Hexagon] Marking several instructions as isCodeGenOnly=0 and adding direct disassembly tests for many instructions.
llvm-svn: 223482
Rafael Espindola [Fri, 5 Dec 2014 17:25:52 +0000 (17:25 +0000)]
Be less conservative about when we build the gold plugin.
It is only build if LLVM_BINUTILS_INCDIR is explicitly given, so there is
no point in having extra restrictions.
llvm-svn: 223481
Sergey Matveev [Fri, 5 Dec 2014 17:21:43 +0000 (17:21 +0000)]
[LSan] Rewrite the test from r223419 to not use C++11.
This was causing build failures on llvm-clang-lld-x86_64-centos-6.5 for some
reason. Anyway, the new way is better because we no longer rely on std::thread
implementation details.
llvm-svn: 223480
Aaron Ballman [Fri, 5 Dec 2014 17:11:49 +0000 (17:11 +0000)]
Amending r223468 with this documentation change.
llvm-svn: 223479
Benjamin Kramer [Fri, 5 Dec 2014 17:03:01 +0000 (17:03 +0000)]
LLVMContext: Store APInt/APFloat directly into the ConstantInt/FP DenseMaps.
Required some APInt massaging to get proper empty/tombstone values. Apart
from making the code a bit simpler this also reduces the bucket size of
the ConstantInt map from 32 to 24 bytes.
llvm-svn: 223478
Sergey Matveev [Fri, 5 Dec 2014 16:53:58 +0000 (16:53 +0000)]
[ASan] Fix Win build following r223419.
llvm-svn: 223477
Asiri Rathnayake [Fri, 5 Dec 2014 16:33:56 +0000 (16:33 +0000)]
Improvements to ARM assembler tests
No functional changes. Got myself bitten in r223113 when adding support for
modified immediate syntax (regressions reported by joerg@britannica.bec.de,
fixes in r223366 and r223381). Our assembler tests did not cover serveral
different syntax variants. This patch expands the test coverage to check for
the following cases:
1. Modified immediate operands may be expressed with expressions, as in #(4 * 2)
instead of #8.
2. Modified immediate operands may be _optionally_ prefixed by a '#' symbol or a
'$' symbol.
3. Certain instructions (e.g. ADD) support single input register variants;
[ADD r0, #mod_imm] is same as [ADD r0, r0, #mod_imm].
4. Certain instructions have aliases which convert plain immediates to modified
immediates. For an example, [ADD r0, -10] is not valid because -10 (in two's
complement) cannot be encoded as a modified immediate, but ARMInstrInfo.td
defines an alias which can transform this into a [SUB r0, 10].
llvm-svn: 223475
Rafael Espindola [Fri, 5 Dec 2014 16:05:19 +0000 (16:05 +0000)]
Small cleanup on how we clear constant variables. NFC.
llvm-svn: 223474
Chad Rosier [Fri, 5 Dec 2014 16:05:14 +0000 (16:05 +0000)]
Update TargetTriple format info.
Phabricator revision: http://reviews.llvm.org/D6543
llvm-svn: 223473
Chad Rosier [Fri, 5 Dec 2014 16:02:06 +0000 (16:02 +0000)]
Fix typos in llvm/IR/Module.h
Phabricator revision: http://reviews.llvm.org/D6535
llvm-svn: 223472
Chad Rosier [Fri, 5 Dec 2014 15:50:44 +0000 (15:50 +0000)]
Fix Typos in include/clang-c/Index.h
Phabricator revision: http://reviews.llvm.org/D6507
llvm-svn: 223471
Rafael Espindola [Fri, 5 Dec 2014 15:42:30 +0000 (15:42 +0000)]
Use an early return. NFC.
llvm-svn: 223470
Dmitry Vyukov [Fri, 5 Dec 2014 15:42:17 +0000 (15:42 +0000)]
tsan: fix test
this test is flaky because of ASLR
app memory is
7e8000000000-
800000000000,
there may or may not be a 1TB hole depending on
where ASLR will choose to map libraries
llvm-svn: 223469
Aaron Ballman [Fri, 5 Dec 2014 15:24:55 +0000 (15:24 +0000)]
Modify __has_attribute so that it only looks for GNU-style attributes. Removes the ability to look for generic attributes and keywords via this macro, which has the potential to be a breaking change. However, since there is __has_cpp_attribute and __has_declspec_attribute, and given the limited usefulness of querying a generic attribute name regardless of syntax, this seems like the correct path forward.
llvm-svn: 223468
Aaron Ballman [Fri, 5 Dec 2014 15:05:29 +0000 (15:05 +0000)]
Added a new preprocessor macro: __has_declspec_attribute. This can be used as a way to determine whether Clang supports a __declspec spelling for a given attribute, similar to __has_attribute and __has_cpp_attribute.
llvm-svn: 223467
Aaron Ballman [Fri, 5 Dec 2014 14:52:04 +0000 (14:52 +0000)]
Temporarily reverting r223443 due to bot breakage.
llvm-svn: 223465
Evgeniy Stepanov [Fri, 5 Dec 2014 14:34:03 +0000 (14:34 +0000)]
[msan] Avoid extra origin address realignment.
Do not realign origin address if the corresponding application
address is at least 4-byte-aligned.
Saves 2.5% code size in track-origins mode.
llvm-svn: 223464
Aaron Ballman [Fri, 5 Dec 2014 14:11:39 +0000 (14:11 +0000)]
Fix a warning with generating the attribute documentation; NFC.
llvm-svn: 223463
Will Newton [Fri, 5 Dec 2014 12:43:26 +0000 (12:43 +0000)]
ELF: Use ELF reloc .def files to reduce duplication
Tested with check-lld with no regressions.
llvm-svn: 223462
Andrea Di Biagio [Fri, 5 Dec 2014 12:13:30 +0000 (12:13 +0000)]
[X86] Avoid introducing extra shuffles when lowering packed vector shifts.
When lowering a vector shift node, the backend checks if the shift count is a
shuffle with a splat mask. If so, then it introduces an extra dag node to
extract the splat value from the shuffle. The splat value is then used
to generate a shift count of a target specific shift.
However, if we know that the shift count is a splat shuffle, we can use the
splat index 'I' to extract the I-th element from the first shuffle operand.
The advantage is that the splat shuffle may become dead since we no longer
use it.
Example:
;;
define <4 x i32> @example(<4 x i32> %a, <4 x i32> %b) {
%c = shufflevector <4 x i32> %b, <4 x i32> undef, <4 x i32> zeroinitializer
%shl = shl <4 x i32> %a, %c
ret <4 x i32> %shl
}
;;
Before this patch, llc generated the following code (-mattr=+avx):
vpshufd $0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0]
vpxor %xmm2, %xmm2
vpblendw $3, %xmm1, %xmm2, %xmm1 # xmm1 = xmm1[0,1],xmm2[2,3,4,5,6,7]
vpslld %xmm1, %xmm0, %xmm0
retq
With this patch, the redundant splat operation is removed from the code.
vpxor %xmm2, %xmm2
vpblendw $3, %xmm1, %xmm2, %xmm1 # xmm1 = xmm1[0,1],xmm2[2,3,4,5,6,7]
vpslld %xmm1, %xmm0, %xmm0
retq
llvm-svn: 223461
Alexander Kornienko [Fri, 5 Dec 2014 11:59:05 +0000 (11:59 +0000)]
[clang-tidy] Add clang-tidy check for unique_ptr's reset+release -> move
Replace x.reset(y.release()); with x = std::move(y);
If y is rvalue, replace with x = y; instead.
http://reviews.llvm.org/D6485
Patch by Alexey Sokolov!
llvm-svn: 223460
Daniel Jasper [Fri, 5 Dec 2014 10:42:21 +0000 (10:42 +0000)]
clang-format: Support NS_OPTIONS, CF_ENUM and CF_OPTIONS.
This fixes llvm.org/PR21756.
llvm-svn: 223458
Dmitry Vyukov [Fri, 5 Dec 2014 10:06:06 +0000 (10:06 +0000)]
tsan: protect trace memory range on startup
so that user does not map something there ahead of us
llvm-svn: 223456
David Majnemer [Fri, 5 Dec 2014 08:56:55 +0000 (08:56 +0000)]
Driver: Objective-C should respect -fno-exceptions
Clang attempted to replicate a GCC bug: -fobjc-exceptions forces
-fexceptions to be enabled. However, this has unintended effects and
other awkard side effects that Clang doesn't "correctly" ape (e.g. it's
impossible to turn off C++ exceptions in ObjC++ mode).
Instead, -f[no]objc-exceptions and -f[no]cxx-exceptions now have an
identical relationship with -f[no]exceptions.
llvm-svn: 223455
Charlie Turner [Fri, 5 Dec 2014 08:22:47 +0000 (08:22 +0000)]
Add missing FP build attribute tests.
The test file test/CodeGen/ARM/build-attributes.ll was missing several
floating-point build attribute tests. The intention of this commit is that for
each CPU / architecture currently tested, there are now tests that make sure
the following attributes are sufficiently checked,
* Tag_ABI_FP_rounding
* Tag_ABI_FP_denormal
* Tag_ABI_FP_exceptions
* Tag_ABI_FP_user_exceptions
* Tag_ABI_FP_number_model
Also in this commit, the -unsafe-fp-math flag has been augmented with the full
suite of flags Clang sends to LLVM when you pass -ffast-math to Clang. That is,
`-unsafe-fp-math' has been changed to `-enable-unsafe-fp-math -disable-fp-elim
-enable-no-infs-fp-math -enable-no-nans-fp-math -fp-contract=fast'
Change-Id: I35d766076bcbbf09021021c0a534bf8bf9a32dfc
llvm-svn: 223454
David Majnemer [Fri, 5 Dec 2014 08:11:58 +0000 (08:11 +0000)]
Driver: Cleanup -fexceptions behavior
No functionality change is intended, just a cleanup of the logic clang
uses to determine what -fexceptions/-fno-exceptions ends up doing.
llvm-svn: 223453
Stephane Sezer [Fri, 5 Dec 2014 05:02:41 +0000 (05:02 +0000)]
Fix a crash in dotest.py when the lldb executable is not built.
Summary: If lldb is not built, dotest.py throws an exception because we are using an unset variable.
Reviewers: clayborg
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D6516
llvm-svn: 223446
Alexey Bataev [Fri, 5 Dec 2014 04:10:27 +0000 (04:10 +0000)]
[OPENMP] Test for 'omp barrier' directive
llvm-svn: 223445
Alexey Bataev [Fri, 5 Dec 2014 04:09:23 +0000 (04:09 +0000)]
[OPENMP] Codegen for 'omp barrier' directive.
Adds generation of call to "i32 kmpc_cancel_barrier(ident_t *, i32)" libcall for explicitly specified barriers (OMP_IDENT_BARRIER_EXPL flag is added to "flags" field of "ident_t" structure).
Also this patch replaces all calls to "kmpc_barrier" function by calls of "__kmpc_cancel_barrier" function which provides additional functionality for OpenMP 4.0.
Also, library specific enum OpenMPLocationFlags moved to private section of CGOpenMPRuntime class to make it more independent from library implementation.
Differential Revision: http://reviews.llvm.org/D6447
llvm-svn: 223444
Richard Smith [Fri, 5 Dec 2014 02:33:27 +0000 (02:33 +0000)]
[modules] Instead of storing absolute paths in a .pcm file, store the path to
the root of the module and use paths relative to that directory wherever
possible. This is a step towards allowing explicit modules to be relocated
without being rebuilt, which is important for some kinds of distributed builds,
for good paths in diagnostics, and for appropriate .d output.
llvm-svn: 223443
Hal Finkel [Fri, 5 Dec 2014 02:07:35 +0000 (02:07 +0000)]
Revert "r223440 - Consider subregs when calling MI::registerDefIsDead for phys deps"
Reverting this because, while it fixes the problem in the reduced test case, it
does not fix the problem in the full test case from the bug report.
llvm-svn: 223442
Vince Harron [Fri, 5 Dec 2014 02:06:03 +0000 (02:06 +0000)]
Reverting r223423, test timeout
Was causing dosep to hang in some cases.
llvm-svn: 223441
Hal Finkel [Fri, 5 Dec 2014 01:57:22 +0000 (01:57 +0000)]
Consider subregs when calling MI::registerDefIsDead for phys deps
The scheduling dependency graph is built bottom-up within each scheduling
region, and ScheduleDAGInstrs::addPhysRegDeps is called to add output/anti
dependencies, based on physical registers, to the SUs for instructions
based on those that come before them.
In the test case, we start before post-RA scheduling with a block that looks
like this:
...
INLINEASM <...
andc $0,$0,$2
stdcx. $0,0,$3
bne- 1b
> [sideeffect] [mayload] [maystore] [attdialect], $0:[regdef-ec:G8RC], %X6<earlyclobber,def,dead>, $1:[mem], %X3<kill>, $2:[reguse:G8RC], %X5<kill>, $3:[reguse:G8RC], %X3, $4:[mem], %X3, $5:[clobber], %CC<earlyclobber,imp-def,dead>, <<badref>>
...
%X4<def,dead> = ANDIo8 %X4<kill>, 1, %CR0<imp-def,dead>, %CR0GT<imp-def>
...
%R29<def> = ISEL %R3<undef>, %R4<kill>, %CR0GT<kill>
where it is relevant that %CC is an alias to %CR0, and that %CR0GT is a
subregister of %CR0. However, for post-RA scheduling, no dependency was added
to prevent the INLINEASM from being scheduled in between the ANDIo8 and the
ISEL (which communicate via the %CR0GT register).
In ScheduleDAGInstrs::addPhysRegDeps, when called for the %CC operand, we'd
iterate over all of its aliases (which include %CC itself and also %CR0), and
look for previously-encountered defs of those registers. We'd find the ANDIo8,
but decide not to add a dependency between the INLINEASM and the ANDIo8 because
both the INLINEASM's def of %CC is dead, and also the ANDIo8 def of %CR0 is
dead. This ignores, however, that ANDIo8 has a non-dead def of %CR0GT, a
subregister of %CR0, and thus a dependency still must exist.
To fix this problem, when calling registerDefIsDead on the SU with the def, we
also check all subregisters for possible non-dead defs, and add the dependency
if any are found.
Fixes PR21742.
llvm-svn: 223440
Duncan P. N. Exon Smith [Fri, 5 Dec 2014 01:41:36 +0000 (01:41 +0000)]
ADT: Remove GetStringMapEntryFromValue()
It relies on undefined behaviour, since `StringMapEntry<>` is not
a standard layout type. There are no users anyway.
llvm-svn: 223439
Duncan P. N. Exon Smith [Fri, 5 Dec 2014 01:41:34 +0000 (01:41 +0000)]
IR: Stop relying on GetStringMapEntryFromValue()
It relies on undefined behaviour.
llvm-svn: 223438
Sean Callanan [Fri, 5 Dec 2014 01:31:55 +0000 (01:31 +0000)]
Added CMake support so all the Clang modules code
will at least be built by non-OS X builders. This
should head off some build breakage at the pass.
llvm-svn: 223437
Sean Callanan [Fri, 5 Dec 2014 01:27:35 +0000 (01:27 +0000)]
Changes to the expression parser to actually use
the types that we find in Clang modules.
llvm-svn: 223436
Sean Callanan [Fri, 5 Dec 2014 01:26:42 +0000 (01:26 +0000)]
Additional changes required by r223433.
llvm-svn: 223435
Sean Callanan [Fri, 5 Dec 2014 01:22:25 +0000 (01:22 +0000)]
Removed a stray directory.
llvm-svn: 223434
Sean Callanan [Fri, 5 Dec 2014 01:21:59 +0000 (01:21 +0000)]
This is the meat of the code to add Clang modules
support to LLDB. It includes the following:
- Changed DeclVendor to TypeVendor.
- Made the ObjCLanguageRuntime provide a DeclVendor
rather than a TypeVendor.
- Changed the consumers of TypeVendors to use
DeclVendors instead.
- Provided a few convenience functions on
ClangASTContext to make that easier.
llvm-svn: 223433
Sean Callanan [Fri, 5 Dec 2014 01:17:47 +0000 (01:17 +0000)]
Added the LLDB enumeration necessary to find the
Clang headers directory. Needed by r223430.
llvm-svn: 223432
Sean Callanan [Fri, 5 Dec 2014 01:16:31 +0000 (01:16 +0000)]
Added support to Platform to indicate (1) whether the
current platform supports Clang modules, and (2) what
options to pass to Clang so it can load those Clang
modules.
llvm-svn: 223431
Sean Callanan [Fri, 5 Dec 2014 01:15:04 +0000 (01:15 +0000)]
Add support for embedding Clang compiler headers
like tgmath.h and stdarg.h into the LLDB installation,
and then finding them through the Host infrastructure.
Also add a script to actually do this on Mac OS X.
llvm-svn: 223430
Eric Christopher [Fri, 5 Dec 2014 01:06:59 +0000 (01:06 +0000)]
Have the driver and the target code agree on what the default ABI
is for each machine. Fix up darwin tests that were testing for
aapcs on armv7-ios when the actual ABI is apcs.
Should be no user visible change without -cc1.
llvm-svn: 223429
Adrian Prantl [Fri, 5 Dec 2014 01:02:46 +0000 (01:02 +0000)]
Cleanup: Calls to getDwarfRegNum() may actually fail, if there is
no DWARF register number mapping, or if the register was a virtual
register that was never materialized. Previously, we would just emit a
bogus location, after this patch we don't emit a location at all by
doing an early exit.
After my bugfix in r223401 today, this doesn't actually happen on any
target that I tested this with, but it's still preferable to make the
possibility of a failure explicit.
llvm-svn: 223428
Adrian Prantl [Fri, 5 Dec 2014 01:02:36 +0000 (01:02 +0000)]
Add a comment.
llvm-svn: 223427
Anton Yartsev [Fri, 5 Dec 2014 00:59:07 +0000 (00:59 +0000)]
[analyzer] Eliminated endless loop.
llvm-svn: 223426
Paul Robinson [Fri, 5 Dec 2014 00:50:15 +0000 (00:50 +0000)]
Make GetSVN.cmake do its VCS queries with native CMake code.
This lets the queries work on Windows as well as Linux.
This does mean make and cmake aren't using the same scripts to do the
queries (again), but at least GetSVN.cmake understands git and git-svn
as well as svn now.
llvm-svn: 223425
Rafael Espindola [Fri, 5 Dec 2014 00:30:47 +0000 (00:30 +0000)]
linkGlobalVariableProto never returns null. Simplify the caller. NFC.
llvm-svn: 223424
Vince Harron [Fri, 5 Dec 2014 00:23:03 +0000 (00:23 +0000)]
Kill any python test script that takes more than 5 minutes
There is at least one test that hangs on the Linux debian buildbot.
When that test hangs, the buildbot kills dosep which loses all test
results. This change kills just the hung test and should let us see
which test is hanging. This is useful for that test and any others
in the future which start hanging.
llvm-svn: 223423
Eric Christopher [Fri, 5 Dec 2014 00:22:48 +0000 (00:22 +0000)]
Use isOSBinFormatMachO() instead of comparing the object format
against an enum.
llvm-svn: 223422
Eric Christopher [Fri, 5 Dec 2014 00:22:38 +0000 (00:22 +0000)]
Rename the x86 isTargetMacho to isTargetMachO for uniformity.
llvm-svn: 223421