Tim Northover [Sat, 24 May 2014 12:52:07 +0000 (12:52 +0000)]
AArch64/ARM64: rename ARM64 components to AArch64
This keeps Clang consistent with backend naming conventions.
llvm-svn: 209579
Tim Northover [Sat, 24 May 2014 12:51:25 +0000 (12:51 +0000)]
AArch64/ARM64: update Clang after AArch64 removal.
A few (mostly CodeGen) parts of Clang were tightly coupled to the
AArch64 backend. Now that it's gone, they will not even compile.
I've also deduplicated RUN lines in many of the AArch64 tests. This
might improve "make check-all" time noticably: some of those NEON
tests were monsters.
llvm-svn: 209578
Tim Northover [Sat, 24 May 2014 12:50:23 +0000 (12:50 +0000)]
AArch64/ARM64: move ARM64 into AArch64's place
This commit starts with a "git mv ARM64 AArch64" and continues out
from there, renaming the C++ classes, intrinsics, and other
target-local objects for consistency.
"ARM64" test directories are also moved, and tests that began their
life in ARM64 use an arm64 triple, those from AArch64 use an aarch64
triple. Both should be equivalent though.
This finishes the AArch64 merge, and everyone should feel free to
continue committing as normal now.
llvm-svn: 209577
Tim Northover [Sat, 24 May 2014 12:42:26 +0000 (12:42 +0000)]
AArch64/ARM64: remove AArch64 from tree prior to renaming ARM64.
I'm doing this in two phases for a better "git blame" record. This
commit removes the previous AArch64 backend and redirects all
functionality to ARM64. It also deduplicates test-lines and removes
orphaned AArch64 tests.
The next step will be "git mv ARM64 AArch64" and rewire most of the
tests.
Hopefully LLVM is still functional, though it would be even better if
no-one ever had to care because the rename happens straight
afterwards.
llvm-svn: 209576
Andreas Simbuerger [Sat, 24 May 2014 09:25:14 +0000 (09:25 +0000)]
Expose diagnostic info to users
llvm-svn: 209575
Andreas Simbuerger [Sat, 24 May 2014 09:25:10 +0000 (09:25 +0000)]
ScopDetection: Support keep-going
Support a 'keep-going' mode for the ScopDetection. In this mode, we just keep
on detecting, even if we encounter an error.
This is useful for diagnosing SCoP candidates. Sometimes you want all the
errors. Invalid SCoPs will still be refused in the end, we just refuse to
abort on the first error.
llvm-svn: 209574
Andreas Simbuerger [Sat, 24 May 2014 09:25:06 +0000 (09:25 +0000)]
Substitue LastError & InvalidRegions with RejectLogs
Use the new ScopDetectionDiagnostics to implement
the same functionality.
llvm-svn: 209573
Andreas Simbuerger [Sat, 24 May 2014 09:25:01 +0000 (09:25 +0000)]
Store all RejectReasons that occurred in a log.
This stores all RejectReasons created for one region
in a RejectLog inside the DetectionContext. For now
this only keeps track of the last error.
A separate patch will enable the tracking of all errors.
This patch itself does no harm (yet).
llvm-svn: 209572
Andreas Simbuerger [Sat, 24 May 2014 09:24:53 +0000 (09:24 +0000)]
Split implementation from ScopDetectionDiagnostic.h
We don't want the Statistic variables in every module that
includes the diagnostics.
llvm-svn: 209571
NAKAMURA Takumi [Sat, 24 May 2014 08:47:11 +0000 (08:47 +0000)]
llvm/test/Object/ar-error.test: Don't check the message "No such file or directory".
It didn't match on non-English version of Windows.
llvm-svn: 209570
NAKAMURA Takumi [Sat, 24 May 2014 08:42:12 +0000 (08:42 +0000)]
clang-tools-extra/test/clang-tidy/line-filter.cpp: Tweak line-filter.
On win32, %s is expanded to X:\path\to\test\line-filter.cpp. It was incompatible to yaml.
Although "%/s" could be available in Lit, ClangTidyDiagnosticConsumer::passesLineFilter() is unaware of comparision between '/' and '\\'.
llvm-svn: 209569
Michael Zolotukhin [Sat, 24 May 2014 08:09:57 +0000 (08:09 +0000)]
Implement sext(C1 + C2*X) --> sext(C1) + sext(C2*X) and
sext{C1,+,C2} --> sext(C1) + sext{0,+,C2} transformation in Scalar
Evolution.
That helps SLP-vectorizer to recognize consecutive loads/stores.
<rdar://problem/
14860614>
llvm-svn: 209568
Yaron Keren [Sat, 24 May 2014 07:19:25 +0000 (07:19 +0000)]
CXXInfo memory should be released after calling the destructor
instead of before. The wrong order had no effect since Deallocate()
does nothing right now, but we may replace allocator in the future.
llvm-svn: 209567
Tim Northover [Sat, 24 May 2014 07:05:42 +0000 (07:05 +0000)]
ARM64: extract a 32-bit subreg when selecting an inreg extend
After the load/store refactoring, we were sometimes trying to feed a
GPR64 into a 32-bit register offset operand. This failed in
copyPhysReg.
llvm-svn: 209566
Hans Wennborg [Fri, 23 May 2014 23:29:44 +0000 (23:29 +0000)]
This test doesn't need -O2 -disable-llvm-optzns
I forgot to fix this one in r209145. We use these flags on dllimport tests
to make sure we emit code for available_externaly functions and don't inline
the IR.
llvm-svn: 209564
Jason Molenda [Fri, 23 May 2014 23:11:27 +0000 (23:11 +0000)]
Add a lock ivar to the Platform so that multiple Targets
trying to populate the list of trap handler names at
the same time don't conflict with one another.
<rdar://problem/
17011969>
llvm-svn: 209563
Todd Fiala [Fri, 23 May 2014 22:33:42 +0000 (22:33 +0000)]
Remove some unnecessary comments from previous check-in.
Removed a "done" TODO comment.
Moved some helper methods to the top of the unit test.
Removed some commented out code I was considering implementing
before I came up with a better overall approach.
llvm-svn: 209561
Todd Fiala [Fri, 23 May 2014 22:25:29 +0000 (22:25 +0000)]
Added gdb remote tests to verify $Hg{thread-id}.
Added test to check that each thread reported by $q{f,s}ThreadInfo
can be switched to by $Hg, verified by a follow-up $qC.
Modified test exe to accept "thread:new" to create a new thread
that runs and sleeps for 5 seconds.
@llgs_test/@debugserver_test now buffer output.
llgs and debugserver gdbremote protocol tests now collect $O notification
output into the context returned from expect_lldb_gdbserver_replay.
context["O_count"] is an integer indicating the number of $O packets
collected during the replay, and context["O_content"] contains the
accumulated hex-decoded text output by the inferior (stdout and stderr).
Modified the $O check test to check the accumulated output rather than
a direct $O packet.
llvm-svn: 209560
Akira Hatanaka [Fri, 23 May 2014 22:12:01 +0000 (22:12 +0000)]
Recommit r209532 with -ffreestanding.
This is a test case for r209489.
llvm-svn: 209559
Akira Hatanaka [Fri, 23 May 2014 21:35:50 +0000 (21:35 +0000)]
Remove test while I investigate why the test is breaking the bots.
llvm-svn: 209558
Richard Smith [Fri, 23 May 2014 21:31:59 +0000 (21:31 +0000)]
Recompute the injected class name type for a class template specialization
rather than saving and restoring it.
llvm-svn: 209557
Akira Hatanaka [Fri, 23 May 2014 21:24:24 +0000 (21:24 +0000)]
XFAIL test which is breaking some of the build bots.
llvm-svn: 209556
Reid Kleckner [Fri, 23 May 2014 21:13:45 +0000 (21:13 +0000)]
Use comdats to avoid double initialization of weak data
Initializers of global data that can appear multiple TUs (static data
members of class templates or __declspec(selectany) data) are now in a
comdat group keyed on the global variable being initialized. On
non-Windows platforms, this is a code size and startup time
optimization. On Windows, this is necessary for ABI compatibility with
MSVC.
Fixes PR16959.
Reviewers: rsmith
Differential Revision: http://reviews.llvm.org/D3811
llvm-svn: 209555
David Blaikie [Fri, 23 May 2014 21:11:46 +0000 (21:11 +0000)]
DebugInfo: Generalize some tests to handle variations in attribute ordering.
In an effort to fix inlined debug info in situations where the out of
line definition of a function preceeds any inlined usage, the order in
which some attributes are added to subprogram DIEs may change. (in
essence, definition-necessary attributes like DW_AT_low_pc/high_pc will
be added immediately, but the names, types, and other features will be
delayed to module end where they may either be added to the subprogram
DIE or instead reference an abstract definition for those values)
These tests can be generalized to be resilient to this change. 5 or so
tests actually have to be incompatibly changed to cope with this
reordering and will go along with the change that affects the order.
llvm-svn: 209554
David Blaikie [Fri, 23 May 2014 21:07:01 +0000 (21:07 +0000)]
DebugInfo: Generalize a test case to not depend on abbreviation numbering.
It's an unnecessary detail for this test and just gets in the way when
making unrelated changes to the output in this test.
llvm-svn: 209553
Richard Smith [Fri, 23 May 2014 21:00:28 +0000 (21:00 +0000)]
[modules] If a referenced-but-not-instantiated class template specialization
gets explicitly specialized, don't reuse the previous class template
specialization declaration as a new declaration. The benefit here is fairly
marginal, it harms source fidelity, and this is horrible to model if the
specialization was imported from another module (without this change, it
asserts or worse).
llvm-svn: 209552
Andrew Trick [Fri, 23 May 2014 20:46:21 +0000 (20:46 +0000)]
Test case comments. Fix sloppiness.
llvm-svn: 209551
Rafael Espindola [Fri, 23 May 2014 20:39:23 +0000 (20:39 +0000)]
clang-format function.
llvm-svn: 209550
Hans Wennborg [Fri, 23 May 2014 20:37:38 +0000 (20:37 +0000)]
Emit used/dllexport inline method definitions in nested classes (PR19743, PR11170)
The previous code that was supposed to handle this didn't work
since parsing of inline method definitions is delayed to the end
of the outer class definition. Thus, when HandleTagDeclDefinition()
got called for the inner class, the inline functions in that class
had not been parsed yet.
Richard suggested that the way to do this is by handling inline
method definitions through a new ASTConsumer callback.
I really wanted to call ASTContext::DeclMustBeEmitted() instead of
checking for attributes, but doing that causes us to compute linkage,
and then we fail with "error: unsupported: typedef changes linkage
of anonymous type, but linkage was already computed" on tests like
this: (from SemaCXX/undefined-internal.cpp) :-/
namespace test7 {
typedef struct {
void bar();
void foo() { bar(); }
} A;
}
Differential Revision: http://reviews.llvm.org/D3809
llvm-svn: 209549
Rafael Espindola [Fri, 23 May 2014 20:35:47 +0000 (20:35 +0000)]
Remove a confusing use of a static method.
No functionality change.
llvm-svn: 209548
David Blaikie [Fri, 23 May 2014 20:25:15 +0000 (20:25 +0000)]
DebugInfo: Put concrete definitions referencing abstract definitions in the same scope as the abstract definition.
This seems like a simple cleanup/improved consistency, but also helps
lay the foundation to fix the bug mentioned in the test case: concrete
definitions preceeding any inlined usage aren't properly split into
concrete + abstract (because they're not known to need it until it's too
late).
Once we start deferring this choice until later, we won't have the
choice to put concrete definitions for inlined subroutines in a
different scope from concrete definitions for non-inlined subroutines
(since we won't know at time-of-construction which one it'll be). This
change brings those two cases into alignment ahead of that future
chaneg/fix.
llvm-svn: 209547
Hans Wennborg [Fri, 23 May 2014 20:16:41 +0000 (20:16 +0000)]
Don't suppress warning about dllimport on typedefs etc. in MicrosoftExt mode
It's true the MSVC doesn't warn about dllimport when applied to e.g. a typedef,
but that applies to dllexport too. I'd like us to be consistent, and I think
the right thing to do is to warn.
The original test that came with implementing the old behaviour doesn't provide
a good motivation, and it said it was checking that we're not repoting an *error*,
which is still true since this is just a warning.
There are plenty of tests e.g. in Sema/dllimport.c to check that we do warn
about dllimport on non functions or variables.
Differential Revision: http://reviews.llvm.org/D3832
llvm-svn: 209546
Andrew Trick [Fri, 23 May 2014 19:47:13 +0000 (19:47 +0000)]
Fix and improve SCEV ComputeBackedgeTankCount.
This is a follow-up to r209358: PR19799: Indvars miscompile due to an
incorrect max backedge taken count from SCEV.
That fix was incomplete as pointed out by Arnold and Michael Z. The
code was also too confusing. It needed a careful rewrite with more
unit tests. This version will also happen to optimize more cases.
<rdar://
17005101> PR19799: Indvars miscompile...
llvm-svn: 209545
Nico Rieck [Fri, 23 May 2014 19:33:49 +0000 (19:33 +0000)]
Revert part of "Fix broken FileCheck prefixes"
This reverts part of commit r209538.
llvm-svn: 209544
Rafael Espindola [Fri, 23 May 2014 19:16:56 +0000 (19:16 +0000)]
Use alias linkage and visibility to decide tls access mode.
This matches both what we do for the non-thread case and what gcc does.
With this patch clang would match gcc's behaviour in
static __thread int a = 42;
extern __thread int b __attribute__((alias("a")));
int *f(void) { return &a; }
int *g(void) { return &b; }
if not for pr19843. Manually writing the IL does produce the same access modes.
It is also a step in the direction of fixing pr19844.
llvm-svn: 209543
Nico Rieck [Fri, 23 May 2014 19:07:49 +0000 (19:07 +0000)]
Sema: Add more tests for dll attributes on inline functions
llvm-svn: 209542
Nico Rieck [Fri, 23 May 2014 19:07:25 +0000 (19:07 +0000)]
Fix broken FileCheck prefix
llvm-svn: 209541
Nico Rieck [Fri, 23 May 2014 19:07:09 +0000 (19:07 +0000)]
Fix typo
llvm-svn: 209540
Nico Rieck [Fri, 23 May 2014 19:06:44 +0000 (19:06 +0000)]
Remove unused CHECK lines
llvm-svn: 209539
Nico Rieck [Fri, 23 May 2014 19:06:24 +0000 (19:06 +0000)]
Fix broken FileCheck prefixes
llvm-svn: 209538
Jingyue Wu [Fri, 23 May 2014 18:39:40 +0000 (18:39 +0000)]
Add the extracted constant offset using GEP
Fixed a TODO in r207783.
Add the extracted constant offset using GEP instead of ugly
ptrtoint+add+inttoptr. Using GEP simplifies future optimizations and makes IR
easier to understand.
Updated all affected tests, and added a new test in split-gep.ll to cover a
corner case where emitting uglygep is necessary.
llvm-svn: 209537
Lang Hames [Fri, 23 May 2014 18:35:44 +0000 (18:35 +0000)]
[RuntimeDyld] Remove relocation bounds check introduced in r208375 (MachO only).
We do all of our address arithmetic in 64-bit, and operations involving
logically negative 32-bit offsets (actually represented as unsigned 64 bit ints)
often overflow into higher bits. The overflow check could be preserved by
casting to uint32 at the callsite for applyRelocationValue, but this would
eliminate the value of the check.
The right way to handle overflow in relocations is to make relocation processing
target specific, and compute the values for RelocationEntry objects in the
appropriate types (32-bit for 32-bit targets, 64-bit for 64-bit targets). This
is coming as part of the cleanup I'm working on.
This fixes another i386 regression test.
<rdar://problem/
16889891>
llvm-svn: 209536
Ben Langmuir [Fri, 23 May 2014 18:15:47 +0000 (18:15 +0000)]
Stopgap fix for finding module for a file mapped in the VFS
If we lookup a path using its 'real' path first, we need to ensure that
when we run header search we still use the VFS-mapped path or we will
not be able to find the corresponding module for the header.
The real problem is that we tie the name of a file to its underlying
FileEntry, which is uniqued by inode, so we only ever get the first name
it is looked up by. This doesn't work with modules, which rely on a
specific file system structure. I'm hoping to have time to write up a
proposal for fixing this more permanently soon, but as a stopgap this
patch updates the name of the file's directory if it comes from a VFS
mapping.
llvm-svn: 209534
Manuel Klimek [Fri, 23 May 2014 17:49:03 +0000 (17:49 +0000)]
Add the hasRangeInit() matcher for range-based for loop.
llvm-svn: 209533
Akira Hatanaka [Fri, 23 May 2014 17:35:08 +0000 (17:35 +0000)]
Test case for r209489.
llvm-svn: 209532
Manuel Klimek [Fri, 23 May 2014 17:09:56 +0000 (17:09 +0000)]
Make dead return statement detection more robust against changes in the CFG.
This change is a precondition to the proposed change to handle temporary
dtors correctly.
The idea is to explicitly search for the next return that doesn't have other
paths into it (that is, if the current block is dead, the block containing the
return must be dead, too). Thus, introducing non-control-flow block
transitions will not break the logic.
llvm-svn: 209531
Manuel Klimek [Fri, 23 May 2014 16:58:18 +0000 (16:58 +0000)]
Make the ParentVector default to size 2.
As Jordan noted, it makes more sense when we store it in the ParentMap,
and doesn't really make a difference when we return it from getParents.
llvm-svn: 209530
David Blaikie [Fri, 23 May 2014 16:53:14 +0000 (16:53 +0000)]
Add FIXME comment based on code review feedback by Hal Finkel on r209338
llvm-svn: 209529
Rafael Espindola [Fri, 23 May 2014 16:51:13 +0000 (16:51 +0000)]
Convert test to use FileCheck.
llvm-svn: 209528
Sylvestre Ledru [Fri, 23 May 2014 16:47:42 +0000 (16:47 +0000)]
revert "r209526 List the function/method name in the index page of scan-build "
Depends on http://reviews.llvm.org/D3762
llvm-svn: 209527
Sylvestre Ledru [Fri, 23 May 2014 16:40:46 +0000 (16:40 +0000)]
List the function/method name in the index page of scan-build
llvm-svn: 209526
Warren Hunt [Fri, 23 May 2014 16:26:32 +0000 (16:26 +0000)]
[MS-ABI] Silence warning from r209523
no functional change.
llvm-svn: 209525
Sylvestre Ledru [Fri, 23 May 2014 16:10:00 +0000 (16:10 +0000)]
Replace system() by native perl calls
llvm-svn: 209524
Warren Hunt [Fri, 23 May 2014 16:07:43 +0000 (16:07 +0000)]
[MS-ABI] Implements MS-compatible RTTI
Enables the emission of MS-compatible RTTI data structures for use with
typeid, dynamic_cast and exceptions. Does not implement dynamic_cast
or exceptions. As an artiface, typeid works in some cases but proper
support an testing will coming in a subsequent patch.
majnemer has fuzzed the results. Test cases included.
Differential Revision: http://reviews.llvm.org/D3833
llvm-svn: 209523
Sergey Matveev [Fri, 23 May 2014 16:04:41 +0000 (16:04 +0000)]
[sanitizer] Make stack traces from dlclose()'d modules more meaningful.
Previously, they silently omitted PCs belonging to unknown modules. Now we print
(<unknown module>) instead.
llvm-svn: 209522
Aaron Ballman [Fri, 23 May 2014 15:33:39 +0000 (15:33 +0000)]
Teach the table generated emitPseudoExpansionLowering function to not emit a switch statement containing only a default statement (and no cases). Updated some of the code to use range-based for loops as well. No functional changes.
llvm-svn: 209521
Marshall Clow [Fri, 23 May 2014 15:30:23 +0000 (15:30 +0000)]
Fix bug 19840, where some tests were not testing what we wanted. Thanks to Eric for the bug report
llvm-svn: 209520
Rafael Espindola [Fri, 23 May 2014 15:18:06 +0000 (15:18 +0000)]
Aliases are always definition, delete dead code.
While at it, use a range loop.
llvm-svn: 209519
Rafael Espindola [Fri, 23 May 2014 15:07:51 +0000 (15:07 +0000)]
Delete dead code.
GV is never used past this point. This was probably a copy and paste error.
llvm-svn: 209518
Kostya Serebryany [Fri, 23 May 2014 15:02:06 +0000 (15:02 +0000)]
[ubsan] temporary disable testing with -m32 as there are bots that don't support it
llvm-svn: 209517
Kostya Serebryany [Fri, 23 May 2014 14:45:13 +0000 (14:45 +0000)]
[ubsan] handle long double in 32-bit mode; part of the patch by Marek Polacek
llvm-svn: 209516
Dario Domizioli [Fri, 23 May 2014 13:53:12 +0000 (13:53 +0000)]
[test] Force a triple in the pragma optimize test due to expected mangled names.
No functional change to the compiler.
This should just make the test pass on all buildbots.
llvm-svn: 209515
Daniel Sanders [Fri, 23 May 2014 13:35:24 +0000 (13:35 +0000)]
[mips] Work around inconsistency in llvm-mc's placement of fixup markers
Summary:
Add a second fixup table to MipsAsmBackend::getFixupKindInfo() to correctly
position llvm-mc's fixup placeholders for big-endian.
See PR19836 for full details of the issue. To summarize, the fixup placeholders
do not account for endianness properly and the implementations of
getFixupKindInfo() for each target are measuring MCFixupKindInfo.TargetOffset
from different ends of the instruction encoding to compensate.
Reviewers: jkolek, zoran.jovanovic, vmedic
Reviewed By: vmedic
Differential Revision: http://reviews.llvm.org/D3889
llvm-svn: 209514
Daniel Sanders [Fri, 23 May 2014 13:24:08 +0000 (13:24 +0000)]
[mips][mips64r6] t(eq|ge|lt|ne)i and t(ge|lt)iu are not available in MIPS32r6/MIPS64r6
Summary: Depends on D3872
Reviewers: jkolek, zoran.jovanovic, vmedic
Reviewed By: vmedic
Differential Revision: http://reviews.llvm.org/D3891
llvm-svn: 209513
Daniel Sanders [Fri, 23 May 2014 13:18:02 +0000 (13:18 +0000)]
[mips][mips64r6] [ls][dw][lr] are not available in MIPS32r6/MIPS64r6
Summary:
Instead the system is required to provide some means of handling unaligned
load/store without special instructions. Options include full hardware
support, full trap-and-emulate, and hybrids such as hardware support within
a cache line and trap-and-emulate for multi-line accesses.
MipsSETargetLowering::allowsUnalignedMemoryAccesses() has been configured to
assume that unaligned accesses are 'fast' on the basis that I expect few
hardware implementations will opt for pure-software handling of unaligned
accesses. The ones that do handle it purely in software can override this.
mips64-load-store-left-right.ll has been merged into load-store-left-right.ll
The stricter testing revealed a Bits!=Bytes bug in passByValArg(). This has
been fixed and the variables renamed to clarify the units they hold.
Reviewers: zoran.jovanovic, jkolek, vmedic
Reviewed By: vmedic
Differential Revision: http://reviews.llvm.org/D3872
llvm-svn: 209512
Nikola Smiljanic [Fri, 23 May 2014 12:48:27 +0000 (12:48 +0000)]
PR19352 - getLocation() points to the wrong position for FriendDecls
llvm-svn: 209511
Dario Domizioli [Fri, 23 May 2014 12:13:25 +0000 (12:13 +0000)]
Implemented support for "pragma clang optimize on/off", based on attribute 'optnone'.
This patch implements support for selectively disabling optimizations on a
range of function definitions through a pragma. The implementation is that
all function definitions in the range are decorated with attribute
'optnone'.
#pragma clang optimize off
// All function definitions in here are decorated with 'optnone'.
#pragma clang optimize on
// Compilation resumes as normal.
llvm-svn: 209510
Kostya Serebryany [Fri, 23 May 2014 11:52:38 +0000 (11:52 +0000)]
[asan] fix a test following r209508
llvm-svn: 209509
Kostya Serebryany [Fri, 23 May 2014 11:52:07 +0000 (11:52 +0000)]
[asan] properly instrument memory accesses that have small alignment (smaller than min(8,size)) by making two checks instead of one. This may slowdown some cases, e.g. long long on 32-bit or wide loads produced after loop unrolling. The benefit is higher sencitivity.
llvm-svn: 209508
Pekka Jaaskelainen [Fri, 23 May 2014 11:35:46 +0000 (11:35 +0000)]
Updated the llvm.mem.parallel_loop_access semantics to include the possibility
to have only some of the loop's memory instructions be annotated and still _help_
the loop carried dependence analysis.
This was discussed in the llvmdev ML (topic: "parallel loop metadata question").
llvm-svn: 209507
Bradley Smith [Fri, 23 May 2014 10:14:13 +0000 (10:14 +0000)]
Fixup sys::getHostCPUFeatures crypto names so it doesn't clash with kernel headers
llvm-svn: 209506
Daniel Jasper [Fri, 23 May 2014 08:52:10 +0000 (08:52 +0000)]
clang-tidy: Only add 'override' before inlined bodies.
llvm-svn: 209505
Simon Atanasyan [Fri, 23 May 2014 08:07:09 +0000 (08:07 +0000)]
[YAML] Add an optional argument `EnumMask` to the `yaml::IO::bitSetCase()`.
Some bit-set fields used in ELF file headers in fact contain two parts.
The first one is a regular bit-field. The second one is an enumeraion.
For example ELF header `e_flags` for MIPS target might contain the
following values:
Bit-set values:
EF_MIPS_NOREORDER = 0x00000001
EF_MIPS_PIC = 0x00000002
EF_MIPS_CPIC = 0x00000004
EF_MIPS_ABI2 = 0x00000020
Enumeration:
EF_MIPS_ARCH_32 = 0x50000000
EF_MIPS_ARCH_64 = 0x60000000
EF_MIPS_ARCH_32R2 = 0x70000000
EF_MIPS_ARCH_64R2 = 0x80000000
For printing bit-sets we use the `yaml::IO::bitSetCase()`. It does not
support bit-set/enumeration combinations and prints too many flags from
an enumeration part. This patch fixes this problem. New method
`yaml::IO::maskedBitSetCase()` handle "enumeration" part of bitset
defined by provided mask.
Patch reviewed by Nick Kledzik and Sean Silva.
llvm-svn: 209504
Robert Lytton [Fri, 23 May 2014 07:34:08 +0000 (07:34 +0000)]
Fix '-main-file-name <name>' so that it is used for the ModuleID.
Summary:
Previously, you could not specify the original file name when passing a preprocessed file into the compiler
Now you can use 'clang -Xclang -main-file-name -Xclang <original file name> ...'
Or 'clang -cc1 -main-file-name <original file name> ...'
llvm-svn: 209503
Yaron Keren [Fri, 23 May 2014 07:31:25 +0000 (07:31 +0000)]
Typedef NumeredTypesMapTy is not used anywhere.
llvm-svn: 209502
Jingyue Wu [Fri, 23 May 2014 06:30:12 +0000 (06:30 +0000)]
Test commit.
The keyword "virtual" is not necessary.
llvm-svn: 209501
Filipe Cabecinhas [Fri, 23 May 2014 05:52:12 +0000 (05:52 +0000)]
llvm-ar: Output the file we errored on.
llvm-svn: 209500
David Blaikie [Fri, 23 May 2014 05:03:23 +0000 (05:03 +0000)]
Rename a couple of variables to be more accurate.
It's not really a "ScopeDIE", as such - it's the abstract function
definition's DIE. And we usually use "SP" for subprograms, rather than
"Sub".
llvm-svn: 209499
David Blaikie [Fri, 23 May 2014 04:23:06 +0000 (04:23 +0000)]
DebugInfo: Fix cross-CU references for scopes (and variables within those scopes) in abstract definitions of cross-CU inlined functions
Found by Adrian Prantl during post-commit review of r209335.
llvm-svn: 209498
Rui Ueyama [Fri, 23 May 2014 03:08:05 +0000 (03:08 +0000)]
Use short identifier.
llvm-svn: 209497
Saleem Abdulrasool [Fri, 23 May 2014 02:56:51 +0000 (02:56 +0000)]
MC: remove unnecessary restriction on tests
Rafael correctly pointed out that the restriction is unnecessary. Although the
tests are intended to ensure that we dont abort due to an assertion, running the
tests in all modes is better since it also ensures that we dont crash without
assertions. Always run these tests to ensure that we can handle invalid input
correctly.
llvm-svn: 209496
Jiangning Liu [Fri, 23 May 2014 02:54:50 +0000 (02:54 +0000)]
[ARM64] Fix a bug in shuffle vector lowering to generate corect vext ISD with swapped input vectors.
llvm-svn: 209495
Sean Callanan [Fri, 23 May 2014 02:30:48 +0000 (02:30 +0000)]
Fixed the Symbol code to resolve the callable address
of the symbol itself rather than forcing clients to do
it. This simplifies the logic for the expression
parser a great deal.
<rdar://problem/
16935324>
llvm-svn: 209494
Jason Molenda [Fri, 23 May 2014 01:48:10 +0000 (01:48 +0000)]
Instead of having an UnwindTable own a single assembly profiler,
and sharing it with all of its FuncUnwinders, have each FuncUnwinder
create an AssemblyProfiler on demand as needed. I was worried that
the cost of creating the llvm disassemblers would be high for this
approach but it's not supposed to be an expensive operation, and it
means we don't need to add locks around this section of code.
<rdar://problem/
16992332>
llvm-svn: 209493
Jason Molenda [Fri, 23 May 2014 01:42:56 +0000 (01:42 +0000)]
Revert r209488; Greg suggests a different approach.
llvm-svn: 209492
Alexander Kornienko [Fri, 23 May 2014 01:37:30 +0000 (01:37 +0000)]
Clean DiagRanges. Fix a possible problem introduced in r209468.
llvm-svn: 209491
Richard Smith [Fri, 23 May 2014 01:22:46 +0000 (01:22 +0000)]
Attempt to placate compilers that warn on casts between pointer-to-object and
pointer-to-function types.
llvm-svn: 209490
Akira Hatanaka [Fri, 23 May 2014 00:38:07 +0000 (00:38 +0000)]
Fix a bug in xmmintrin.h.
The last step of _mm_cvtps_pi16 should use _mm_packs_pi32, which is a function
that reads two __m64 values and packs four 32-bit values into four 16-bit
values.
<rdar://problem/
16873717>
llvm-svn: 209489
Jason Molenda [Fri, 23 May 2014 00:08:09 +0000 (00:08 +0000)]
The UnwindTable (one per module) used to hand out shared pointers
to its unwind assembly profiler to all of the FuncUnwinders (one
per symbol) under it. If lldb is running multiple targets, you
could get two different FuncUnwinders in the same Module trying
to use the same llvm disassembler simultaneously and that may be
a re-entrancy problem.
Instead, the UnwindTable has the unwind assembly profiler and when
the FuncUnwinders want to use it, they get exclusive access to
the assembly profiler until they're done using it.
<rdar://problem/
16992332>
llvm-svn: 209488
Justin Bogner [Fri, 23 May 2014 00:06:56 +0000 (00:06 +0000)]
ScalarEvolution: Fix handling of AddRecs in isKnownPredicate
ScalarEvolution::isKnownPredicate() can wrongly reduce a comparison
when both the LHS and RHS are SCEVAddRecExprs. This checks that both
LHS and RHS are guarded in the case when both are SCEVAddRecExprs.
The test case is against indvars because I could not find a way to
directly test SCEV.
Patch by Sanjay Patel!
llvm-svn: 209487
Rui Ueyama [Fri, 23 May 2014 00:02:42 +0000 (00:02 +0000)]
[PECOFF] Make a separate pass for /alternatename symbols.
/alternatename is a command line option to define a weak alias. You
can use it as /alternatename:foo=bar to define "foo" as a weak alias
for "bar".
Because it's a command line option, the weak alias mapping is in the
LinkingContext object, and not in a object file being read.
Previously, we looked up the mapping each time we read a new symbol
from a file, to check if there is a weak alias defined for the symbol.
That's not wrong, but had made function signature's a bit complicated --
we had to pass the mapping object to many functions. Now their
parameter lists are much cleaner.
This also has another (unrealized) benefit. parseFile() now read a
file and then add alias symbols to the file. In the first pass a
LinkingContext object is not used at all. That should make it easy
to read files from archive files speculatively, as the first pass
is free from side effect.
llvm-svn: 209486
Greg Clayton [Thu, 22 May 2014 23:54:17 +0000 (23:54 +0000)]
Make sure SectionLoadHistory::GetCurrentSectionLoadList () is thread safe.
<rdar://problem/
15818525>
llvm-svn: 209485
Rafael Espindola [Thu, 22 May 2014 23:33:27 +0000 (23:33 +0000)]
Don't set unnamed_addr in CreateRuntimeVariable.
This was fairly broken. For example,
@__dso_handle would or would not get an unnamed_addr depending on how many
global destructors were used in a translation unit.
The consensus was that not every runtime variable is unnamed_addr and that
__dso_handle handle should not be, so just don't add unnamed_addr in
CreateRuntimeVariable.
llvm-svn: 209484
Michael J. Spencer [Thu, 22 May 2014 23:32:18 +0000 (23:32 +0000)]
[Graph Writer] Limit the length of the graph name because Windows can't handle it.
Windows can't handle paths longer than 260 code points without \\?\. Even
with \\?\ it can't handle path components longer than 255 code points. So
limit graph names to the arbitrary length of 140. Random characters are still
added to the end, so it's ok if graph names collide.
Differential Revision: http://reviews.llvm.org/D3883
llvm-svn: 209483
Richard Smith [Thu, 22 May 2014 23:19:02 +0000 (23:19 +0000)]
Avoid allocating extra memory to handle the lazy definition data pointer for
CXXRecordDecls when modules is enabled.
llvm-svn: 209482
Eric Christopher [Thu, 22 May 2014 23:09:57 +0000 (23:09 +0000)]
Make these bool bitfields.
llvm-svn: 209481
Rafael Espindola [Thu, 22 May 2014 22:57:39 +0000 (22:57 +0000)]
Don't reduce the stack protector level given -fstack-protector.
Before -fstack-protector would always force a level of 1, even if the default
was 2.
Patch by Brad Smith.
llvm-svn: 209479
Lang Hames [Thu, 22 May 2014 22:30:13 +0000 (22:30 +0000)]
[RuntimeDyld] Teach RuntimeDyldMachO how to handle scattered VANILLA relocs on
i386.
This fixes two more MCJIT regression tests on i386:
ExecutionEngine/MCJIT/2003-05-06-LivenessClobber.ll
ExecutionEngine/MCJIT/2013-04-04-RelocAddend.ll
The implementation of processScatteredVANILLA is tasteless (*ba-dum-ching*),
but I'm working on a substantial tidy-up of RuntimeDyldMachO that should
improve things.
This patch also fixes a type-o in RuntimeDyldMachO::processSECTDIFFRelocation,
and teaches that method to skip over the PAIR reloc following the SECTDIFF.
<rdar://problem/
16961886>
llvm-svn: 209478
Alexander Kornienko [Thu, 22 May 2014 22:06:08 +0000 (22:06 +0000)]
Use error_code::success() instead of make_error_code(llvm::errc::success).
llvm-svn: 209477
Alexey Samsonov [Thu, 22 May 2014 22:02:38 +0000 (22:02 +0000)]
[TSan] ifdef out certain functions if 128-bit ints are not supported.
llvm-svn: 209476