platform/upstream/llvm.git
11 years agoMissed a place where we have to pass the source location twice to FunctionDecl::Create.
Jim Ingham [Fri, 28 Jun 2013 22:21:22 +0000 (22:21 +0000)]
Missed a place where we have to pass the source location twice to FunctionDecl::Create.

llvm-svn: 185233

11 years agoReplace UNIXy path with os-independent one in DebugIR unit test
Daniel Malea [Fri, 28 Jun 2013 22:17:57 +0000 (22:17 +0000)]
Replace UNIXy path with os-independent one in DebugIR unit test
- should resolve windows buildbot failure

llvm-svn: 185232

11 years agoRemove dead code.
Eli Friedman [Fri, 28 Jun 2013 22:13:27 +0000 (22:13 +0000)]
Remove dead code.

llvm-svn: 185231

11 years agoSLP Vectorizer: Add support for trees with external users.
Nadav Rotem [Fri, 28 Jun 2013 22:07:09 +0000 (22:07 +0000)]
SLP Vectorizer:  Add support for trees with external users.

To support this we have to insert 'extractelement' instructions to pick the right lane.
We had this functionality before but I removed it when we moved to the multi-block design because it was too complicated.

llvm-svn: 185230

11 years agoPR7927, PR16247: Reimplement handling of matching extern "C" declarations
Richard Smith [Fri, 28 Jun 2013 22:03:51 +0000 (22:03 +0000)]
PR7927, PR16247: Reimplement handling of matching extern "C" declarations
across scopes.

When we declare an extern "C" name that is not a redeclaration of an entity in
the same scope, check whether it redeclares some extern "C" entity from another
scope, and if not, check whether it conflicts with a (non-extern-"C") entity in
the translation unit.

When we declare a name in the translation unit that is not a redeclaration,
check whether it conflicts with any extern "C" entities (possibly from other
scopes).

llvm-svn: 185229

11 years agoFix broken asserts that never fire.
Richard Trieu [Fri, 28 Jun 2013 21:54:25 +0000 (21:54 +0000)]
Fix broken asserts that never fire.

Change assert("text") to assert(0 && "text").  The first case is a const char *
to bool conversion, which always evaluates to true, never triggering the
assert.  The second case will always trigger the assert.

llvm-svn: 185227

11 years agoFix a bad overflow check pointed out by Ben.
Jakob Stoklund Olesen [Fri, 28 Jun 2013 21:51:18 +0000 (21:51 +0000)]
Fix a bad overflow check pointed out by Ben.

llvm-svn: 185226

11 years agoFix Windows/Darwin build error in DebugIR unit tests
Daniel Malea [Fri, 28 Jun 2013 21:49:53 +0000 (21:49 +0000)]
Fix Windows/Darwin build error in DebugIR unit tests
- mistakenly used get_current_dir() linux function
- replaced with getcwd/_getcwd as appropriate for current platform

llvm-svn: 185225

11 years agoHitherto the IRForTarget infrastructure has mainly
Sean Callanan [Fri, 28 Jun 2013 21:44:15 +0000 (21:44 +0000)]
Hitherto the IRForTarget infrastructure has mainly
been suitable for preparing a single IR function
for operation in the target.  However, using blocks
and lambdas creates other IR functions that also
need to be processed.

I have audited IRForTarget to make it process
multiple functions.  Where IRForTarget would add
new instructions at the beginning of the main
expression function, it now adds them on-demand
in the function where they are needed.  This is
enabled by a system of FunctionValueCaches, which
invoke a lambda to create or derive the values as
needed, or report the result of that lambda if it
has already been called for the given function.

<rdar://problem/14180236>

llvm-svn: 185224

11 years agoMake cout a little more thread-safe. This fixes http://llvm.org/bugs/show_bug.cgi...
Howard Hinnant [Fri, 28 Jun 2013 21:40:28 +0000 (21:40 +0000)]
Make cout a little more thread-safe.  This fixes llvm.org/bugs/show_bug.cgi?id=12158

llvm-svn: 185222

11 years agoRevising the MCJIT ObjectCache interface to allow subclasses to avoid retaining refer...
Andrew Kaylor [Fri, 28 Jun 2013 21:40:16 +0000 (21:40 +0000)]
Revising the MCJIT ObjectCache interface to allow subclasses to avoid retaining references to returned objects

llvm-svn: 185221

11 years agoRemove unused member
David Blaikie [Fri, 28 Jun 2013 21:28:01 +0000 (21:28 +0000)]
Remove unused member

llvm-svn: 185219

11 years agoEliminate an assortment of undefined behavior.
Jakob Stoklund Olesen [Fri, 28 Jun 2013 21:10:25 +0000 (21:10 +0000)]
Eliminate an assortment of undefined behavior.

Hopefully, this fixes the PPC64 buildbots.

llvm-svn: 185218

11 years agoDefault parameters are evil and should not be used. Case and point this checkin that...
Greg Clayton [Fri, 28 Jun 2013 21:08:47 +0000 (21:08 +0000)]
Default parameters are evil and should not be used. Case and point this checkin that fixes implicit conversions that were happening.

llvm-svn: 185217

11 years agoFix error recovery with in-class initializer.
Eli Friedman [Fri, 28 Jun 2013 21:07:41 +0000 (21:07 +0000)]
Fix error recovery with in-class initializer.

Previously, for a field with an invalid in-class initializer, we
would create a CXXDefaultInitExpr referring to a null Expr*.
This is not a good idea.

llvm-svn: 185216

11 years agoFix line endings.
Eli Friedman [Fri, 28 Jun 2013 20:48:34 +0000 (20:48 +0000)]
Fix line endings.

llvm-svn: 185215

11 years agoLoopVectorizer: Refactor the code that checks if it is safe to predicate blocks.
Nadav Rotem [Fri, 28 Jun 2013 20:46:27 +0000 (20:46 +0000)]
LoopVectorizer:  Refactor the code that checks if it is safe to predicate blocks.
In this code we keep track of pointers that we are allowed to read from, if they are accessed by non-predicated blocks.
We use this list to allow vectorization of conditional loads in predicated blocks because we know that these addresses don't segfault.

llvm-svn: 185214

11 years ago[ms-cxxabi] Move CodeGenVTables::needsVTTParameter to ItaniumCXXABI.
Peter Collingbourne [Fri, 28 Jun 2013 20:45:28 +0000 (20:45 +0000)]
[ms-cxxabi] Move CodeGenVTables::needsVTTParameter to ItaniumCXXABI.

This function only makes sense there.  Eventually it should no longer
be part of the CGCXXABI interface, as it is an Itanium-specific detail.

Differential Revision: http://llvm-reviews.chandlerc.com/D821

llvm-svn: 185213

11 years agoAdding tests for DebugIR pass
Daniel Malea [Fri, 28 Jun 2013 20:37:20 +0000 (20:37 +0000)]
Adding tests for DebugIR pass
- lit tests verify that each line of input LLVM IR gets a !dbg node and a
  corresponding entry of metadata that contains the line number
- unit tests verify that DebugIR works as advertised in the interface
- refactored some useful IR generation functionality from the MCJIT unit tests
  so it can be reused

llvm-svn: 185212

11 years agoProvide missing '{' in parsing extended quoted characters. This fixes http://llvm...
Howard Hinnant [Fri, 28 Jun 2013 20:31:05 +0000 (20:31 +0000)]
Provide missing '{' in parsing extended quoted characters.  This fixes llvm.org/bugs/show_bug.cgi?id=16135

llvm-svn: 185211

11 years agoFileSpec destructor doesn't need to be virtual.
Greg Clayton [Fri, 28 Jun 2013 20:26:06 +0000 (20:26 +0000)]
FileSpec destructor doesn't need to be virtual.

llvm-svn: 185210

11 years agoR600/SI: Add processor types for each CIK variant
Tom Stellard [Fri, 28 Jun 2013 20:23:29 +0000 (20:23 +0000)]
R600/SI: Add processor types for each CIK variant

Patch By: Alex Deucher

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
llvm-svn: 185209

11 years agoArchSpec doesn't need a virtual destructor.
Greg Clayton [Fri, 28 Jun 2013 20:20:28 +0000 (20:20 +0000)]
ArchSpec doesn't need a virtual destructor.

llvm-svn: 185208

11 years agoPathMappingList doesn't need a virtual destructor.
Greg Clayton [Fri, 28 Jun 2013 20:19:27 +0000 (20:19 +0000)]
PathMappingList doesn't need a virtual destructor.

llvm-svn: 185207

11 years agoFix CodeGen/PowerPC/stack-protector.ll on OpenBSD
Hal Finkel [Fri, 28 Jun 2013 20:18:14 +0000 (20:18 +0000)]
Fix CodeGen/PowerPC/stack-protector.ll on OpenBSD

On OpenBSD, the stack-smash protection transform uses "__guard_local"
and "__stack_smash_handler" instead of "__stack_chk_guard" and
"__stack_chk_fail".  However, CodeGen/PowerPC/stack-protector.ll
doesn't specify a target OS, so on OpenBSD it fails.

Add -mtriple=ppc32-unknown-linux to make the test host-OS agnostic. While
there, convert to FileCheck.

Patch by Matthew Dempsky.

llvm-svn: 185206

11 years ago[PECOFF][Writer] Fix wrong section header.
Rui Ueyama [Fri, 28 Jun 2013 20:10:36 +0000 (20:10 +0000)]
[PECOFF][Writer] Fix wrong section header.

llvm-svn: 185205

11 years agoDebugInfo: PR14728: TLS support
David Blaikie [Fri, 28 Jun 2013 20:05:11 +0000 (20:05 +0000)]
DebugInfo: PR14728: TLS support

Based on GCC's output for TLS variables (OP_constNu, x@dtpoff,
OP_lo_user), this implements debug info support for TLS in ELF. Verified
that this output is correct/sufficient on Linux (using gold - if you're
using binutils-ld, you'll need something with the fix for
http://sourceware.org/bugzilla/show_bug.cgi?id=15685 in it).

Support on non-ELF is sort of "arbitrary" at the moment - if Apple folks
want to discuss (or just go ahead & implement) how this should work in
MachO, etc, I'm open.

llvm-svn: 185203

11 years agoDebugInfo: Pass MCSymbolRefExprs for labels instead of MCSymbols
David Blaikie [Fri, 28 Jun 2013 20:05:04 +0000 (20:05 +0000)]
DebugInfo: Pass MCSymbolRefExprs for labels instead of MCSymbols

This is a precursor to adding debug info support for TLS which requires
non-default relocations applied to TLS symbols.

llvm-svn: 185202

11 years agoFix a PPC rlwimi instruction-selection bug
Hal Finkel [Fri, 28 Jun 2013 20:00:07 +0000 (20:00 +0000)]
Fix a PPC rlwimi instruction-selection bug

Under certain (evidently rare) circumstances, this code used to convert OR(a,
AND(x, y)) into OR(a, x). This was incorrect.

While there, I've added a comment to the code immediately above.

llvm-svn: 185201

11 years ago[PECOFF][Writer] Remove duplicated code by moving it to parent class.
Rui Ueyama [Fri, 28 Jun 2013 19:59:54 +0000 (19:59 +0000)]
[PECOFF][Writer] Remove duplicated code by moving it to parent class.

llvm-svn: 185200

11 years ago+ "For Windows Users" section
Anton Yartsev [Fri, 28 Jun 2013 19:21:11 +0000 (19:21 +0000)]
+ "For Windows Users" section
+ description for --use-analyzer option
+ managed size of columns of the 'options' table

llvm-svn: 185199

11 years agoRemove needless include (unistd.h) in DebugIR pass
Daniel Malea [Fri, 28 Jun 2013 19:19:44 +0000 (19:19 +0000)]
Remove needless include (unistd.h) in DebugIR pass
- should unbreak Windows builds

llvm-svn: 185198

11 years agoAdd flag to lli to enable debugging of IR when used with MCJIT.
Daniel Malea [Fri, 28 Jun 2013 19:11:40 +0000 (19:11 +0000)]
Add flag to lli to enable debugging of IR when used with MCJIT.
- warn users when -debug-ir is used with old JIT engine (only partial debug
  info is available)

For example, to debug an IR file with GDB (that supports JIT registration), do:

$ gdb --args lli -use-mcjit -debug-ir testcase.ll
(gdb) break main
(gdb) run
<Process continues to lli main>
(gdb) continue
<Process continues to testcase.ll main()
(gdb) step
<Now stepping through the LLVM IR in testcase.ll>

llvm-svn: 185197

11 years agoWilliam Fisher: A bug in __lookahead::exec causes /(?=^)b/ to match ab. When makes...
Howard Hinnant [Fri, 28 Jun 2013 19:11:23 +0000 (19:11 +0000)]
William Fisher:  A bug in __lookahead::exec causes /(?=^)b/ to match ab. When  makes a recursive call to , it passes true for the value of . This causes a beginning-of-line anchor (^) inside a lookahead assertion to match anywhere in the text.  This fixes llvm.org/bugs/show_bug.cgi?id=11118

llvm-svn: 185196

11 years ago[PECOFF][Writer] Define COFFBaseDefinedAtom as the base class of COFF defined atoms.
Rui Ueyama [Fri, 28 Jun 2013 19:08:57 +0000 (19:08 +0000)]
[PECOFF][Writer] Define COFFBaseDefinedAtom as the base class of COFF defined atoms.

In order to support linking against DLL, the linker needs to create defined
atoms for jump tables and etc. Because such atoms are not read from a file,
they lack some information such as an ordinal. With this patch, COFFDefinedAtom
is split into two classes; one is the base class of all COFF defined atoms, and
another is a concrete class for atoms read from file. More classes inheriting
COFFBaseDefinedAtom will be added for jump tables and etc.

llvm-svn: 185195

11 years agoAdd missing header for DebugIR
Daniel Malea [Fri, 28 Jun 2013 19:07:59 +0000 (19:07 +0000)]
Add missing header for DebugIR
- missed svn add...

llvm-svn: 185194

11 years agoRemove limitation on DebugIR that made it require existing debug metadata.
Daniel Malea [Fri, 28 Jun 2013 19:05:23 +0000 (19:05 +0000)]
Remove limitation on DebugIR that made it require existing debug metadata.
- Build debug metadata for 'bare' Modules using DIBuilder
- DebugIR can be constructed to generate an IR file (to be seen by a debugger)
  or not in cases where the user already has an IR file on disk.

llvm-svn: 185193

11 years agoBill Fisher: Fix for failing to throw an exception in regex when parsing an invalid...
Howard Hinnant [Fri, 28 Jun 2013 18:57:30 +0000 (18:57 +0000)]
Bill Fisher:  Fix for failing to throw an exception in regex when parsing an invalid escape sequence.  This fixes llvm.org/bugs/show_bug.cgi?id=16023

llvm-svn: 185192

11 years agoFix an off-by-one error. Also make the code a little more explicit in what it
Chad Rosier [Fri, 28 Jun 2013 18:57:01 +0000 (18:57 +0000)]
Fix an off-by-one error.  Also make the code a little more explicit in what it
is trying to do.

llvm-svn: 185191

11 years agoDebugInfo: Revise r185189 to avoid subtle 'unsigned += bool'
David Blaikie [Fri, 28 Jun 2013 18:55:13 +0000 (18:55 +0000)]
DebugInfo: Revise r185189 to avoid subtle 'unsigned += bool'

llvm-svn: 185190

11 years agoDebugInfo: Simplify the AddressPool representation
David Blaikie [Fri, 28 Jun 2013 18:47:19 +0000 (18:47 +0000)]
DebugInfo: Simplify the AddressPool representation

llvm-svn: 185189

11 years agoDebugInfo: constify the AddressPool MCSymbol pointers
David Blaikie [Fri, 28 Jun 2013 18:47:14 +0000 (18:47 +0000)]
DebugInfo: constify the AddressPool MCSymbol pointers

llvm-svn: 185188

11 years ago(no commit message)
Preston Briggs [Fri, 28 Jun 2013 18:44:48 +0000 (18:44 +0000)]
(no commit message)

llvm-svn: 185187

11 years agoAdd missing case to switch statement - DAGTypeLegalizer::ExpandIntegerResult
Lang Hames [Fri, 28 Jun 2013 18:36:42 +0000 (18:36 +0000)]
Add missing case to switch statement - DAGTypeLegalizer::ExpandIntegerResult
should expand ATOMIC_CMP_SWAP nodes the same way that it does for ATOMIC_SWAP.

Since ATOMIC_LOADs on some targets (e.g. older ARM variants) get legalized to
ATOMIC_CMP_SWAPs, the missing case had been causing i64 atomic loads to crash
during isel.

<rdar://problem/14074644>

llvm-svn: 185186

11 years agoStylistic cleanups, no functional change.
Jakob Stoklund Olesen [Fri, 28 Jun 2013 18:33:19 +0000 (18:33 +0000)]
Stylistic cleanups, no functional change.

- Use static functions instead of anonymous namespace.
- Appease the Doxygen lobby.
- Use 0-based induction variable.

llvm-svn: 185185

11 years agoAdd a division operator to BlockFrequency.
Jakob Stoklund Olesen [Fri, 28 Jun 2013 18:23:42 +0000 (18:23 +0000)]
Add a division operator to BlockFrequency.

Allow a BlockFrequency to be divided by a non-zero BranchProbability
with saturating arithmetic. This will be used to compute the frequency
of a loop header given the probability of leaving the loop.

Our long division algorithm already saturates on overflow, so that was a
freebie.

llvm-svn: 185184

11 years agoDimitry Andric: Add const to constexpr member functions in order to cope with new...
Howard Hinnant [Fri, 28 Jun 2013 18:09:35 +0000 (18:09 +0000)]
Dimitry Andric:  Add const to constexpr member functions in order to cope with new C++1y language rules.  This silences -Wconstexpr-not-const warnings.

llvm-svn: 185181

11 years agoRemove unused variables.
Eric Christopher [Fri, 28 Jun 2013 18:03:54 +0000 (18:03 +0000)]
Remove unused variables.

llvm-svn: 185180

11 years ago[NVPTX] Select -1 instead of 1 when anyextend'ing i1 types
Justin Holewinski [Fri, 28 Jun 2013 17:58:15 +0000 (17:58 +0000)]
[NVPTX] Select -1 instead of 1 when anyextend'ing i1 types

This makes it more consistent with the ZeroOrNegativeOneBooleanContent flag

llvm-svn: 185179

11 years ago[NVPTX] Add (1.0 / sqrt(x)) => rsqrt(x) generation when allowable by FP flags
Justin Holewinski [Fri, 28 Jun 2013 17:58:13 +0000 (17:58 +0000)]
[NVPTX] Add (1.0 / sqrt(x)) => rsqrt(x) generation when allowable by FP flags

llvm-svn: 185178

11 years ago[NVPTX] Calling conventions fix
Justin Holewinski [Fri, 28 Jun 2013 17:58:10 +0000 (17:58 +0000)]
[NVPTX] Calling conventions fix

Fix ABI handling for function
returning bool -- use st.param.b32 to return the value
and use ld.param.b32 in caller to load the return value.

llvm-svn: 185177

11 years ago[NVPTX] Add support for cttz/ctlz/ctpop
Justin Holewinski [Fri, 28 Jun 2013 17:58:07 +0000 (17:58 +0000)]
[NVPTX] Add support for cttz/ctlz/ctpop

llvm-svn: 185176

11 years ago[NVPTX] Clean up comparison/select/convert patterns and factor out PTX instructions...
Justin Holewinski [Fri, 28 Jun 2013 17:58:04 +0000 (17:58 +0000)]
[NVPTX] Clean up comparison/select/convert patterns and factor out PTX instructions from their patterns

Test case is no breakage

llvm-svn: 185175

11 years ago[NVPTX] Remove i8 register class. PTX support for i8 (.b8, .u8, .s8) is rather poor...
Justin Holewinski [Fri, 28 Jun 2013 17:57:59 +0000 (17:57 +0000)]
[NVPTX] Remove i8 register class.  PTX support for i8 (.b8, .u8, .s8) is rather poor and we're better off just ignoring it and letting LLVM expand all i8 ops out to i16.

llvm-svn: 185174

11 years ago[NVPTX] Add support for vectorized function return values
Justin Holewinski [Fri, 28 Jun 2013 17:57:55 +0000 (17:57 +0000)]
[NVPTX] Add support for vectorized function return values

llvm-svn: 185173

11 years ago[NVPTX] Clean up handling of formal arguments and enable generation of vector paramet...
Justin Holewinski [Fri, 28 Jun 2013 17:57:53 +0000 (17:57 +0000)]
[NVPTX] Clean up handling of formal arguments and enable generation of vector parameter loads

llvm-svn: 185172

11 years ago[NVPTX] Add infrastructure for vector loads/stores of parameters
Justin Holewinski [Fri, 28 Jun 2013 17:57:51 +0000 (17:57 +0000)]
[NVPTX] Add infrastructure for vector loads/stores of parameters

llvm-svn: 185171

11 years agoDon't check for "are there any loaded sections" before trying to resolve a breakpoint...
Jim Ingham [Fri, 28 Jun 2013 17:51:33 +0000 (17:51 +0000)]
Don't check for "are there any loaded sections" before trying to resolve a breakpoint site.  We've already got a process,
and any breakpoints with section relative addresses won't resolve their load addresses so they will error out at that point.

<rdar://problem/13900130>

llvm-svn: 185170

11 years agoBug 13662: Enable GPRPair for all i64 operands of inline asm on ARM
Weiming Zhao [Fri, 28 Jun 2013 17:26:02 +0000 (17:26 +0000)]
Bug 13662: Enable GPRPair for all i64 operands of inline asm on ARM

This patch assigns paired GPRs  for inline asm with
64-bit data on ARM. It's enabled for both ARM and Thumb to support modifiers
like %H, %Q, %R.

llvm-svn: 185169

11 years agoLoopVectorize: Pull dyn_cast into setDebugLocFromInst
Arnold Schwaighofer [Fri, 28 Jun 2013 17:14:48 +0000 (17:14 +0000)]
LoopVectorize: Pull dyn_cast into setDebugLocFromInst

llvm-svn: 185168

11 years agoImplement full support for non-pointer pointers in custom allocators for string....
Howard Hinnant [Fri, 28 Jun 2013 16:59:19 +0000 (16:59 +0000)]
Implement full support for non-pointer pointers in custom allocators for string.  This completes the custom pointer support for the entire library.

llvm-svn: 185167

11 years agoFix bugpoint execution/reference output file name
Hal Finkel [Fri, 28 Jun 2013 16:37:52 +0000 (16:37 +0000)]
Fix bugpoint execution/reference output file name

sys::fs::unique_file will now loop infinitely if provided with a file name
without '%' characters and the input file already exists. As a result, bugpoint
cannot use a fixed file name for the execution output (including the reference
output).

llvm-svn: 185166

11 years agoLoopVectorize: Use static function instead of DebugLocSetter class
Arnold Schwaighofer [Fri, 28 Jun 2013 16:26:54 +0000 (16:26 +0000)]
LoopVectorize: Use static function instead of DebugLocSetter class

I used the class to safely reset the state of the builder's debug location.  I
think I have caught all places where we need to set the debug location to a new
one. Therefore, we can replace the class by a function that just sets the debug
location.

llvm-svn: 185165

11 years agoUse the multiple argument form of path::append.
Benjamin Kramer [Fri, 28 Jun 2013 16:25:46 +0000 (16:25 +0000)]
Use the multiple argument form of path::append.

llvm-svn: 185164

11 years ago[ASan] Remove %symbolize from lit tests: we now use external symbolizer instead of...
Alexey Samsonov [Fri, 28 Jun 2013 15:52:44 +0000 (15:52 +0000)]
[ASan] Remove %symbolize from lit tests: we now use external symbolizer instead of python script

llvm-svn: 185163

11 years agoR600: Add local memory support via LDS
Tom Stellard [Fri, 28 Jun 2013 15:47:08 +0000 (15:47 +0000)]
R600: Add local memory support via LDS

Reviewed-by: Vincent Lejeune<vljn at ovi.com>
llvm-svn: 185162

11 years agoR600: Add support for GROUP_BARRIER instruction
Tom Stellard [Fri, 28 Jun 2013 15:46:59 +0000 (15:46 +0000)]
R600: Add support for GROUP_BARRIER instruction

Reviewed-by: Vincent Lejeune<vljn at ovi.com>
llvm-svn: 185161

11 years agoR600: Add ALUInst bit to tablegen definitions v2
Tom Stellard [Fri, 28 Jun 2013 15:46:53 +0000 (15:46 +0000)]
R600: Add ALUInst bit to tablegen definitions v2

v2:
  - Remove functions left over from a previous rebase.

Reviewed-by: Vincent Lejeune<vljn at ovi.com>
llvm-svn: 185160

11 years agoFix a trivial typo, add a FIXME to have more test coverage for VTableBuilder
Timur Iskhodzhanov [Fri, 28 Jun 2013 15:42:28 +0000 (15:42 +0000)]
Fix a trivial typo, add a FIXME to have more test coverage for VTableBuilder

llvm-svn: 185159

11 years agoARM: ensure fixed-point conversions have sane types
Tim Northover [Fri, 28 Jun 2013 15:29:25 +0000 (15:29 +0000)]
ARM: ensure fixed-point conversions have sane types

We were generating intrinsics for NEON fixed-point conversions that didn't
exist (e.g. float -> i16). There are two cases to consider:
  + iN is smaller than float. In this case we can do the conversion but need an
    extend or truncate as well.
  + iN is larger than float. In this case using the NEON conversion would be
    incorrect so we don't perform any combining.

llvm-svn: 185158

11 years ago[lsan] Fix build again.
Sergey Matveev [Fri, 28 Jun 2013 15:23:15 +0000 (15:23 +0000)]
[lsan] Fix build again.

llvm-svn: 185157

11 years ago[lsan] Fix build.
Sergey Matveev [Fri, 28 Jun 2013 15:18:06 +0000 (15:18 +0000)]
[lsan] Fix build.

llvm-svn: 185156

11 years agoARM: Fix pseudo-instructions for SRS (Store Return State).
Tilmann Scheller [Fri, 28 Jun 2013 15:09:46 +0000 (15:09 +0000)]
ARM: Fix pseudo-instructions for SRS (Store Return State).

The mapping between SRS pseudo-instructions and SRS native instructions was incorrect, the correct mapping is:

srsfa -> srsib
srsea -> srsia
srsfd -> srsdb
srsed -> srsda

This fixes <rdar://problem/14214734>.

llvm-svn: 185155

11 years agollvm-symbolizer: don't leave dangling pointers after flushing LLVMSymbolizer. Add...
Alexey Samsonov [Fri, 28 Jun 2013 15:08:29 +0000 (15:08 +0000)]
llvm-symbolizer: don't leave dangling pointers after flushing LLVMSymbolizer. Add a destructor.

llvm-svn: 185154

11 years ago[lsan] When verbosity > 1, always print suppressions and summary (even if no leaks...
Sergey Matveev [Fri, 28 Jun 2013 15:05:16 +0000 (15:05 +0000)]
[lsan] When verbosity > 1, always print suppressions and summary (even if no leaks found).

Also fix an output bug.

llvm-svn: 185153

11 years ago[lsan] Add suppression support.
Sergey Matveev [Fri, 28 Jun 2013 14:38:31 +0000 (14:38 +0000)]
[lsan] Add suppression support.

llvm-svn: 185152

11 years agollvm-symbolizer: skip leading underscore in Mach-O symbol table entries
Alexey Samsonov [Fri, 28 Jun 2013 14:25:52 +0000 (14:25 +0000)]
llvm-symbolizer: skip leading underscore in Mach-O symbol table entries

llvm-svn: 185151

11 years ago[sanitizer] Disable all ptrace-related definitions on Android.
Evgeniy Stepanov [Fri, 28 Jun 2013 14:18:10 +0000 (14:18 +0000)]
[sanitizer] Disable all ptrace-related definitions on Android.

llvm-svn: 185150

11 years agoUse lexing mode based on FormatStyle.Standard.
Alexander Kornienko [Fri, 28 Jun 2013 12:51:24 +0000 (12:51 +0000)]
Use lexing mode based on FormatStyle.Standard.

Summary:
Some valid pre-C++11 constructs change meaning when lexed in C++11
mode, e.g.
#define x(_a) printf("foo"_a);
(example from http://llvm.org/bugs/show_bug.cgi?id=16342). "foo"_a is treated as
a user-defined string literal when parsed in C++11 mode.
In order to deal with this correctly, we need to set lexing mode according to
which standard the code conforms to. We already have a configuration value for
this (FormatStyle.Standard), which seems to be appropriate to use in this case
as well.

Reviewers: klimek

CC: cfe-commits, gribozavr
Differential Revision: http://llvm-reviews.chandlerc.com/D1028

llvm-svn: 185149

11 years ago[ASan] Migrate lit tests to external symbolizer from asan_symbolize.py script
Alexey Samsonov [Fri, 28 Jun 2013 12:50:12 +0000 (12:50 +0000)]
[ASan] Migrate lit tests to external symbolizer from asan_symbolize.py script

llvm-svn: 185148

11 years agoMove sys/sysctl.h include after its dependency sys/types.h
Ed Maste [Fri, 28 Jun 2013 12:35:08 +0000 (12:35 +0000)]
Move sys/sysctl.h include after its dependency sys/types.h

llvm-svn: 185147

11 years agoDemangle names using pluggable internal symbolizer if possible
Alexey Samsonov [Fri, 28 Jun 2013 12:30:24 +0000 (12:30 +0000)]
Demangle names using pluggable internal symbolizer if possible

llvm-svn: 185146

11 years ago[sanitizer] Fix an unfortunate typo and disable ptrace interception on Android.
Evgeniy Stepanov [Fri, 28 Jun 2013 12:16:03 +0000 (12:16 +0000)]
[sanitizer] Fix an unfortunate typo and disable ptrace interception on Android.

llvm-svn: 185145

11 years agoPass --default-arch flag to external symbolizer. Fix line lengths.
Alexey Samsonov [Fri, 28 Jun 2013 12:13:31 +0000 (12:13 +0000)]
Pass --default-arch flag to external symbolizer. Fix line lengths.

llvm-svn: 185144

11 years agollvm-symbolizer: make name demangling a public static method of LLVMSymbolizer
Alexey Samsonov [Fri, 28 Jun 2013 12:06:25 +0000 (12:06 +0000)]
llvm-symbolizer: make name demangling a public static method of LLVMSymbolizer

llvm-svn: 185143

11 years ago[sanitizer] Intercept ptrace.
Evgeniy Stepanov [Fri, 28 Jun 2013 11:02:43 +0000 (11:02 +0000)]
[sanitizer] Intercept ptrace.

llvm-svn: 185142

11 years agoImprove comment.
Rafael Espindola [Fri, 28 Jun 2013 10:55:41 +0000 (10:55 +0000)]
Improve comment.

llvm-svn: 185141

11 years ago[ASan][OSX] Make sure the zones created by malloc_create_zone() are write-protected.
Alexander Potapenko [Fri, 28 Jun 2013 10:01:09 +0000 (10:01 +0000)]
[ASan][OSX]  Make sure the zones created by malloc_create_zone() are write-protected.
Add a test.

llvm-svn: 185140

11 years agoMake a switch in createBinary fully-covered. Add forgotten macho_dsym_companion case.
Alexey Samsonov [Fri, 28 Jun 2013 09:44:05 +0000 (09:44 +0000)]
Make a switch in createBinary fully-covered. Add forgotten macho_dsym_companion case.

llvm-svn: 185139

11 years ago[ASan][OSX] Fix the incorrect malloc_create_zone() implementation that led to out...
Alexander Potapenko [Fri, 28 Jun 2013 09:21:31 +0000 (09:21 +0000)]
[ASan][OSX] Fix the incorrect malloc_create_zone() implementation that led to out-of-bounds mprotect()s
(https://code.google.com/p/address-sanitizer/issues/detail?id=203)
Add a test.

llvm-svn: 185138

11 years agollvm-symbolizer: add support for Mach-O universal binaries
Alexey Samsonov [Fri, 28 Jun 2013 08:15:40 +0000 (08:15 +0000)]
llvm-symbolizer: add support for Mach-O universal binaries

llvm-svn: 185137

11 years agoSuppress GCC "control reaches end of non-void function" warning.
Patrik Hagglund [Fri, 28 Jun 2013 06:54:05 +0000 (06:54 +0000)]
Suppress GCC "control reaches end of non-void function" warning.

llvm-svn: 185136

11 years agoDebug Info: clean up usage of Verify.
Manman Ren [Fri, 28 Jun 2013 05:43:10 +0000 (05:43 +0000)]
Debug Info: clean up usage of Verify.

No functionality change.
It should suffice to check the type of a debug info metadata, instead of
calling Verify. For cases where we know the type of a DI metadata, use
assert.

Also update testing cases to make them conform to the format of DI classes.

llvm-svn: 185135

11 years agoAdd include guard.
Rui Ueyama [Fri, 28 Jun 2013 04:52:40 +0000 (04:52 +0000)]
Add include guard.

llvm-svn: 185134

11 years ago[PECOFF][Writer] Support DIR32NB and REL32 relocation types.
Rui Ueyama [Fri, 28 Jun 2013 04:40:52 +0000 (04:40 +0000)]
[PECOFF][Writer] Support DIR32NB and REL32 relocation types.

llvm-svn: 185133

11 years agoLazily deserialize function template specializations. This fixes a cycle in
Richard Smith [Fri, 28 Jun 2013 04:37:53 +0000 (04:37 +0000)]
Lazily deserialize function template specializations. This fixes a cycle in
module deserialization / merging, and more laziness here is general goodness.

llvm-svn: 185132

11 years agoIntegrate Assembler: Support X86_64_DTPOFF64 relocations
David Blaikie [Fri, 28 Jun 2013 04:24:32 +0000 (04:24 +0000)]
Integrate Assembler: Support X86_64_DTPOFF64 relocations

llvm-svn: 185131

11 years ago[PECOFF][Writer] Fix a bug that the contents of .data and .rdata were swapped.
Rui Ueyama [Fri, 28 Jun 2013 04:15:37 +0000 (04:15 +0000)]
[PECOFF][Writer] Fix a bug that the contents of .data and .rdata were swapped.

llvm-svn: 185130

11 years ago[PECOFF][Writer] Skip ".debug$S" section in the input object file.
Rui Ueyama [Fri, 28 Jun 2013 04:06:49 +0000 (04:06 +0000)]
[PECOFF][Writer] Skip ".debug$S" section in the input object file.

llvm-svn: 185129

11 years ago[PECOFF][Writer] Use a constant instead of a magic number.
Rui Ueyama [Fri, 28 Jun 2013 03:52:41 +0000 (03:52 +0000)]
[PECOFF][Writer] Use a constant instead of a magic number.

llvm-svn: 185128