David Blaikie [Sun, 2 Nov 2014 06:46:40 +0000 (06:46 +0000)]
Push DwarfUnit::addAddress down into DwarfCompileUnit
llvm-svn: 221085
David Blaikie [Sun, 2 Nov 2014 06:37:23 +0000 (06:37 +0000)]
Sink DwarfUnit::addVariableAddress into DwarfCompileUnit since type units don't have variables
llvm-svn: 221084
David Blaikie [Sun, 2 Nov 2014 06:16:39 +0000 (06:16 +0000)]
DebugInfo: Sink accelerator table lists down (GlobalNames/Types) into DwarfCompileUnit
llvm-svn: 221083
David Blaikie [Sun, 2 Nov 2014 06:06:14 +0000 (06:06 +0000)]
Add DwarfUnit::addGlobalType to match DwarfUnit::addGlobalName
(these will shortly become virtual, with a null implementation in
DwarfUnit (since type units don't have accelerator tables in the current
schema) and the current implementation down in DwarfCompileUnit, moving
the actual maps there too)
llvm-svn: 221082
NAKAMURA Takumi [Sun, 2 Nov 2014 04:43:54 +0000 (04:43 +0000)]
Revert r221056 and others, "[mips] Move F128 argument handling into MipsCCState as we did for returns. NFC."
r221056 "[mips] Move F128 argument handling into MipsCCState as we did for returns. NFC."
r221058 "[mips] Fix unused variable warning introduced in r221056"
r221059 "[mips] Move all ByVal handling into CCState and tablegen-erated code. NFC."
r221061 "Renamed CCState members that appear to misspell 'Processed' as 'Proceed'. NFC."
It cuased an undefined behavior in LLVM :: CodeGen/Mips/return-vector.ll.
llvm-svn: 221081
David Blaikie [Sun, 2 Nov 2014 03:09:13 +0000 (03:09 +0000)]
DebugInfo: Refactor index type DIE initialization by rolling it into the accessor
llvm-svn: 221080
David Blaikie [Sun, 2 Nov 2014 02:40:26 +0000 (02:40 +0000)]
Be sure to initialize DwarfCompileUnit::LabelBegin now that it may be skipped in initSection
llvm-svn: 221079
David Blaikie [Sun, 2 Nov 2014 02:26:24 +0000 (02:26 +0000)]
Don't bother creating LabelBegin for .dwo units
This would help catch cases where we might otherwise try to reference a
dwo CU label, which would be weird - because without relocations in the
dwo file it's not generally meaningful to talk about the CU offsets
there (or, if it is, we can do so in absolute terms without using a
relocation to compute it).
llvm-svn: 221078
Tim Northover [Sun, 2 Nov 2014 01:21:51 +0000 (01:21 +0000)]
Docs: update va_arg example with valid x86_64 va_list type.
The given example was overflowing its alloca and segfaulting if actually run on
x86, so it's a good idea to provide something that works there too.
Patch by Ramkumar Ramachandra.
llvm-svn: 221077
David Blaikie [Sun, 2 Nov 2014 01:21:43 +0000 (01:21 +0000)]
Drop DwarfCompileUnit::getLocalLabel* in favor of just mapping through the skeleton explicitly.
Confusing to do this two different ways - I'm not too wedded to either
one, but here goes.
llvm-svn: 221076
David Blaikie [Sun, 2 Nov 2014 01:21:40 +0000 (01:21 +0000)]
Sink DwarfUnit::LabelBegin down into DwarfCompileUnit since that's the only place it's needed.
llvm-svn: 221075
Rafael Espindola [Sun, 2 Nov 2014 01:12:02 +0000 (01:12 +0000)]
Update test to use llvm-readobj. NFC.
llvm-svn: 221074
Ed Maste [Sun, 2 Nov 2014 00:24:22 +0000 (00:24 +0000)]
Update for LLVM API change in r221024
llvm-svn: 221073
David Blaikie [Sat, 1 Nov 2014 23:59:23 +0000 (23:59 +0000)]
Sink dwarf unit length emission down into DwarfUnit::emitHeader
This allows the CU label to be emitted only for compile units, as
they're the only ones that need it (so they can be referenced from
pubnames)
llvm-svn: 221072
David Blaikie [Sat, 1 Nov 2014 23:50:59 +0000 (23:50 +0000)]
Test 221067 in a fixed-target test so as not to fail on targets with different DWARF encodings
llvm-svn: 221071
Rafael Espindola [Sat, 1 Nov 2014 23:49:44 +0000 (23:49 +0000)]
Fix the build of the gold plugin.
I did the previous patch on OS X and didn't noticed the issue.
llvm-svn: 221070
David Majnemer [Sat, 1 Nov 2014 23:46:05 +0000 (23:46 +0000)]
InstCombine: Don't assume that m_ZExt matches an Instruction
m_ZExt might bind against a ConstantExpr instead of an Instruction.
Assuming this, using cast<Instruction>, results in InstCombine crashing.
Instead, introduce ZExtOperator to bridge both Instruction and
ConstantExpr ZExts.
This fixes PR21445.
llvm-svn: 221069
David Blaikie [Sat, 1 Nov 2014 23:42:30 +0000 (23:42 +0000)]
Remove test coverage added in 221067 due to it being non-portable.
Will try to find a portable way to test this (or a fixed-target test I
can add such coverage to) shortly.
llvm-svn: 221068
David Blaikie [Sat, 1 Nov 2014 23:07:14 +0000 (23:07 +0000)]
Remove DwarfUnit::LabelEnd in favor of computing the length of the section directly
This was a compile-unit specific label (unused in type units) and seems
unnecessary anyway when we can more easily directly compute the size of
the compile unit.
llvm-svn: 221067
Craig Topper [Sat, 1 Nov 2014 22:50:57 +0000 (22:50 +0000)]
Add _lzcnt_u32 and _lzcnt_u64 to lzcntintrin.h to match Intel documentation names for these intrinsics.
llvm-svn: 221066
Craig Topper [Sat, 1 Nov 2014 22:50:54 +0000 (22:50 +0000)]
Avoid undefined behavior in the x86 bmi header file by explicitly checking for 0 before calling __builtin_ctz. Without this the optimizers may take advantage of the undefined behavior and produce incorrect results. LLVM itself still needs to be taught to merge the zero check into the llvm.cttz with defined zero behavior.
llvm-svn: 221065
Craig Topper [Sat, 1 Nov 2014 22:25:23 +0000 (22:25 +0000)]
Avoid undefined behavior in the x86 lzcnt header file by explicitly checking for 0 before calling __builtin_clz. Without this the optimizers may take advantage of the undefined behavior and produce incorrect results. LLVM itself still needs to be taught to merge the zero check into the llvm.ctlz with defined zero behavior.
llvm-svn: 221064
Justin Hibbits [Sat, 1 Nov 2014 21:27:08 +0000 (21:27 +0000)]
Use kern.proc.auxv to get the aux data
Summary:
Instead of using a homegrown solution to get the auxv from a process, instead
use the OS-provided sysctl to get the needed data. This allows the same code to
be used for both 32-bit and 64-bit processes on a 64-bit host.
Reviewers: emaste
Reviewed By: emaste
Subscribers: emaste, lldb-commits
Differential Revision: http://reviews.llvm.org/D6071
llvm-svn: 221063
David Blaikie [Sat, 1 Nov 2014 20:06:28 +0000 (20:06 +0000)]
Sink DwarfUnit::SectionSym into DwarfCompileUnit as it's only needed/used there.
llvm-svn: 221062
Daniel Sanders [Sat, 1 Nov 2014 19:32:23 +0000 (19:32 +0000)]
Renamed CCState members that appear to misspell 'Processed' as 'Proceed'. NFC.
Reviewers: rnk
Reviewed By: rnk
Subscribers: rnk, llvm-commits
Differential Revision: http://reviews.llvm.org/D5978
llvm-svn: 221061
David Blaikie [Sat, 1 Nov 2014 19:26:05 +0000 (19:26 +0000)]
Make DwarfCompileUnit::Skeleton more narrowly typed (DwarfCompileUnit* instead of DwarfUnit*) now that it's specific to DwarfCompileUnit anyway.
llvm-svn: 221060
Daniel Sanders [Sat, 1 Nov 2014 19:17:10 +0000 (19:17 +0000)]
[mips] Move all ByVal handling into CCState and tablegen-erated code. NFC.
Summary:
CCState already contains a byval implementation that is very similar to the
Mips custom code. This patch merges the custom code into the existing
common code and tablegen-erated code.
Reviewers: vmedic
Reviewed By: vmedic
Subscribers: rnk, llvm-commits
Differential Revision: http://reviews.llvm.org/D5977
llvm-svn: 221059
Daniel Sanders [Sat, 1 Nov 2014 18:53:01 +0000 (18:53 +0000)]
[mips] Fix unused variable warning introduced in r221056
llvm-svn: 221058
Daniel Sanders [Sat, 1 Nov 2014 18:44:56 +0000 (18:44 +0000)]
[mips] Remove ByValArgInfo::Address in favour of CCValAssign::getMemLocOffset(). NFC.
Summary: ByValArgInfo is practically the same as CCState::ByValInfo now.
Reviewers: vmedic
Reviewed By: vmedic
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D5976
llvm-svn: 221057
Daniel Sanders [Sat, 1 Nov 2014 18:38:03 +0000 (18:38 +0000)]
[mips] Move F128 argument handling into MipsCCState as we did for returns. NFC.
Summary:
There are a couple more changes to make before analyzeFormalArguments can
be merged into the standard AnalyzeFormalArguments. I've had to temporarily
poke a couple holes in MipsCCState's encapsulation to save having to make
all the required changes for this merge all at once*. These will be removed
shortly.
* We must merge our ByVal argument handling with the implementation in CCState.
This will be done over the next three patches, then the fourth will merge
analyzeFormalArguments with AnalyzeFormalArguments.
Depends on D5967
Reviewers: vmedic
Reviewed By: vmedic
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D5969
llvm-svn: 221056
David Blaikie [Sat, 1 Nov 2014 18:18:07 +0000 (18:18 +0000)]
Sink DwarfUnit::Skeleton down into DwarfCompileUnit
Type units no longer have skeletons and it's misleading to be able to
query for a type unit's skeleton (it might incorrectly lead one to
conclude that if a unit doesn't have a skeleton it's not in a .dwo
file... ).
llvm-svn: 221055
Daniel Sanders [Sat, 1 Nov 2014 18:13:52 +0000 (18:13 +0000)]
[mips] Remove MipsCC::CCInfo. NFC.
Summary:
It's now passed in as an argument to functions that need it. Eventually
this argument will be replaced by the 'this' pointer for a MipsCCState
object.
Depends on D5966
Reviewers: vmedic
Reviewed By: vmedic
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D5967
llvm-svn: 221054
Daniel Sanders [Sat, 1 Nov 2014 17:44:51 +0000 (17:44 +0000)]
[mips] Removed MipsCC::fixedArgFn(). NFC
Summary:
There is one remaining trace of it in MipsCC::analyzeCallOperands() where
Mips16 might override the calling convention. This will moved into
tablegen-erated code later.
Depends on D5965
Reviewers: vmedic
Reviewed By: vmedic
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D5966
llvm-svn: 221053
Daniel Sanders [Sat, 1 Nov 2014 17:38:22 +0000 (17:38 +0000)]
[tablegen] Add CustomCallingConv and use it to tablegen-erate the outermost parts of the Mips O32 implementation
Summary:
CustomCallingConv is simply a CallingConv that tablegen should not generate the
implementation for. It allows regular CallingConv's to delegate to these custom
functions. This is (currently) necessary for Mips and we cannot use CCCustom
without having to adapt to the different API that CCCustom uses.
This brings us a bit closer to being able to remove
MipsCC::analyzeCallOperands and MipsCC::analyzeFormalArguments in favour of
the common implementation.
No functional change to the targets.
Depends on D3341
Reviewers: vmedic
Reviewed By: vmedic
Subscribers: vmedic, llvm-commits
Differential Revision: http://reviews.llvm.org/D5965
llvm-svn: 221052
David Blaikie [Sat, 1 Nov 2014 17:21:26 +0000 (17:21 +0000)]
Sink DwarfDebug::AbstractSPDies down into DwarfFile
This is the first big step to allowing gmlt-like inline scope
information in the skeleton CU. While this commit doesn't change the
functionality, it's only a small step to call
"constructAbstractSubprogramDIE" on both the InfoHolder and the
SkeletonHolder (when in use) and that will at least create the abstract
SP dies in that case, though still not creating the other subprograms.
llvm-svn: 221051
Rafael Espindola [Sat, 1 Nov 2014 16:46:18 +0000 (16:46 +0000)]
Remove redundant calls to isMaterializable.
This removes calls to isMaterializable in the following cases:
* It was redundant with a call to isDeclaration now that isDeclaration returns
the correct answer for materializable functions.
* It was followed by a call to Materialize. Just call Materialize and check EC.
llvm-svn: 221050
Daniel Sanders [Sat, 1 Nov 2014 16:08:03 +0000 (16:08 +0000)]
Revert r221048 - Test commit
It seems I can't commit unless $DBUS_SESSION_BUS_ADDRESS is set correctly and
it is not set for ssh sessions.
llvm-svn: 221049
Daniel Sanders [Sat, 1 Nov 2014 16:00:40 +0000 (16:00 +0000)]
Test commit
Added some whitespace to debug some authentication issues I'm having.
llvm-svn: 221048
Daniel Sanders [Sat, 1 Nov 2014 15:52:31 +0000 (15:52 +0000)]
[JIT] Fix some more missing endian conversions in RuntimeDyld
Summary: This fixes MachO_i386_eh_frame.s on a big-endian Mips host.
Reviewers: lhames
Reviewed By: lhames
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D6019
llvm-svn: 221047
NAKAMURA Takumi [Sat, 1 Nov 2014 11:46:04 +0000 (11:46 +0000)]
[CMake] llvm-profdata requires Core.
llvm-svn: 221046
David Majnemer [Sat, 1 Nov 2014 09:09:51 +0000 (09:09 +0000)]
InstCombine: Combine (X+cst) < 0 --> X < -cst
This can happen pretty often in code that looks like:
int foo = bar - 1;
if (foo < 0)
do stuff
In this case, bar < 1 is an equivalent condition.
This transform requires that the add instruction be annotated with nsw.
llvm-svn: 221045
David Majnemer [Sat, 1 Nov 2014 07:57:14 +0000 (07:57 +0000)]
IR: Restore the old behavior of getDISubprogram
getDISubprogram was mistakenly thought to contain a bug: we thought we
might need to try harder if we found a DebugLoc we didn't find.
llvm-svn: 221044
David Majnemer [Sat, 1 Nov 2014 07:37:17 +0000 (07:37 +0000)]
CodeGen: Declutter the emitVirtualObjectDelete interface
No functionality change intended.
llvm-svn: 221043
David Majnemer [Sat, 1 Nov 2014 05:42:23 +0000 (05:42 +0000)]
CodeGen: Virtual dtor thunks shouldn't have this marked as 'returned'
The ARM ABI virtual destructor thunks cannot be marked as 'returned'
because they return undef.
llvm-svn: 221042
Adrian Prantl [Sat, 1 Nov 2014 03:19:45 +0000 (03:19 +0000)]
Revert "Temporarily revert r220777 to sort out build bot breakage."
This reverts commit r221028. Later commits depend on this and
reverting just this one causes even more bots to fail.
llvm-svn: 221041
NAKAMURA Takumi [Sat, 1 Nov 2014 01:36:14 +0000 (01:36 +0000)]
Revert r220779, "[AVX512] Removed special case for cmp instructions in getVectorMaskingNode. Now cmp intrinsics lower as other intrinsics through VSELECT, and then VSELECT tranforms to AND in PerformSELECTCombine."
Since r221028 (reverting r220777), this caused failures.
llvm-svn: 221040
NAKAMURA Takumi [Sat, 1 Nov 2014 01:32:27 +0000 (01:32 +0000)]
clang/lib/CodeGen/TargetInfo.cpp: Fix a couple of warnings. [-Winconsistent-missing-override]
llvm-svn: 221039
Johannes Doerfert [Sat, 1 Nov 2014 01:30:11 +0000 (01:30 +0000)]
[FIX] Move the statistic code to fix the build.
llvm-svn: 221038
David Blaikie [Sat, 1 Nov 2014 01:15:26 +0000 (01:15 +0000)]
Remove unused function
llvm-svn: 221037
David Blaikie [Sat, 1 Nov 2014 01:15:24 +0000 (01:15 +0000)]
And... fix the build some more.
llvm-svn: 221036
Johannes Doerfert [Sat, 1 Nov 2014 01:14:56 +0000 (01:14 +0000)]
Remove the LoopBounds from the TempScop class.
We will use ScalarEvolution in the ScopInfo.cpp to get the loop trip
count, not cache it in the TempScop object.
Differential Revision: http://reviews.llvm.org/D6070
llvm-svn: 221035
David Blaikie [Sat, 1 Nov 2014 01:11:19 +0000 (01:11 +0000)]
Just iterate the DwarfCompileUnits rather than trying to filter them out of the list of all units.
llvm-svn: 221034
David Blaikie [Sat, 1 Nov 2014 01:03:39 +0000 (01:03 +0000)]
Add '*' to auto variable that is a pointer, as per the coding conventions.
llvm-svn: 221033
Diego Novillo [Sat, 1 Nov 2014 00:56:55 +0000 (00:56 +0000)]
Add show and merge tools for sample PGO profiles.
Summary:
This patch extends the 'show' and 'merge' commands in llvm-profdata to handle
sample PGO formats. Using the 'merge' command it is now possible to convert
one sample PGO format to another.
The only format that is currently not working is 'gcc'. I still need to
implement support for it in lib/ProfileData.
The changes in the sample profile support classes are needed for the
merge operation.
Reviewers: bogner
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D6065
llvm-svn: 221032
David Blaikie [Sat, 1 Nov 2014 00:50:34 +0000 (00:50 +0000)]
Add DwarfCompileUnit::getSkeleton that returns DwarfCompileUnit* to avoid having to cast from DwarfUnit* on every call.
llvm-svn: 221031
Richard Trieu [Sat, 1 Nov 2014 00:46:54 +0000 (00:46 +0000)]
Fix a bug where -Wuninitialized would skip arguments to a function call.
llvm-svn: 221030
Eric Fiselier [Sat, 1 Nov 2014 00:41:42 +0000 (00:41 +0000)]
Partial fix for building w/ libcxxrt on OSX. Patch from C Bergstrom.
llvm-svn: 221029
Adrian Prantl [Sat, 1 Nov 2014 00:26:59 +0000 (00:26 +0000)]
Temporarily revert r220777 to sort out build bot breakage.
"[x86] Simplify vector selection if condition value type matches vselect value type and true value is all ones or false value is all zeros."
llvm-svn: 221028
Duncan P. N. Exon Smith [Sat, 1 Nov 2014 00:26:42 +0000 (00:26 +0000)]
IR: MDNode => Value: Instruction::getAllMetadata()
Change `Instruction::getAllMetadata()` to modify a vector of `Value`
instead of `MDNode` and update call sites. This is part of PR21433.
llvm-svn: 221027
Johannes Doerfert [Sat, 1 Nov 2014 00:12:13 +0000 (00:12 +0000)]
Remove the MaxLoopDepth attribute from the TempScop class
Now MaxLoopDepth only lives in Scops not in TempScops anymore.
This is the first part of a series of changes to make TempScops
obsolete.
Differential Revision: http://reviews.llvm.org/D6069
llvm-svn: 221026
Eric Fiselier [Sat, 1 Nov 2014 00:11:25 +0000 (00:11 +0000)]
libcxxrt defines bad_array_new_length::what() so move that into a conditional compilation block
llvm-svn: 221025
Duncan P. N. Exon Smith [Sat, 1 Nov 2014 00:10:31 +0000 (00:10 +0000)]
IR: MDNode => Value: Instruction::getMetadata()
Change `Instruction::getMetadata()` to return `Value` as part of
PR21433.
Update most callers to use `Instruction::getMDNode()`, which wraps the
result in a `cast_or_null<MDNode>`.
llvm-svn: 221024
Duncan P. N. Exon Smith [Fri, 31 Oct 2014 23:58:04 +0000 (23:58 +0000)]
IR: MDNode => Value: Add Instruction::getMDNode()
Add `Instruction::getMDNode()` that casts to `MDNode` before changing
`Instruction::getMetadata()` to return `Value`. This avoids adding
`cast_or_null<MDNode>` boiler-plate throughout the code.
Part of PR21433.
llvm-svn: 221023
Sean Callanan [Fri, 31 Oct 2014 23:55:36 +0000 (23:55 +0000)]
Complete the superclass type when completing an
Objective-C class type.
llvm-svn: 221022
Reid Kleckner [Fri, 31 Oct 2014 23:39:10 +0000 (23:39 +0000)]
Revert "R600: Add missing file to CMakeLists.txt"
This reverts commit r220998.
It should've been reverted with the other change.
llvm-svn: 221021
Reid Kleckner [Fri, 31 Oct 2014 23:35:26 +0000 (23:35 +0000)]
Revert "R600: Make sure to inline all internal functions"
This reverts commit r220996.
It introduced layering violations causing link errors in many
configurations.
llvm-svn: 221020
Reid Kleckner [Fri, 31 Oct 2014 23:33:56 +0000 (23:33 +0000)]
Silence a warning from MSVC "14" by making an enum unsigned
It says there is a narrowing conversion when we assign it to an unsigned
3 bit bitfield.
Also, use unsigned instead of size_t for the Size field of the struct in
question. Otherwise they won't run together in MSVC or clang-cl.
llvm-svn: 221019
Shawn Best [Fri, 31 Oct 2014 23:20:13 +0000 (23:20 +0000)]
TOT broken by R220956 - Differential Revision: reviews/llvm.org/D6066
llvm-svn: 221018
Reid Kleckner [Fri, 31 Oct 2014 23:19:46 +0000 (23:19 +0000)]
Work around bugs in MSVC "14" CTP 3's conversion logic
It appears to ignore or find ambiguous MachineInstrBuilder's conversion
operators that allow conversion to MachineInstr* and
MachineBasicBlock::bundle_iterator.
As a workaround, add an explicit way to get the MachineInstr.
llvm-svn: 221017
Johannes Doerfert [Fri, 31 Oct 2014 23:16:02 +0000 (23:16 +0000)]
[Refactor][NFC] Remove unused argument.
llvm-svn: 221016
Johannes Doerfert [Fri, 31 Oct 2014 23:13:39 +0000 (23:13 +0000)]
[Refactor][NFC] Map basic blocks to SCoP statements.
This will simplify the construction of domains and the modeling of
PHI's.
llvm-svn: 221015
Rafael Espindola [Fri, 31 Oct 2014 23:10:07 +0000 (23:10 +0000)]
Refactor duplicated code in liking GlobalValues.
There is quiet a bit of logic that is common to any GlobalValue but was
duplicated for Functions, GlobalVariables and GlobalAliases.
While at it, merge visibility even when comdats are used, fixing pr21415.
llvm-svn: 221014
Reid Kleckner [Fri, 31 Oct 2014 23:02:40 +0000 (23:02 +0000)]
Define LLVM_NOEXCEPT with MSVC 14 CTP 3 or newer
We have to use _MSC_FULL_VER here as CTP 2 and earlier didn't define
noexcept to my knowledge.
Fixes build error in lib/Support/Error.cpp when inheriting from
std::error_category, which has a noexcept virtual method.
llvm-svn: 221013
Reid Kleckner [Fri, 31 Oct 2014 22:55:57 +0000 (22:55 +0000)]
Suppress MSVC's equivalent of -Wshadow warnings
IMO we need to clean up some of these, but the member variable one
(C4458) has false positives on static methods. It is currently firing
on Twine, which has a static method like:
struct Twine {
uintptr_t LHS, RHS;
static void staticMethod() {
// warning C4458: declaration of 'LHS' hides class member
uintptr_t LHS;
...
}
};
We should fix up clang's -Wshadow and clean it up, and then we can
re-enable some of these MSVC warnings.
llvm-svn: 221012
Stephane Sezer [Fri, 31 Oct 2014 22:37:24 +0000 (22:37 +0000)]
Always transmit SIGPROF back to the inferior.
Summary:
SIGPROF is used for profiling processes (with google-perftools for
instance), which results in the inferior receiving a SIGPROF from the
kernel every few milliseconds. Instead of stopping the debugging session
and notifying the user of this, we should just pass the signal and keep
running.
This follows the behavior we have in UnixSignals.cpp.
Test Plan: Run LLDB on linux with a binary using google-perftools, see that execution gets interrupted all the time because we receive SIGPROF. Apply the patch, everything works fine.
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D5953
llvm-svn: 221011
David Blaikie [Fri, 31 Oct 2014 22:30:30 +0000 (22:30 +0000)]
Sink some of DwarfDebug::collectDeadVariables down into DwarfCompileUnit.
llvm-svn: 221010
Michael Zolotukhin [Fri, 31 Oct 2014 22:28:03 +0000 (22:28 +0000)]
Correctly update dom-tree after loop vectorizer.
llvm-svn: 221009
Kaelyn Takata [Fri, 31 Oct 2014 22:25:09 +0000 (22:25 +0000)]
Fix an accidental self-assignment using std::move in r220723.
llvm-svn: 221008
Tim Northover [Fri, 31 Oct 2014 22:12:20 +0000 (22:12 +0000)]
[mach-o] explicitly cast little_n uses to ints to silence MSVC
Hopefully this'll fix the build failure in the bot.
llvm-svn: 221007
Reid Kleckner [Fri, 31 Oct 2014 22:00:51 +0000 (22:00 +0000)]
Implement IRGen for the x86 vectorcall convention
The most complex aspect of the convention is the handling of homogeneous
vector and floating point aggregates. Reuse the homogeneous aggregate
classification code that we use on PPC64 and ARM for this.
This convention also has a C mangling, and we apparently implement that
in both Clang and LLVM.
Reviewed By: majnemer
Differential Revision: http://reviews.llvm.org/D6063
llvm-svn: 221006
David Blaikie [Fri, 31 Oct 2014 21:57:02 +0000 (21:57 +0000)]
Sink most of DwarfDebug::constructAbstractSubprogramScopeDIE into DwarfCompileUnit
llvm-svn: 221005
Tom Stellard [Fri, 31 Oct 2014 21:52:08 +0000 (21:52 +0000)]
R600: Add IPO to the list of required libraries
llvm-svn: 221004
Lang Hames [Fri, 31 Oct 2014 21:37:49 +0000 (21:37 +0000)]
[Object] Modify OwningBinary's interface to separate inspection from ownership.
The getBinary and getBuffer method now return ordinary pointers of appropriate
const-ness. Ownership is transferred by calling takeBinary(), which returns a
pair of the Binary and a MemoryBuffer.
llvm-svn: 221003
Jason Molenda [Fri, 31 Oct 2014 21:30:59 +0000 (21:30 +0000)]
SBAddress currently *may* have an Address object or it may not.
If it has an Address object, it is assumed to be Valid.
Change SBAddress to always have an Address object and check
whether it is valid or not in those case.
This is fixing a subtle problem where we ended up with
a SBAddress with an Address of LLDB_INVALID_ADDRESS could
run through a copy constructor and turn into an SBAddress
with no Address object being backed (because it wasn't
distinguishing between invalid-Address versus no-Address.)
The cost of an Address object is not high and this will be
an easy mistake for someone else to make; I'm fixing
SBAddress so it doesn't come up again.
<rdar://problem/
18069407>
llvm-svn: 221002
Fariborz Jahanian [Fri, 31 Oct 2014 21:19:45 +0000 (21:19 +0000)]
Objective-C SDK modernization tool. Use its own option
,-objcmt-migrate-property-dot-syntax, when migarting to use
property-dot syntax in place of messaging expression.
rdar://
18839124
llvm-svn: 221001
Richard Trieu [Fri, 31 Oct 2014 21:10:22 +0000 (21:10 +0000)]
Have -Wuninitialized catch uninitalized use in overloaded operator arguments.
llvm-svn: 221000
Anton Yartsev [Fri, 31 Oct 2014 20:57:57 +0000 (20:57 +0000)]
[analyzer] Helpful hints for Windows users of scan-build.
llvm-svn: 220999
Tom Stellard [Fri, 31 Oct 2014 20:56:36 +0000 (20:56 +0000)]
R600: Add missing file to CMakeLists.txt
llvm-svn: 220998
Tom Stellard [Fri, 31 Oct 2014 20:52:04 +0000 (20:52 +0000)]
R600: Don't promote allocas when one of the users is a ptrtoint instruction
We need to figure out how to track ptrtoint values all the
way until result is converted back to a pointer in order
to correctly rewrite the pointer type.
llvm-svn: 220997
Tom Stellard [Fri, 31 Oct 2014 20:52:02 +0000 (20:52 +0000)]
R600: Make sure to inline all internal functions
Function calls aren't supported yet.
llvm-svn: 220996
Duncan P. N. Exon Smith [Fri, 31 Oct 2014 20:28:04 +0000 (20:28 +0000)]
IR: Instruction::setMetadata() should use cast_or_null
Not sure why this assertion didn't fire locally [1], but in r220994
`Instruction::setMetadata()` should be using `cast_or_null`.
[1]: http://lab.llvm.org:8011/builders/llvm-hexagon-elf/builds/12327
llvm-svn: 220995
Duncan P. N. Exon Smith [Fri, 31 Oct 2014 20:13:11 +0000 (20:13 +0000)]
IR: MDNode => Value: Instruction::setMetadata()
Change `Instruction::setMetadata()` API to accept `Value` instead of
`MDNode`. Part of PR21433.
llvm-svn: 220994
David Majnemer [Fri, 31 Oct 2014 20:09:12 +0000 (20:09 +0000)]
MS ABI: Properly call global delete when invoking virtual destructors
Summary:
The Itanium ABI approach of using offset-to-top isn't possible with the
MS ABI, it doesn't have that kind of information lying around.
Instead, we do the following:
- Call the virtual deleting destructor with the "don't delete the object
flag" set. The virtual deleting destructor will return a pointer to
'this' adjusted to the most derived class.
- Call the global delete using the adjusted 'this' pointer.
Reviewers: rnk
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D5996
llvm-svn: 220993
Fariborz Jahanian [Fri, 31 Oct 2014 19:56:27 +0000 (19:56 +0000)]
C++-11 [qoi]. Do not warn on missing 'verride' on use of
macros in user code when macros themselves are defined
in a system header. rdar://
18295240
llvm-svn: 220992
Kostya Serebryany [Fri, 31 Oct 2014 19:49:46 +0000 (19:49 +0000)]
[asan] increase the initial buffer size in caller-callee dumper
llvm-svn: 220991
Bill Schmidt [Fri, 31 Oct 2014 19:19:24 +0000 (19:19 +0000)]
[PowerPC] Initial VSX intrinsic support, with min/max for vector double
Now that we have initial support for VSX, we can begin adding
intrinsics for programmer access to VSX instructions. This patch
performs the necessary enablement in the front end, and tests it by
implementing intrinsics for minimum and maximum using the vector
double data type.
The main change in the front end is to no longer disallow "vector" and
"double" in the same declaration (lib/Sema/DeclSpec.cpp), but "vector"
and "long double" must still be disallowed. The new intrinsics are
accessed via vec_max and vec_min with changes in
lib/Headers/altivec.h. Note that for v4f32, we already access
corresponding VMX builtins, but with VSX enabled we should use the
forms that allow all 64 vector registers.
The new built-ins are defined in include/clang/Basic/BuiltinsPPC.def.
I've added a new test in test/CodeGen/builtins-ppc-vsx.c that is
similar to, but much smaller than, builtins-ppc-altivec.c. This
allows us to test VSX IR generation without duplicating CHECK lines
for the existing bazillion Altivec tests.
Since vector double is now legal when VSX is available, I've modified
the error message, and changed where we test for it and for vector
long double, since the target machine isn't visible in the old place.
This serendipitously removed a not-pertinent warning about 'long'
being deprecated when used with 'vector', when "vector long double" is
encountered and we just want to issue an error. The existing tests
test/Parser/altivec.c and test/Parser/cxx-altivec.cpp have been
updated accordingly, and I've added test/Parser/vsx.c to verify that
"vector double" is now legitimate with VSX enabled.
There is a companion patch for LLVM.
llvm-svn: 220989
Bill Schmidt [Fri, 31 Oct 2014 19:19:07 +0000 (19:19 +0000)]
[PowerPC] Initial VSX intrinsic support, with min/max for vector double
Now that we have initial support for VSX, we can begin adding
intrinsics for programmer access to VSX instructions. This patch adds
basic support for VSX intrinsics in general, and tests it by
implementing intrinsics for minimum and maximum for the vector double
data type.
The LLVM portion of this is quite straightforward. There is a
companion patch for Clang.
llvm-svn: 220988
Chad Rosier [Fri, 31 Oct 2014 19:02:38 +0000 (19:02 +0000)]
[AArch64] Check Dest Register Liveness in CondOpt pass.
Our internal test reveals such case should not be transformed:
cmp x17, #3
b.lt .LBB10_15
...
subs x12, x12, #1
b.gt .LBB10_1
where x12 is a liveout, becomes:
cmp x17, #2
b.le .LBB10_15
...
subs x12, x12, #2
b.ge .LBB10_1
Unable to provide test case as it's difficult to reproduce on community branch.
http://reviews.llvm.org/D6048
Patch by Zhaoshi Zheng <zhaoshiz@codeaurora.org>!
llvm-svn: 220987
Kostya Serebryany [Fri, 31 Oct 2014 19:01:02 +0000 (19:01 +0000)]
ignore -mconstructor-aliases when adding field paddings for asan
Summary:
When we are adding field paddings for asan even an empty dtor has to remain in the code,
so we ignore -mconstructor-aliases if the paddings are going to be added.
Test Plan: added a test
Reviewers: rsmith, rnk, rafael
Reviewed By: rafael
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D6038
llvm-svn: 220986
Kostya Serebryany [Fri, 31 Oct 2014 18:38:23 +0000 (18:38 +0000)]
[asan] do not treat inline asm calls as indirect calls
llvm-svn: 220985