Chandler Carruth [Sat, 26 Jul 2014 02:14:54 +0000 (02:14 +0000)]
[x86] Revert r214007: Fix PR20355 ...
The clever way to implement signed multiplication with unsigned *is
already implemented* and tested and working correctly. The bug is
somewhere else. Re-investigating.
This will teach me to not scroll far enough to read the code that did
what I thought needed to be done.
llvm-svn: 214009
Richard Trieu [Sat, 26 Jul 2014 02:10:52 +0000 (02:10 +0000)]
If a template argument is non-evaluable expression, use the profile ID to see
if the two arguments are equal.
llvm-svn: 214008
Chandler Carruth [Sat, 26 Jul 2014 01:52:13 +0000 (01:52 +0000)]
[x86] Fix PR20355 (and dups) by not using unsigned multiplication when
signed multiplication is requested. While there is not a difference in
the *low* half of the result, the *high* half (used specifically to
implement the signed division by these constants) certainly is used. The
test case I've nuked was actively asserting wrong code.
There is a delightful solution to doing signed multiplication even when
we don't have it that Richard Smith has crafted, but I'll add the
machinery back and implement that in a follow-up patch. This at least
restores correctness.
llvm-svn: 214007
Alexey Samsonov [Sat, 26 Jul 2014 01:41:45 +0000 (01:41 +0000)]
[UBSan] Initialize symbolizer inside __ubsan::Init().
We used to initialize symbolizer lazily, but this doesn't work in
various sandboxed environments. Instead, let's be consistent with
the rest of sanitizers.
llvm-svn: 214006
Alexey Samsonov [Sat, 26 Jul 2014 01:37:23 +0000 (01:37 +0000)]
[Sanitizer] Simplify Symbolizer creation interface.
Get rid of Symbolizer::Init(path_to_external) in favor of
thread-safe Symbolizer::GetOrInit(), and use the latter version
everywhere. Implicitly depend on the value of external_symbolizer_path
runtime flag instead of passing it around manually.
No functionality change.
llvm-svn: 214005
Reid Kleckner [Sat, 26 Jul 2014 01:34:32 +0000 (01:34 +0000)]
MS ABI: Use musttail for vtable thunks that pass arguments by value
This moves some memptr specific code into the generic thunk emission
codepath.
Fixes PR20053.
Reviewers: majnemer
Differential Revision: http://reviews.llvm.org/D4613
llvm-svn: 214004
Reid Kleckner [Sat, 26 Jul 2014 01:30:05 +0000 (01:30 +0000)]
Remove an extra parameter and C++11 for loop-ify this code
llvm-svn: 214003
Jordan Rose [Sat, 26 Jul 2014 01:22:02 +0000 (01:22 +0000)]
Add a missing close quote in "while building module 'Foo:" diagnostic.
This isn't a real diagnostic kind, only a location note, and this form isn't even
used if the SourceManager can provide a valid presumed location. But still.
llvm-svn: 214002
Chandler Carruth [Sat, 26 Jul 2014 01:11:10 +0000 (01:11 +0000)]
[x86] Add coverage for PMUL* instruction testing on SSE2 as well as
SSE4.1.
llvm-svn: 214001
Richard Smith [Sat, 26 Jul 2014 01:10:32 +0000 (01:10 +0000)]
[modules] Work around mislayering of MC / Object.
llvm-svn: 214000
Tom Stellard [Sat, 26 Jul 2014 01:05:20 +0000 (01:05 +0000)]
R600: Add processor type for Mullins
llvm-svn: 213999
Bob Wilson [Sat, 26 Jul 2014 00:51:28 +0000 (00:51 +0000)]
Revert new test from 213993.
It requires an arm backend and also writes output in the test directory.
llvm-svn: 213998
Alexey Samsonov [Sat, 26 Jul 2014 00:49:36 +0000 (00:49 +0000)]
[DFSan] Fixup for r213980
llvm-svn: 213997
Richard Smith [Sat, 26 Jul 2014 00:47:13 +0000 (00:47 +0000)]
Improve -UNDEBUG binary size. We don't need a different assert fail message for
each different enum value here.
llvm-svn: 213996
NAKAMURA Takumi [Sat, 26 Jul 2014 00:45:43 +0000 (00:45 +0000)]
Update X86/Utils/LLVMBuild.txt corresponding to r213986. "Core" has been introduced.
llvm-svn: 213995
NAKAMURA Takumi [Sat, 26 Jul 2014 00:45:30 +0000 (00:45 +0000)]
IR/UseTest.cpp: Avoid std::to_string() to appease mingw32 bot.
llvm-svn: 213994
Bob Wilson [Sat, 26 Jul 2014 00:37:28 +0000 (00:37 +0000)]
Use -enable-global-merge option to match llvm r210639. <rdar://problem/
17803206>
llvm revision 210639 renamed the -global-merge backend option to
-enable-global-merge. This change simply updates clang to match that.
Patch by Steven Wu!
llvm-svn: 213993
NAKAMURA Takumi [Sat, 26 Jul 2014 00:28:09 +0000 (00:28 +0000)]
clang/test/CodeGenCXX/cxx1y-variable-template-linkage.cpp: Appease -Asserts build.
llvm-svn: 213992
Chandler Carruth [Sat, 26 Jul 2014 00:21:52 +0000 (00:21 +0000)]
[x86] More cleanup for this test -- simplify the command line.
llvm-svn: 213991
Reid Kleckner [Sat, 26 Jul 2014 00:12:26 +0000 (00:12 +0000)]
MS ABI: Ensure 'this' is first for byval+sret methods
Previously we were building up the inalloca struct in the usual pattern
of return type followed by arguments. However, on Windows, 'this'
always precedes the 'sret' parameter, so we need to insert it into the
struct first as a special case.
llvm-svn: 213990
Chandler Carruth [Sat, 26 Jul 2014 00:04:41 +0000 (00:04 +0000)]
[x86] Fix unused variable warning in no-asserts build.
llvm-svn: 213989
Chandler Carruth [Fri, 25 Jul 2014 23:59:20 +0000 (23:59 +0000)]
[x86] FileCheck-ize this test.
llvm-svn: 213988
Larisse Voufo [Fri, 25 Jul 2014 23:58:13 +0000 (23:58 +0000)]
Add test case for fix of linkage bug that miscompiled variable templates instantiated from similarly named local types (cf. r212233)
llvm-svn: 213987
Chandler Carruth [Fri, 25 Jul 2014 23:47:11 +0000 (23:47 +0000)]
[x86] Teach the X86 backend to print shuffle comments for PSHUFB
instructions which happen to have a constant mask.
Currently, this only handles a very narrow set of cases, but those
happen to be the cases that I care about for testing shuffles sanely.
This is a bit trickier than other shuffle instructions because we're
decoding constants out of the constant pool. The current MC layer makes
it completely impossible to inspect a constant pool entry, so we have to
do it at the MI level and attach the comment to the streamer on its way
out. So no joy for disassembling, but it does make test cases and asm
dumps *much* nicer.
Sorry for no test cases, but it didn't really seem that valuable to go
trolling through existing old test cases and updating them. I'll have
lots of testing of this in the upcoming patch for SSSE3 emission in the
new vector shuffle lowering code paths.
llvm-svn: 213986
Matt Arsenault [Fri, 25 Jul 2014 23:02:42 +0000 (23:02 +0000)]
R600/SI: Allow partial unrolling and increase thresholds.
llvm-svn: 213985
Rui Ueyama [Fri, 25 Jul 2014 22:28:49 +0000 (22:28 +0000)]
[PECOFF] Add /profile command line option.
llvm-svn: 213984
Alexey Samsonov [Fri, 25 Jul 2014 22:24:34 +0000 (22:24 +0000)]
[UBSan] Call UBSan initialization as early as possible.
Specifically, use .preinit_array initialization on Linux and dynamic global
initializer on another platforms. Historically UBSan didn't have any
initialization code and its runtime was stateless. This is no longer the
case - UBSan relies on some non-trivial functionality from sanitizer_common
(e.g. online symbolization) and is now configurable by runtime flags.
Additionally, we've dropped support for enabling UBSan only for a few shared
objects, so UBSan is now always linked into the main executable, so now
we can use similar initialization as all the rest sanitizers.
llvm-svn: 213983
Eric Christopher [Fri, 25 Jul 2014 22:22:39 +0000 (22:22 +0000)]
Move R600 subtarget dependent variables onto the subtarget.
No functional change.
llvm-svn: 213982
Alex Lorenz [Fri, 25 Jul 2014 22:22:24 +0000 (22:22 +0000)]
coverage: remove empty mapping regions
This patch removes the empty coverage mapping regions.
Those regions were produced by clang's old mapping region generation
algorithm, but the new algorithm doesn't generate them.
llvm-svn: 213981
Alexey Samsonov [Fri, 25 Jul 2014 22:05:02 +0000 (22:05 +0000)]
[Sanitizer] Introduce SANITIZER_CAN_USE_PREINIT_ARRAY definition and use it across sanitizers.
Get rid of ASAN_USE_PREINIT_ARRAY and LSAN_USE_PREINIT_ARRAY - just always
use .preinit_array if it's available. This mode seems stable enough, and
we've been relying on default values of these macro for a long time.
llvm-svn: 213980
Reid Kleckner [Fri, 25 Jul 2014 21:52:11 +0000 (21:52 +0000)]
Fix my broken test case in NDEBUG :(
llvm-svn: 213979
Reid Kleckner [Fri, 25 Jul 2014 21:48:10 +0000 (21:48 +0000)]
Fix my busted FileCheck invocation
llvm-svn: 213978
Hal Finkel [Fri, 25 Jul 2014 21:45:17 +0000 (21:45 +0000)]
Canonicalization for @llvm.assume
Adds simple logical canonicalization of assumption intrinsics to instcombine,
currently:
- invariant(a && b) -> invariant(a); invariant(b)
- invariant(!(a || b)) -> invariant(!a); invariant(!b)
llvm-svn: 213977
Reid Kleckner [Fri, 25 Jul 2014 21:39:46 +0000 (21:39 +0000)]
MS ABI: Don't push destructor cleanups for aggregate parameters in thunks
The target method of the thunk will perform the cleanup. This can't be
tested in 32-bit x86 yet because passing something by value would create
an inalloca, and we refuse to generate broken code for that.
llvm-svn: 213976
Nico Weber [Fri, 25 Jul 2014 21:37:41 +0000 (21:37 +0000)]
Wrap to 80 columns, no behavior change.
llvm-svn: 213975
NAKAMURA Takumi [Fri, 25 Jul 2014 21:33:18 +0000 (21:33 +0000)]
llvm-uselistorder: Fix up LINK_COMPONENTS.
llvm-svn: 213974
Hal Finkel [Fri, 25 Jul 2014 21:13:35 +0000 (21:13 +0000)]
Add @llvm.assume, lowering, and some basic properties
This is the first commit in a series that add an @llvm.assume intrinsic which
can be used to provide the optimizer with a condition it may assume to be true
(when the control flow would hit the intrinsic call). Some basic properties are added here:
- llvm.invariant(true) is dead.
- llvm.invariant(false) is unreachable (this directly corresponds to the
documented behavior of MSVC's __assume(0)), so is llvm.invariant(undef).
The intrinsic is tagged as writing arbitrarily, in order to maintain control
dependencies. BasicAA has been updated, however, to return NoModRef for any
particular location-based query so that we don't unnecessarily block code
motion.
llvm-svn: 213973
Joerg Sonnenberger [Fri, 25 Jul 2014 20:57:24 +0000 (20:57 +0000)]
Now that PIC generation on PPC32 is supported, hook up linking support
for NetBSD.
llvm-svn: 213972
Warren Hunt [Fri, 25 Jul 2014 20:52:51 +0000 (20:52 +0000)]
Revert r213437
We no longer plan to use __except_hander3 and rather use custom
personality functions per __try block.
llvm-svn: 213971
Akira Hatanaka [Fri, 25 Jul 2014 19:47:46 +0000 (19:47 +0000)]
[stack protector] Add test cases for thumb and thumb2.
<rdar://problem/
12475629>
llvm-svn: 213970
Rui Ueyama [Fri, 25 Jul 2014 19:46:31 +0000 (19:46 +0000)]
Fix unsafe memory access
The following expression
m[i] = m[j]
where m is a DenseMap and i != j is not safe. m[j] returns a
reference, which would be invalidated when a rehashing occurs.
If rehashing occurs to make room for m[i], m[j] becomes
invalid, and that invalid reference would be used as the RHS
value of the expression.
llvm-svn: 213969
Fariborz Jahanian [Fri, 25 Jul 2014 19:45:01 +0000 (19:45 +0000)]
Objective-C. Warn if protocol used in an @protocol
expression is a forward declaration as this results
in undefined behavior. rdar://
17768630
llvm-svn: 213968
Akira Hatanaka [Fri, 25 Jul 2014 19:31:34 +0000 (19:31 +0000)]
[stack protector] Fix a potential security bug in stack protector where the
address of the stack guard was being spilled to the stack.
Previously the address of the stack guard would get spilled to the stack if it
was impossible to keep it in a register. This patch introduces a new target
independent node and pseudo instruction which gets expanded post-RA to a
sequence of instructions that load the stack guard value. Register allocator
can now just remat the value when it can't keep it in a register.
<rdar://problem/
12475629>
llvm-svn: 213967
Brad Smith [Fri, 25 Jul 2014 19:28:44 +0000 (19:28 +0000)]
Fix arc4random detection.
Patch by Pascal Stumpf.
llvm-svn: 213966
Todd Fiala [Fri, 25 Jul 2014 19:24:52 +0000 (19:24 +0000)]
Minor fixups to documentation for Process::Launch()/DoLaunch().
The code had moved forward with changes for using ProcessLaunchInfo,
but the documentation still referred to arguments that no longer
get passed to these methods.
llvm-svn: 213965
Rafael Espindola [Fri, 25 Jul 2014 19:22:51 +0000 (19:22 +0000)]
Return a StringRef in getDefaultUniversalArchName.
Patch by Stephen Drake.
llvm-svn: 213964
Rafael Espindola [Fri, 25 Jul 2014 19:06:39 +0000 (19:06 +0000)]
Remove dead code.
llvm-svn: 213963
Johannes Doerfert [Fri, 25 Jul 2014 17:49:55 +0000 (17:49 +0000)]
[Fix] Added RuntimeDebugBuilder to the build
llvm-svn: 213962
Hal Finkel [Fri, 25 Jul 2014 17:47:22 +0000 (17:47 +0000)]
[PowerPC] Support TLS on PPC32/ELF
Patch by Justin Hibbits!
llvm-svn: 213960
Juergen Ributzka [Fri, 25 Jul 2014 17:47:14 +0000 (17:47 +0000)]
[FastISel][AArch64] Add support for frameaddress intrinsic.
This commit implements the frameaddress intrinsic for the AArch64 architecture
in FastISel.
There were two test cases that pretty much tested the same, so I combined them
to a single test case.
Fixes <rdar://problem/
17811834>
llvm-svn: 213959
David Majnemer [Fri, 25 Jul 2014 17:30:10 +0000 (17:30 +0000)]
clang-cl: Add support for /Zp
CL's /Zp flag is analogous to GCC's -fpack-struct, it controls the
default maximum alignment of records.
Differential Revision: http://reviews.llvm.org/D4671
llvm-svn: 213958
Duncan P. N. Exon Smith [Fri, 25 Jul 2014 17:13:03 +0000 (17:13 +0000)]
Move -verify-use-list-order into llvm-uselistorder
Ugh. Turns out not even transformation passes link in how to read IR.
I sincerely believe the buildbots will finally agree with my system
after this though. (I don't really understand why all of this has been
working on my system, but not on all the buildbots.)
Create a new tool called llvm-uselistorder to use for verifying use-list
order. For now, just dump everything from the (now defunct)
-verify-use-list-order pass into the tool.
This might be a better way to test use-list order anyway.
Part of PR5680.
llvm-svn: 213957
David Blaikie [Fri, 25 Jul 2014 17:11:58 +0000 (17:11 +0000)]
Reapply "DebugInfo: Don't put fission type units in comdat sections."
This recommits r208930, r208933, and r208975 (by reverting r209338) and
reverts r209529 (the FIXME to readd this functionality once the tools
were fixed) now that DWP has been fixed to cope with a single section
for all fission type units.
Original commit message:
"Since type units in the dwo file are handled by a debug aware tool,
they don't need to leverage the ELF comdat grouping to implement
deduplication. Avoid creating all the .group sections for these as a
space optimization."
llvm-svn: 213956
Hal Finkel [Fri, 25 Jul 2014 16:45:10 +0000 (16:45 +0000)]
Claim AA generally as code owner
As per nominations from Chandler and Arnold.
llvm-svn: 213955
Hans Wennborg [Fri, 25 Jul 2014 16:22:13 +0000 (16:22 +0000)]
Fix MSVC2012 build error in UseListOrder.cpp
I think the compiler got confused by the nested DEBUG macros.
It was failing with:
UseListOrder.cpp(80) : error C2059: syntax error : '}'
llvm-svn: 213954
Duncan P. N. Exon Smith [Fri, 25 Jul 2014 16:13:16 +0000 (16:13 +0000)]
Bitcode: Don't optimize constants when preserving use-list order
`ValueEnumerator::OptimizeConstants()` creates forward references within
the constant pools, which makes predicting constants' use-list order
difficult. For now, just disable the optimization.
This can be re-enabled in the future in one of two ways:
- Enable a limited version of this optimization that doesn't create
forward references. One idea is to categorize constants by their
"height" and make that the top-level sort.
- Enable it entirely. This requires predicting how may times each
constant will be recreated as its operands' and operands' operands'
(etc.) forward references get resolved.
This is part of PR5680.
llvm-svn: 213953
David Blaikie [Fri, 25 Jul 2014 16:10:16 +0000 (16:10 +0000)]
Recommit r212203: Don't try to construct debug LexicalScopes hierarchy for functions that do not have top level debug information.
Reverted by Eric Christopher (Thanks!) in r212203 after Bob Wilson
reported LTO issues. Duncan Exon Smith and Aditya Nandakumar helped
provide a reduced reproduction, though the failure wasn't too hard to
guess, and even easier with the example to confirm.
The assertion that the subprogram metadata associated with an
llvm::Function matches the scope data referenced by the DbgLocs on the
instructions in that function is not valid under LTO. In LTO, a C++
inline function might exist in multiple CUs and the subprogram metadata
nodes will refer to the same llvm::Function. In this case, depending on
the order of the CUs, the first intance of the subprogram metadata may
not be the one referenced by the instructions in that function and the
assertion will fail.
A test case (test/DebugInfo/cross-cu-linkonce-distinct.ll) is added, the
assertion removed and a comment added to explain this situation.
This was then reverted again in r213581 as it caused PR20367. The root
cause of this was the early exit in LiveDebugVariables meant that
spurious DBG_VALUE intrinsics that referenced dead variables were not
removed, causing an assertion/crash later on. The fix is to have
LiveDebugVariables strip all DBG_VALUE intrinsics in functions without
debug info as they're not needed anyway. Test case added to cover this
situation (that occurs when a debug-having function is inlined into a
nodebug function) in test/DebugInfo/X86/nodebug_with_debug_loc.ll
Original commit message:
If a function isn't actually in a CU's subprogram list in the debug info
metadata, ignore all the DebugLocs and don't try to build scopes, track
variables, etc.
While this is possibly a minor optimization, it's also a correctness fix
for an incoming patch that will add assertions to LexicalScopes and the
debug info verifier to ensure that all scope chains lead to debug info
for the current function.
Fix up a few test cases that had broken/incomplete debug info that could
violate this constraint.
Add a test case where this occurs by design (inlining a
debug-info-having function in an attribute nodebug function - we want
this to work because /if/ the nodebug function is then inlined into a
debug-info-having function, it should be fine (and will work fine - we
just stitch the scopes up as usual), but should the inlining not happen
we need to not assert fail either).
llvm-svn: 213952
David Blaikie [Fri, 25 Jul 2014 16:05:18 +0000 (16:05 +0000)]
DebugInfo: Fix up some test cases to have more correct debug info metadata.
* Add CUs to the named CU node
* Add missing DW_TAG_subprogram nodes
* Add llvm::Functions to the DW_TAG_subprogram nodes
This cleans up the tests so that they don't break under a
soon-to-be-made change that is more strict about such things.
llvm-svn: 213951
Hal Finkel [Fri, 25 Jul 2014 15:54:55 +0000 (15:54 +0000)]
Add code owner of scoped-noalias metadata
Add myself as the code owner for the scoped-noalias metadata I've developed.
llvm-svn: 213950
Hal Finkel [Fri, 25 Jul 2014 15:50:08 +0000 (15:50 +0000)]
Convert noalias parameter attributes into noalias metadata during inlining
This functionality is currently turned off by default.
Part of the motivation for introducing scoped-noalias metadata is to enable the
preservation of noalias parameter attribute information after inlining.
Sometimes this can be inferred from the code in the caller after inlining, but
often we simply lose valuable information.
The overall process if fairly simple:
1. Create a new unqiue scope domain.
2. For each (used) noalias parameter, create a new alias scope.
3. For each pointer, collect the underlying objects. Add a noalias scope for
each noalias parameter from which we're not derived (and has not been
captured prior to that point).
4. Add an alias.scope for each noalias parameter from which we might be
derived (or has been captured before that point).
Note that the capture checks apply only if one of the underlying objects is not
an identified function-local object.
llvm-svn: 213949
Hal Finkel [Fri, 25 Jul 2014 15:50:02 +0000 (15:50 +0000)]
Simplify and improve scoped-noalias metadata semantics
In the process of fixing the noalias parameter -> metadata conversion process
that will take place during inlining (which will be committed soon, but not
turned on by default), I have come to realize that the semantics provided by
yesterday's commit are not really what we want. Here's why:
void foo(noalias a, noalias b, noalias c, bool x) {
*q = x ? a : b;
*c = *q;
}
Generically, we know that *c does not alias with *a and with *b (so there is an
'and' in what we know we're not), and we know that *q might be derived from *a
or from *b (so there is an 'or' in what we know that we are). So we do not want
the semantics currently, where any noalias scope matching any alias.scope
causes a NoAlias return. What we want to know is that the noalias scopes form a
superset of the alias.scope list (meaning that all the things we know we're not
is a superset of all of things the other instruction might be).
Making that change, however, introduces a composibility problem. If we inline
once, adding the noalias metadata, and then inline again adding more, and we
append new scopes onto the noalias and alias.scope lists each time. But, this
means that we could change what was a NoAlias result previously into a MayAlias
result because we appended an additional scope onto one of the alias.scope
lists. So, instead of giving scopes the ability to have parents (which I had
borrowed from the TBAA implementation, but seems increasingly unlikely to be
useful in practice), I've given them domains. The subset/superset condition now
applies within each domain independently, and we only need it to hold in one
domain. Each time we inline, we add the new scopes in a new scope domain, and
everything now composes nicely. In addition, this simplifies the
implementation.
llvm-svn: 213948
Duncan P. N. Exon Smith [Fri, 25 Jul 2014 15:41:49 +0000 (15:41 +0000)]
Try to fix a layering violation introduced by r213945
The dragonegg buildbot (and others?) started failing after
r213945/r213946 because `llvm-as` wasn't linking in the bitcode reader.
I think moving the verify functions to the same file as the verify pass
should fix the build. Adding a command-line option for maintaining
use-list order in assembly as a drive-by to prevent warnings about
unused static functions.
llvm-svn: 213947
Duncan P. N. Exon Smith [Fri, 25 Jul 2014 15:00:02 +0000 (15:00 +0000)]
Fix -Werror build after r213945
llvm-svn: 213946
Duncan P. N. Exon Smith [Fri, 25 Jul 2014 14:49:26 +0000 (14:49 +0000)]
IPO: Add use-list-order verifier
Add a -verify-use-list-order pass, which shuffles use-list order, writes
to bitcode, reads back, and verifies that the (shuffled) order matches.
- The utility functions live in lib/IR/UseListOrder.cpp.
- Moved (and renamed) the command-line option to enable writing
use-lists, so that this pass can return early if the use-list orders
aren't being serialized.
It's not clear that this pass is the right direction long-term (perhaps
a separate tool instead?), but short-term it's a great way to test the
use-list order prototype. I've added an XFAIL-ed testcase that I'm
hoping to get working pretty quickly.
This is part of PR5680.
llvm-svn: 213945
Amara Emerson [Fri, 25 Jul 2014 14:03:14 +0000 (14:03 +0000)]
[ARM] Emit ABI_PCS_R9_use build attribute.
Patch by Ben Foster!
Differential Revision: http://reviews.llvm.org/D4657
llvm-svn: 213944
Dmitry Vyukov [Fri, 25 Jul 2014 13:48:25 +0000 (13:48 +0000)]
tsan: query RSS every 100ms
Now that it become faster, it's OK to query it every 100ms again.
llvm-svn: 213943
Dmitry Vyukov [Fri, 25 Jul 2014 13:47:57 +0000 (13:47 +0000)]
tsan: fix and make faster GetRSS
It is currently broken because it reads a wrong value from profile (heap instead of total).
Also make it faster by reading /proc/self/statm. Reading of /proc/self/smaps
can consume more than 50% of time on beefy apps if done every 100ms.
llvm-svn: 213942
Viktor Kutuzov [Fri, 25 Jul 2014 12:45:36 +0000 (12:45 +0000)]
Allow initialization of Asan interceptors before the general Asan initialization takes place on FreeBSD
Differential Revision: http://reviews.llvm.org/D4496
llvm-svn: 213941
Viktor Kutuzov [Fri, 25 Jul 2014 12:29:04 +0000 (12:29 +0000)]
Support traversing ELF objects for sanitizers needs on FreeBSD in 32-bit mode
Differential Revision: http://reviews.llvm.org/D4656
llvm-svn: 213940
Benjamin Kramer [Fri, 25 Jul 2014 11:42:14 +0000 (11:42 +0000)]
Run sort_includes.py on the AArch64 backend.
No functionality change.
llvm-svn: 213938
Simon Atanasyan [Fri, 25 Jul 2014 11:20:21 +0000 (11:20 +0000)]
[Driver][Mips] Remove "fp64" directories from the mips-mti-linux-gnu toolchain
directories description. Released version of this toolchain has not separate
libraries for -mfp64 command line option.
llvm-svn: 213937
Chandler Carruth [Fri, 25 Jul 2014 10:27:40 +0000 (10:27 +0000)]
[cmake] Use the external project machinery for libcxxabi so that it can
be disabled in CMake or relocated if desired.
llvm-svn: 213936
James Molloy [Fri, 25 Jul 2014 10:19:47 +0000 (10:19 +0000)]
Revert part of r206963
Specifically the part where we removed a warning to be compatible with GCC, which has been widely regarded as a bad idea.
I'm not quite happy with how obtuse this warning is, especially in the fairly common case of a 32-bit integer literal, so I've got another patch awaiting review that adds a fixit to reduce confusion.
llvm-svn: 213935
NAKAMURA Takumi [Fri, 25 Jul 2014 09:55:01 +0000 (09:55 +0000)]
llvm/test/CodeGen/ARM/inlineasm-global.ll: Add explicit triple to appease targeting *-win32.
llvm-svn: 213933
NAKAMURA Takumi [Fri, 25 Jul 2014 09:54:49 +0000 (09:54 +0000)]
llvm/test/CodeGen/ARM/inlineasm-global.ll: Avoid specifing source file on llc.
It sometimes confuses FileCheck. Consider the case that path contains 'stmib'. :)
llvm-svn: 213932
Chandler Carruth [Fri, 25 Jul 2014 09:19:23 +0000 (09:19 +0000)]
[SDAG] Enable the new assert for out-of-range result numbers in
SDValues, fixing the two bugs left in the regression suite.
The key for both of these was the use a single value type rather than
a VTList which caused an unintentionally single-result merge-value node.
Fix this by getting the appropriate VTList in place.
Doing this exposed that the comments in x86's code abouth how MUL_LOHI
operands are handle is wrong. The bug with the use of out-of-range
result numbers was hiding the bug about the order of operands here (as
best i can tell). There are more places where the code appears to get
this backwards still...
llvm-svn: 213931
Chandler Carruth [Fri, 25 Jul 2014 09:19:18 +0000 (09:19 +0000)]
[SDAG] Don't insert the VRBase into a mapping from SDValues when the def
doesn't actually correspond to an SDValue at all. Fixes most of the
remaining asserts on out-of-range SDValue result numbers.
llvm-svn: 213930
Alexander Potapenko [Fri, 25 Jul 2014 08:57:51 +0000 (08:57 +0000)]
[lsan] Follow-up for r213518: replace MAP_ANONYMOUS with MAP_ANON
(despite it's deprecated on Linux) to remove the ifdefs.
llvm-svn: 213929
Matt Arsenault [Fri, 25 Jul 2014 07:56:42 +0000 (07:56 +0000)]
Store nodes only have 1 result.
llvm-svn: 213928
Alexey Bataev [Fri, 25 Jul 2014 07:55:17 +0000 (07:55 +0000)]
[OPENMP] Improved codegen for outlined functions for 'parallel' directives.
llvm-svn: 213927
Chandler Carruth [Fri, 25 Jul 2014 07:23:23 +0000 (07:23 +0000)]
[SDAG] Start plumbing an assert into SDValues that we don't form one
with a result number outside the range of results for the node.
I don't know how we managed to not really check this very basic
invariant for so long, but the code is *very* broken at this point.
I have over 270 test failures with the assert enabled. I'm committing it
disabled so that others can join in the cleanup effort and reproduce the
issues. I've also included one of the obvious fixes that I already
found. More fixes to come.
llvm-svn: 213926
Alexey Bataev [Fri, 25 Jul 2014 06:27:47 +0000 (06:27 +0000)]
[OPENMP] Improved DSA processing of the loop control variables for loop directives.
llvm-svn: 213925
Akira Hatanaka [Fri, 25 Jul 2014 05:12:49 +0000 (05:12 +0000)]
[ARM] In thumb mode, emit directive ".code 16" before file level inline
assembly instructions.
This is necessary to ensure ARM assembler switches to Thumb mode before it
starts assembling the file level inline assembly instructions at the beginning
of a .s file.
<rdar://problem/
17757232>
llvm-svn: 213924
Lang Hames [Fri, 25 Jul 2014 04:50:08 +0000 (04:50 +0000)]
[X86] Add comments to clarify some non-obvious lines in the stackmap-nops.ll
testcases.
Based on code review from Philip Reames. Thanks Philip!
llvm-svn: 213923
Richard Smith [Fri, 25 Jul 2014 04:40:03 +0000 (04:40 +0000)]
[modules] Substantially improve handling of #undef:
* Track override set across module load and save
* Track originating module to allow proper re-export of #undef
* Make override set properly transitive when it picks up a #undef
This fixes nearly all of the remaining macro issues with self-host.
llvm-svn: 213922
David Majnemer [Fri, 25 Jul 2014 04:30:11 +0000 (04:30 +0000)]
llvm-vtabledump: use a std::map instead of a StringMap for VBTables
StringMap doesn't guarantee any particular iteration order,
this is suboptimal when comparing llvm-vtabledump's output for two
object files.
llvm-svn: 213921
Ehsan Akhgari [Fri, 25 Jul 2014 02:51:57 +0000 (02:51 +0000)]
Fix a warning in CoverageMappingReader.cpp
llvm-svn: 213920
Ehsan Akhgari [Fri, 25 Jul 2014 02:39:33 +0000 (02:39 +0000)]
Fix test/CodeGen/ms-inline-asm.c from r213916.
llvm-svn: 213919
Ehsan Akhgari [Fri, 25 Jul 2014 02:35:50 +0000 (02:35 +0000)]
Fix test/CodeGen/ms-inline-asm.cpp from r213916.
llvm-svn: 213918
Lang Hames [Fri, 25 Jul 2014 02:29:19 +0000 (02:29 +0000)]
[X86] Clarify some stackmap shadow optimization code as based on review
feedback from Eric Christopher.
No functional change.
llvm-svn: 213917
Ehsan Akhgari [Fri, 25 Jul 2014 02:27:14 +0000 (02:27 +0000)]
clang-cl: Merge adjacent single-line __asm blocks
Summary:
This patch extends the __asm parser to make it keep parsing input tokens
as inline assembly if a single-line __asm line is followed by another line
starting with __asm too. It also makes sure that we correctly keep
matching braces in such situations by separating the notions of how many
braces we are matching and whether we are in single-line asm block mode.
Reviewers: rnk
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D4598
llvm-svn: 213916
Bill Schmidt [Fri, 25 Jul 2014 01:55:55 +0000 (01:55 +0000)]
[PATCH][PPC64LE] Correct little-endian usage of vmrgh* and vmrgl*.
Because the PowerPC vmrgh* and vmrgl* instructions have a built-in
big-endian bias, it is necessary to swap their inputs in little-endian
mode when using them to implement a vector shuffle. This was
previously missed in the vector LE implementation.
There was already logic to distinguish between unary and "normal"
vmrg* vector shuffles, so this patch extends that logic to use a third
option: "swapped" vmrg* vector shuffles that are used for little
endian in place of the "normal" ones.
I've updated the vec-shuffle-le.ll test to check for the expected
register ordering on the generated instructions.
This bug was discovered when testing the LE and ELFv2 patches for
safety if they were backported to 3.4. A different vectorization
decision was made in 3.4 than on mainline trunk, and that exposed the
problem. I've verified this fix takes care of that issue.
llvm-svn: 213915
Todd Fiala [Fri, 25 Jul 2014 01:15:34 +0000 (01:15 +0000)]
Fix an x86 assembler stack unwind calculation for non-volatile registers.
This change has the practical effect of fixing some backtrace
scenarios that would fail with inferiors running on the Android Art
host-side JVM under Linux x86_64 on Ubuntu 14.04.
See this lldb-commits thread for more details:
http://lists.cs.uiuc.edu/pipermail/lldb-commits/Week-of-Mon-
20140721/011988.html
Change by Tong Shen.
Reviewed by Jason Molenda.
Tested:
Ubuntu 14.04 x86_64, clang-3.5-built lldb.
MacOSX 10.10 Preview 4, Xcode 6 Beta 4-built lldb.
llvm-svn: 213914
Richard Smith [Fri, 25 Jul 2014 01:12:44 +0000 (01:12 +0000)]
PR20445: Properly transform the initializer in a CXXNewExpr rather than running
it through the normal TreeTransform logic for Exprs (which will strip off
implicit parts of the initialization and never re-create them).
llvm-svn: 213913
Richard Trieu [Fri, 25 Jul 2014 00:24:02 +0000 (00:24 +0000)]
Pass the PrintingPolicy when converting types to strings in template type
diffing. This removes extra "struct"/"class" in the type names and gives
"bool" instead of "_Bool" for booleans.
llvm-svn: 213912
Alex Lorenz [Thu, 24 Jul 2014 23:57:54 +0000 (23:57 +0000)]
Add code coverage mapping data, reader, and writer.
This patch implements the data structures, the reader and
the writers for the new code coverage mapping system.
The new code coverage mapping system uses the instrumentation
based profiling to provide code coverage analysis.
llvm-svn: 213910
Alex Lorenz [Thu, 24 Jul 2014 23:55:56 +0000 (23:55 +0000)]
Add code coverage mapping data, reader, and writer.
This patch implements the data structures, the reader and
the writers for the new code coverage mapping system.
The new code coverage mapping system uses the instrumentation
based profiling to provide code coverage analysis.
llvm-svn: 213909
Johannes Doerfert [Thu, 24 Jul 2014 23:55:19 +0000 (23:55 +0000)]
[Refactor] Expose the runtime debug builder
llvm-svn: 213908
Johannes Doerfert [Thu, 24 Jul 2014 23:48:02 +0000 (23:48 +0000)]
Make getIslCompatibleName globaly available
llvm-svn: 213907
Kevin Enderby [Thu, 24 Jul 2014 23:31:52 +0000 (23:31 +0000)]
Add an implementation for llvm-nm’s -print-file-name option (aka -o and -A).
The -print-file-name option in llvm-nm is to precede each symbol
with the object file it came from. While code for the parsing of this
option and its aliases existed there was no code to implement it.
llvm-svn: 213906