platform/upstream/llvm.git
11 years agoBuild unwind tables by default on NetBSD.
Joerg Sonnenberger [Thu, 15 Aug 2013 15:08:33 +0000 (15:08 +0000)]
Build unwind tables by default on NetBSD.

llvm-svn: 188463

11 years agoUse the integrated assembler on NetBSD/powerpc by default.
Joerg Sonnenberger [Thu, 15 Aug 2013 15:04:56 +0000 (15:04 +0000)]
Use the integrated assembler on NetBSD/powerpc by default.

llvm-svn: 188462

11 years ago[Mips][msa] Added most builtins from add.a to xori
Jack Carter [Thu, 15 Aug 2013 14:47:02 +0000 (14:47 +0000)]
[Mips][msa] Added most builtins from add.a to xori

Includes:
add.a, adds_a, adds_s, adds_u, addv, addvi, andi.b, asub_[su], ave_[su],
aver_[su], bclr, bclri, bins[lr], bins[lr]i, bmnzi, bmzi, bneg, bnegi, bset,
bseti, c(eq|ne), c(eq|ne)i, cl[et]_[su], cl[et]i_[su], copy_[su].[bhw],
div_[su], dotp_[su], dpadd_[su], dpsub_[su], fadd, fceq, fclass, fcl[et], fcne,
fdiv, fexp2, ffint_[su], ffql, ffqr, fill, flog2, fmadd, fmax, fmax_a, fmin,
fmin_a, fmsub, fmul, frint, fseq, fsle, fslt, fsne, fsqr, fsub, ftint_[su],
ftq, ilvev, ilvl, ilvod, ilvr, ldi, frcp, frsqrt, madd_q, maddr_q, maddv,
max_[asu], maxi_[su], min_[asu], mini_[su], mod_[su], msub_q, msubr_q, msubv,
mul_q, mulr_q, mulv, nloc, nlzc, nori, ori, pckev, pckod, pcnt, sat_[su], shf,
sld, sldi, sll, slli, splat, splati, sr[al], sr[al]i, subs_[su], subv, subvi,
xori

Patch by Daniel Sanders

llvm-svn: 188461

11 years ago[Mips][msa] Added the simple builtins (madd_q to xori)
Jack Carter [Thu, 15 Aug 2013 14:22:07 +0000 (14:22 +0000)]
[Mips][msa] Added the simple builtins (madd_q to xori)

Includes:
madd_q, maddr_q, maddv, max_[asu], maxi_[su], min_[asu], mini_[su], mod_[su],
msub_q, msubr_q, msubv, mul_q, mulr_q, mulv, nloc, nlzc, nori, ori, pckev,
pckod, pcnt, sat_[su], shf, sld, sldi, sll, slli, splat, splati, sr[al],
sr[al]i, subs_[su], subss_u, subus_s, subv, subvi, vshf, xori

Patch by Daniel Sanders

llvm-svn: 188460

11 years agoUpdate sanitizer attribute documentation to match behaviour change in r187967.
Evgeniy Stepanov [Thu, 15 Aug 2013 13:57:11 +0000 (13:57 +0000)]
Update sanitizer attribute documentation to match behaviour change in r187967.

llvm-svn: 188459

11 years ago[Mips][msa] Added the simple builtins (fadd to ftq)
Jack Carter [Thu, 15 Aug 2013 13:45:36 +0000 (13:45 +0000)]
[Mips][msa] Added the simple builtins (fadd to ftq)

Includes:
fadd, fceq, fcg[et], fclass, fcl[et], fcne, fcun, fdiv, fexdo, fexp2,
fexup[lr], ffint_[su], ffql, ffqr, fill, flog2, fmadd, fmax, fmax_a, fmin,
fmin_a, fmsub, fmul, frint, frcp, frsqrt, fseq, fsge, fsgt, fsle, fslt,
fsne, fsqr, fsub, ftint_s, ftq

Patch by Daniel Sanders

llvm-svn: 188458

11 years ago[Mips][msa] Added the simple builtins (add_a to dpsub[su], ilvev to ldi)
Jack Carter [Thu, 15 Aug 2013 12:24:57 +0000 (12:24 +0000)]
[Mips][msa] Added the simple builtins (add_a to dpsub[su], ilvev to ldi)

Includes:
add_a, adds_[asu], addv, addvi, andi.b, asub_[su].[bhwd], aver?_[su]_[bhwd],
bclr, bclri, bins[lr], bins[lr]i, bmnzi, bmzi, bneg, bnegi, bseli, bset, bseti,
c(eq|ne), c(eq|ne)i, cl[et]_[su], cl[et]i_[su], copy_[su].[bhw], div_[su],
dotp_[su], dpadd_[su], dpsub_[su], ilvev, ilvl, ilvod, ilvr, insv, insve,
ldi

Patch by Daniel Sanders

llvm-svn: 188457

11 years agoFix the build failure of Realease version
Hao Liu [Thu, 15 Aug 2013 11:38:54 +0000 (11:38 +0000)]
Fix the build failure of Realease version

llvm-svn: 188456

11 years ago[sanitizer] Add missing include.
Evgeniy Stepanov [Thu, 15 Aug 2013 10:20:30 +0000 (10:20 +0000)]
[sanitizer] Add missing include.

llvm-svn: 188455

11 years agoRevert r188449 as it turns out we're just missing the instructions that need the...
Craig Topper [Thu, 15 Aug 2013 08:38:25 +0000 (08:38 +0000)]
Revert r188449 as it turns out we're just missing the instructions that need the v16i32/v16f32 matching.

llvm-svn: 188454

11 years agoAdd back a test that was removed in r188450
David Majnemer [Thu, 15 Aug 2013 08:34:07 +0000 (08:34 +0000)]
Add back a test that was removed in r188450

llvm-svn: 188453

11 years agoClang and AArch64 backend patches to support shll/shl and vmovl instructions and...
Hao Liu [Thu, 15 Aug 2013 08:26:30 +0000 (08:26 +0000)]
Clang and AArch64 backend patches to support shll/shl and vmovl instructions and ACLE functions

llvm-svn: 188452

11 years agoClang and AArch64 backend patches to support shll/shl and vmovl instructions and...
Hao Liu [Thu, 15 Aug 2013 08:26:11 +0000 (08:26 +0000)]
Clang and AArch64 backend patches to support shll/shl and vmovl instructions and ACLE functions

llvm-svn: 188451

11 years ago[-cxx-abi microsoft] Mangle member pointers better
David Majnemer [Thu, 15 Aug 2013 08:13:23 +0000 (08:13 +0000)]
[-cxx-abi microsoft] Mangle member pointers better

Summary:
There were several things going wrong:
- We mangled in useless qualifiers like "volatile void" return types.
- We didn't propagate 64-bit pointer markers sufficiently.
- We mangled qualifiers belonging to the pointee incorrectly.

This fixes PR16844 and PR16848.

Reviewers: rnk, whunt

Reviewed By: rnk

CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1353

llvm-svn: 188450

11 years agoDon't let isPermImmMask handle v16i32 since VPERMI doesn't match on that type. Remove...
Craig Topper [Thu, 15 Aug 2013 07:30:51 +0000 (07:30 +0000)]
Don't let isPermImmMask handle v16i32 since VPERMI doesn't match on that type. Remove 128-bit vector handling from isPermImmMask too, it's covered by isPSHUFDMask.

llvm-svn: 188449

11 years agoTentative fix for global-buffer-overflow caused by r188426. Found by AddressSanitizer
Alexey Samsonov [Thu, 15 Aug 2013 07:11:34 +0000 (07:11 +0000)]
Tentative fix for global-buffer-overflow caused by r188426. Found by AddressSanitizer

llvm-svn: 188448

11 years agoCHECK-LABEL-ify some code gen tests to improve diagnostic experience when tests fail.
Stephen Lin [Thu, 15 Aug 2013 06:47:53 +0000 (06:47 +0000)]
CHECK-LABEL-ify some code gen tests to improve diagnostic experience when tests fail.

llvm-svn: 188447

11 years agoUse MVT instead of EVT in X86ISelDAGToDAG since all the types should be legal.
Craig Topper [Thu, 15 Aug 2013 05:57:07 +0000 (05:57 +0000)]
Use MVT instead of EVT in X86ISelDAGToDAG since all the types should be legal.

llvm-svn: 188446

11 years agoUse MVT in place of EVT in more X86 operation lowering functions.
Craig Topper [Thu, 15 Aug 2013 05:33:45 +0000 (05:33 +0000)]
Use MVT in place of EVT in more X86 operation lowering functions.

llvm-svn: 188445

11 years agoFixed typo in CMakeLists.txt.
Michael Gottesman [Thu, 15 Aug 2013 04:16:12 +0000 (04:16 +0000)]
Fixed typo in CMakeLists.txt.

We were marking both LLVMBUILDOUTPUT and LLVMBUILDERRORS as
ERROR_VARIABLES when clearly LLVMBUILDOUTPUT should be marked as
OUTPUT_VARIABLE.

llvm-svn: 188444

11 years agoA new test case which adds a dSYM to an executable mid-debug session
Jason Molenda [Thu, 15 Aug 2013 02:49:16 +0000 (02:49 +0000)]
A new test case which adds a dSYM to an executable mid-debug session
where the executable has been slid.  This detects the regression fixed in
r188289.

llvm-svn: 188443

11 years agoReplace getValueType().getSimpleVT() with getSimpleValueType().
Craig Topper [Thu, 15 Aug 2013 02:44:19 +0000 (02:44 +0000)]
Replace getValueType().getSimpleVT() with getSimpleValueType().

llvm-svn: 188442

11 years agoReplace getValueType().getSimpleVT() with getSimpleValueType(). Also remove one weird...
Craig Topper [Thu, 15 Aug 2013 02:33:50 +0000 (02:33 +0000)]
Replace getValueType().getSimpleVT() with getSimpleValueType(). Also remove one weird cast from MVT->EVT just to call getSimpleVT().

llvm-svn: 188441

11 years agoAdd a bit of explanation for FrontendActionFactory.
Stefanus Du Toit [Thu, 15 Aug 2013 00:35:46 +0000 (00:35 +0000)]
Add a bit of explanation for FrontendActionFactory.

Also use the more common "derive from" in place of "extend" in another
comment.

llvm-svn: 188440

11 years agoAdd ctorInitializer to the dynamic AST Matcher registry.
Stefanus Du Toit [Thu, 15 Aug 2013 00:33:08 +0000 (00:33 +0000)]
Add ctorInitializer to the dynamic AST Matcher registry.

llvm-svn: 188439

11 years agoObjectiveC [Sema]. This patch makes sure that all inherited
Fariborz Jahanian [Wed, 14 Aug 2013 23:58:55 +0000 (23:58 +0000)]
ObjectiveC [Sema]. This patch makes sure that all inherited
properties (direct or indirect) setter/getter (or declared
methods as well) are seen by the method implementation type
matching logic before declaration of method in super class
is seen. This fixes the warning coming out of that method mismatch.
// rdar://14650159

llvm-svn: 188438

11 years agoAuto-compute live intervals on demand.
Mark Lacey [Wed, 14 Aug 2013 23:50:16 +0000 (23:50 +0000)]
Auto-compute live intervals on demand.

When new virtual registers are created during splitting/spilling, defer
creation of the live interval until we need to use the live interval.

Along with the recent commits to notify LiveRangeEdit when new virtual
registers are created, this makes it possible for functions like
TargetInstrInfo::loadRegFromStackSlot() and
TargetInstrInfo::storeRegToStackSlot() to create multiple virtual
registers as part of the process of generating loads/stores for
different register classes, and then have the live intervals for those
new registers computed when they are needed.

llvm-svn: 188437

11 years agoAdd the MachineInstrSpan class.
Mark Lacey [Wed, 14 Aug 2013 23:50:11 +0000 (23:50 +0000)]
Add the MachineInstrSpan class.

MachineInstrSpan is initialized with a MachineBasicBlock::iterator,
and is intended to track which instructions are inserted before/after
that instruction from the time the MachineInstrSpan is created.

It provides a begin()/end() interface to walk the range of
instructions inserted around the initial instruction (including that
initial instruction).

It also provides a getInitial() interface to return the initial
iterator.

llvm-svn: 188436

11 years agoNotify LiveRangeEdit of new virtual registers.
Mark Lacey [Wed, 14 Aug 2013 23:50:09 +0000 (23:50 +0000)]
Notify LiveRangeEdit of new virtual registers.

Add a delegate class to MachineRegisterInfo with a single virtual
function, MRI_NoteNewVirtualRegister(). Update LiveRangeEdit to inherit
from this delegate class and override the definition of the callback
with an implementation that tracks the newly created virtual registers.

llvm-svn: 188435

11 years agoTrack new virtual registers by register number.
Mark Lacey [Wed, 14 Aug 2013 23:50:04 +0000 (23:50 +0000)]
Track new virtual registers by register number.

Track new virtual registers by register number, rather than by the live
interval created for them. This is the first step in separating the
creation of new virtual registers and new live intervals.  Eventually
live intervals will be created and populated on demand after the virtual
registers have been created and used in instructions.

llvm-svn: 188434

11 years ago[static analyzer] add a simple "CallEffects" API to query the retain count semantics...
Ted Kremenek [Wed, 14 Aug 2013 23:41:49 +0000 (23:41 +0000)]
[static analyzer] add a simple "CallEffects" API to query the retain count semantics of a method.

This is intended to be a simplified API, whose internals are
deliberately less efficient for the purpose of a simplified interface,
for use with clients that want to query the analyzer's heuristics for
determining retain count semantics.

There are no immediate clients, but it is intended to be used
by the ObjC modernizer.

llvm-svn: 188433

11 years ago[static analyzer] Factor out ArgEffect and RetEffect into public header file.
Ted Kremenek [Wed, 14 Aug 2013 23:41:46 +0000 (23:41 +0000)]
[static analyzer] Factor out ArgEffect and RetEffect into public header file.

This is a WIP change to allow other clients to query the retain count
heuristics of the static analyzer.

llvm-svn: 188432

11 years agoR600/SI: Improve legalization of vector operations
Tom Stellard [Wed, 14 Aug 2013 23:25:00 +0000 (23:25 +0000)]
R600/SI: Improve legalization of vector operations

This should fix hangs in the OpenCL piglit tests.

llvm-svn: 188431

11 years agoR600/SI: Replace v1i32 type with i32 in imageload and sample intrinsics
Tom Stellard [Wed, 14 Aug 2013 23:24:53 +0000 (23:24 +0000)]
R600/SI: Replace v1i32 type with i32 in imageload and sample intrinsics

llvm-svn: 188430

11 years agoR600/SI: Convert v16i8 resource descriptors to i128
Tom Stellard [Wed, 14 Aug 2013 23:24:45 +0000 (23:24 +0000)]
R600/SI: Convert v16i8 resource descriptors to i128

Now that compute support is better on SI, we can't continue using v16i8
for descriptors since this is also a legal type in OpenCL.

This patch fixes numerous hangs with the piglit OpenCL test and since
we now use a target specific DAG node for LOAD_CONSTANT with the
correct MemOperandFlags, this should also fix:

https://bugs.freedesktop.org/show_bug.cgi?id=66805

llvm-svn: 188429

11 years agoR600/SI: Use i8 types for resource descriptors in tests
Tom Stellard [Wed, 14 Aug 2013 23:24:37 +0000 (23:24 +0000)]
R600/SI: Use i8 types for resource descriptors in tests

We switched from i32 to i8 types a while ago and the tests were never
updated.

llvm-svn: 188428

11 years agoR600/SI: Lower BUILD_VECTOR to REG_SEQUENCE v2
Tom Stellard [Wed, 14 Aug 2013 23:24:32 +0000 (23:24 +0000)]
R600/SI: Lower BUILD_VECTOR to REG_SEQUENCE v2

Using REG_SEQUENCE for BUILD_VECTOR rather than a series of INSERT_SUBREG
instructions should make it easier for the register allocator to coalasce
unnecessary copies.

v2:
  - Use an SGPR register class if all the operands of BUILD_VECTOR are
    SGPRs.

llvm-svn: 188427

11 years agoR600/SI: Choose the correct MOV instruction for copying immediates
Tom Stellard [Wed, 14 Aug 2013 23:24:24 +0000 (23:24 +0000)]
R600/SI: Choose the correct MOV instruction for copying immediates

The instruction selector will now try to infer the destination register
so it can decided whether to use V_MOV_B32 or S_MOV_B32 when copying
immediates.

llvm-svn: 188426

11 years agoR600/SI: Assign a register class to the $vaddr operand for MIMG instructions
Tom Stellard [Wed, 14 Aug 2013 23:24:17 +0000 (23:24 +0000)]
R600/SI: Assign a register class to the $vaddr operand for MIMG instructions

The previous code declared the operand as unknown:$vaddr, which made
it possible for scalar registers to be used instead of vector registers.

llvm-svn: 188425

11 years ago[llvm-build] Make Py3 compatible.
Daniel Dunbar [Wed, 14 Aug 2013 23:15:39 +0000 (23:15 +0000)]
[llvm-build] Make Py3 compatible.

llvm-svn: 188424

11 years agoDataFlowSanitizer: move abilist input file to Inputs.
Peter Collingbourne [Wed, 14 Aug 2013 22:28:36 +0000 (22:28 +0000)]
DataFlowSanitizer: move abilist input file to Inputs.

llvm-svn: 188423

11 years agoDebugInfo: Prefer references over pointers, pass by const reference for a type that...
David Blaikie [Wed, 14 Aug 2013 22:23:05 +0000 (22:23 +0000)]
DebugInfo: Prefer references over pointers, pass by const reference for a type that will grow in the future

llvm-svn: 188422

11 years agoR600/SI: Handle MSAA texture targets
Tom Stellard [Wed, 14 Aug 2013 22:22:14 +0000 (22:22 +0000)]
R600/SI: Handle MSAA texture targets

Patch by: Marek Olšák

Signed-off-by: Marek Olšák <marek.olsak@amd.com>
llvm-svn: 188421

11 years agoR600/SI: Allow conversion between v32i8 and v8i32
Tom Stellard [Wed, 14 Aug 2013 22:22:09 +0000 (22:22 +0000)]
R600/SI: Allow conversion between v32i8 and v8i32

Patch by: Marek Olšák

Signed-off-by: Marek Olšák <marek.olsak@amd.com>
llvm-svn: 188420

11 years agoR600/SI: Fix an obvious typo
Tom Stellard [Wed, 14 Aug 2013 22:22:03 +0000 (22:22 +0000)]
R600/SI: Fix an obvious typo

Patch by: Marek Olšák

Signed-off-by: Marek Olšák <marek.olsak@amd.com>
llvm-svn: 188419

11 years agoR600/SI: Add pattern for fp_to_uint
Tom Stellard [Wed, 14 Aug 2013 22:21:57 +0000 (22:21 +0000)]
R600/SI: Add pattern for fp_to_uint

This fixes the F2U opcode for the Mesa driver.

Patch by: Marek Olšák

Signed-off-by: Marek Olšák <marek.olsak@amd.com>
llvm-svn: 188418

11 years ago[lit] Add test coverage of gtest format.
Daniel Dunbar [Wed, 14 Aug 2013 22:21:11 +0000 (22:21 +0000)]
[lit] Add test coverage of gtest format.

llvm-svn: 188417

11 years ago[lit] Ensure test output is converted to strings where possible.
Daniel Dunbar [Wed, 14 Aug 2013 22:21:01 +0000 (22:21 +0000)]
[lit] Ensure test output is converted to strings where possible.

 - This cleans up the text output of failing tests when run under PY3.

llvm-svn: 188416

11 years agoFix small typo: s/succ/Succ/
Mark Lacey [Wed, 14 Aug 2013 22:11:42 +0000 (22:11 +0000)]
Fix small typo: s/succ/Succ/

llvm-svn: 188415

11 years agoRelax testcase for r188400 to not test for forward-slashes as path separators.
Adrian Prantl [Wed, 14 Aug 2013 22:10:17 +0000 (22:10 +0000)]
Relax testcase for r188400 to not test for forward-slashes as path separators.

llvm-svn: 188414

11 years agoRelax complete-type check for functions and function pointers to allow void return...
Howard Hinnant [Wed, 14 Aug 2013 21:28:31 +0000 (21:28 +0000)]
Relax complete-type check for functions and function pointers to allow void return type.  This bug was exposed by Eli Friedman's commit to clang r188324.  Anywhere this version of clang ships, this libc++ fix must follow.  However this fix is compatible with previous clangs, and so this libc++ doesn't need to wait for this clang.

llvm-svn: 188413

11 years agoDataFlowSanitizer: Instrumentation for memset.
Peter Collingbourne [Wed, 14 Aug 2013 20:51:38 +0000 (20:51 +0000)]
DataFlowSanitizer: Instrumentation for memset.

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

llvm-svn: 188412

11 years ago[dfsan] New __dfsan_set_label runtime function.
Peter Collingbourne [Wed, 14 Aug 2013 20:51:33 +0000 (20:51 +0000)]
[dfsan] New __dfsan_set_label runtime function.

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

llvm-svn: 188411

11 years agoPR16875: The return type of a dependent function type is visible when it's
Richard Smith [Wed, 14 Aug 2013 20:16:31 +0000 (20:16 +0000)]
PR16875: The return type of a dependent function type is visible when it's
referenced as a member of the current instantiation. In that case, deduce the
type of the function to a dependent type rather than exposing an undeduced auto
type to the rest of the current instantiation.

The standard doesn't really say that the type is dependent in this case; I'll
bring this up with CWG.

llvm-svn: 188410

11 years agoBug fix: note diagnosis on expression narrowing should say "variable template" instea...
Larisse Voufo [Wed, 14 Aug 2013 20:15:02 +0000 (20:15 +0000)]
Bug fix: note diagnosis on expression narrowing should say "variable template" instead of "static data member" when appropriate

llvm-svn: 188409

11 years agoFix grammar mistake.
Shuxin Yang [Wed, 14 Aug 2013 20:07:23 +0000 (20:07 +0000)]
Fix grammar mistake.

Thank Richard Smith for figuring out this problem.

llvm-svn: 188408

11 years agoActually fix PPC64 64-bit GPR inline asm constraint matching
Hal Finkel [Wed, 14 Aug 2013 20:05:04 +0000 (20:05 +0000)]
Actually fix PPC64 64-bit GPR inline asm constraint matching

This is a follow-up to r187693, correcting that code to request the correct
register class. The previous version, with the wrong register class, was not
really correcting the constraints, but rather was removing them. Coincidentally,
this fixed the failing test case in r187693, but obviously created other
problems.

llvm-svn: 188407

11 years agoDo no use -emit-llvm for -flto.
Shuxin Yang [Wed, 14 Aug 2013 19:45:49 +0000 (19:45 +0000)]
Do no use -emit-llvm for -flto.

Tested on multiple OSes.

llvm-svn: 188406

11 years agoTestcase for r188400.
Benjamin Kramer [Wed, 14 Aug 2013 19:45:27 +0000 (19:45 +0000)]
Testcase for r188400.

llvm-svn: 188405

11 years agocpp11-migrate: Remove mention of 'headers' from serialization code
Edwin Vane [Wed, 14 Aug 2013 19:02:28 +0000 (19:02 +0000)]
cpp11-migrate: Remove mention of 'headers' from serialization code

* HeaderChangeDocument -> MigratorDocument
* HeaderFileName -> TargetFile
* SourceFileName -> MainSourceFile
* Removed TransformID
* Comments updated, at least with respect to serialization
* Unit tests updated.

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

llvm-svn: 188404

11 years agoAdd support for -fsanitize-blacklist and default blacklists for DFSan.
Peter Collingbourne [Wed, 14 Aug 2013 18:54:18 +0000 (18:54 +0000)]
Add support for -fsanitize-blacklist and default blacklists for DFSan.
Also add some documentation.

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

llvm-svn: 188403

11 years agoDataFlowSanitizer: greylist is now ABI list.
Peter Collingbourne [Wed, 14 Aug 2013 18:54:12 +0000 (18:54 +0000)]
DataFlowSanitizer: greylist is now ABI list.

This replaces the old incomplete greylist functionality with an ABI
list, which can provide more detailed information about the ABI and
semantics of specific functions.  The pass treats every function in
the "uninstrumented" category in the ABI list file as conforming to
the "native" (i.e. unsanitized) ABI.  Unless the ABI list contains
additional categories for those functions, a call to one of those
functions will produce a warning message, as the labelling behaviour
of the function is unknown.  The other supported categories are
"functional", "discard" and "custom".

- "discard" -- This function does not write to (user-accessible) memory,
  and its return value is unlabelled.
- "functional" -- This function does not write to (user-accessible)
  memory, and the label of its return value is the union of the label of
  its arguments.
- "custom" -- Instead of calling the function, a custom wrapper __dfsw_F
  is called, where F is the name of the function.  This function may wrap
  the original function or provide its own implementation.

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

llvm-svn: 188402

11 years ago[dfsan] Runtime support for ABI list functionality; can now run integration tests...
Peter Collingbourne [Wed, 14 Aug 2013 18:54:06 +0000 (18:54 +0000)]
[dfsan] Runtime support for ABI list functionality; can now run integration tests with args ABI.

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

llvm-svn: 188401

11 years agoEnhance the clang -v gcc debug printing to skip obviously bad and duplicate paths.
Benjamin Kramer [Wed, 14 Aug 2013 18:38:51 +0000 (18:38 +0000)]
Enhance the clang -v gcc debug printing to skip obviously bad and duplicate paths.

Otherwise it lists all files (e.g. shared libraries) that happen to be in the
same paths the GCC installations usually reside in.

On a x86_64 Debian 7 system with i386 multilibs.
before: clang -v 2>&1|wc -l
        3059
after:  clang -v 2>&1|wc -l
        10

llvm-svn: 188400

11 years ago[lit] Support parsing scripts with inconsistent or invalid encodings.
Daniel Dunbar [Wed, 14 Aug 2013 18:22:41 +0000 (18:22 +0000)]
[lit] Support parsing scripts with inconsistent or invalid encodings.

 - For whatever reason, we have a lot of test files with bogus unicode
   characters. This patch allows those scripts to still be parsed on Python3 by
   changing the parsing logic to work on binary files, and only require the
   actual script commands to be convertible to ascii.

 - This patch has been tweaked to now ensure that the command strings are not of
   unicode type on Python 2.6-7.

llvm-svn: 188398

11 years agoUse the MSVC __cpuid intrinsic instead of inline asm
Reid Kleckner [Wed, 14 Aug 2013 18:21:51 +0000 (18:21 +0000)]
Use the MSVC __cpuid intrinsic instead of inline asm

This works around PR16830 in LLVM when self-hosting clang on Windows.

llvm-svn: 188397

11 years agoXing Xue: port to IBM XLC++/AIX.
Howard Hinnant [Wed, 14 Aug 2013 18:00:20 +0000 (18:00 +0000)]
Xing Xue:  port to IBM XLC++/AIX.

llvm-svn: 188396

11 years agoFix signed/unsigned warnings when building libc++ in C++14 mode
Marshall Clow [Wed, 14 Aug 2013 17:53:31 +0000 (17:53 +0000)]
Fix signed/unsigned warnings when building libc++ in C++14 mode

llvm-svn: 188395

11 years agocpp11-migrate: Fixing doxygen warnings
Tareq A. Siraj [Wed, 14 Aug 2013 17:47:39 +0000 (17:47 +0000)]
cpp11-migrate: Fixing doxygen warnings

For some reason doxygen doesn't seem to like the using namespace
clang::tooling in the source file and complaints about missing class
members.

Also fixed missing parameter documentation for TransformName in
SourceOverrides::applyReplacements().

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

llvm-svn: 188394

11 years agoRemove unnecessary parameter to RenumberValues.
Jakob Stoklund Olesen [Wed, 14 Aug 2013 17:28:52 +0000 (17:28 +0000)]
Remove unnecessary parameter to RenumberValues.

Patch by Matthias Braun!

llvm-svn: 188393

11 years agoRemove unused function.
Jakob Stoklund Olesen [Wed, 14 Aug 2013 17:28:49 +0000 (17:28 +0000)]
Remove unused function.

Patch by Matthias Braun!

llvm-svn: 188392

11 years agoImprove misleading comment.
Jakob Stoklund Olesen [Wed, 14 Aug 2013 17:28:46 +0000 (17:28 +0000)]
Improve misleading comment.

Patch by Matthias Braun!

llvm-svn: 188391

11 years agoRemove declaration of nonexistant function.
Jakob Stoklund Olesen [Wed, 14 Aug 2013 17:28:44 +0000 (17:28 +0000)]
Remove declaration of nonexistant function.

Patch by Matthias Braun!

llvm-svn: 188390

11 years agoLiveIntervalUnion is not used in RegAllocBase.
Jakob Stoklund Olesen [Wed, 14 Aug 2013 17:28:42 +0000 (17:28 +0000)]
LiveIntervalUnion is not used in RegAllocBase.

Patch by Matthias Braun!

llvm-svn: 188389

11 years agoRemove unused struct/enum
Jakob Stoklund Olesen [Wed, 14 Aug 2013 17:28:39 +0000 (17:28 +0000)]
Remove unused struct/enum

Patch by Matthias Braun!

llvm-svn: 188388

11 years agoAdded some missing issues to the c++1y status page, and put in hyperlinks for the...
Howard Hinnant [Wed, 14 Aug 2013 17:26:18 +0000 (17:26 +0000)]
Added some missing issues to the c++1y status page, and put in hyperlinks for the papers.

llvm-svn: 188387

11 years agollvm-symbolizer: add support for .gnu_debuglink section
Alexey Samsonov [Wed, 14 Aug 2013 17:09:30 +0000 (17:09 +0000)]
llvm-symbolizer: add support for .gnu_debuglink section

llvm-svn: 188386

11 years agoLet t2LDRBi8 and t2LDRBi12 have same Base Pointer
Renato Golin [Wed, 14 Aug 2013 16:35:29 +0000 (16:35 +0000)]
Let t2LDRBi8 and t2LDRBi12 have same Base Pointer

When determining if two different loads are from the same base address,
this patch allows one load to use a t2LDRi8 address mode and another to
use a t2LDRi12 address mode. The current implementation is very
conservative and this allows the case of differing Thumb2 byte loads to
be considered. Allowing these differing modes instead of forcing the exact
same opcode is useful for situations where one opcodes loads from a base
address+1 and a second opcode loads for a base address-1.

Patch by Daniel Stewart.

llvm-svn: 188385

11 years ago[tests] Reapply r188354, ensure subsitution string is ascii.
Daniel Dunbar [Wed, 14 Aug 2013 16:32:20 +0000 (16:32 +0000)]
[tests] Reapply r188354, ensure subsitution string is ascii.

 - Now fixed to ensure substitution value isn't of unicode type on Python 2.6-7.

llvm-svn: 188384

11 years agoremove CWG papers from list; add link to clang status page
Marshall Clow [Wed, 14 Aug 2013 16:30:37 +0000 (16:30 +0000)]
remove CWG papers from list; add link to clang status page

llvm-svn: 188383

11 years agoSphinx refuses to render this code block. Try adding a newline.
Benjamin Kramer [Wed, 14 Aug 2013 16:18:47 +0000 (16:18 +0000)]
Sphinx refuses to render this code block. Try adding a newline.

llvm-svn: 188382

11 years agoAdded CWG and SG1 papers to libc++ status page
Marshall Clow [Wed, 14 Aug 2013 16:12:34 +0000 (16:12 +0000)]
Added CWG and SG1 papers to libc++ status page

llvm-svn: 188381

11 years agoExpose CRC-32 implementation from zlib
Alexey Samsonov [Wed, 14 Aug 2013 16:03:29 +0000 (16:03 +0000)]
Expose CRC-32 implementation from zlib

llvm-svn: 188380

11 years agoRevert r188376, "[lit] Support parsing scripts with inconsistent or invalid encodings...
Daniel Dunbar [Wed, 14 Aug 2013 15:55:25 +0000 (15:55 +0000)]
Revert r188376, "[lit] Support parsing scripts with inconsistent or invalid encodings.", this doesn't work yet for bots using the internal shell.

llvm-svn: 188379

11 years agoMark LWG Issue #2110 and #2113 as completed - they were already done
Marshall Clow [Wed, 14 Aug 2013 15:28:40 +0000 (15:28 +0000)]
Mark LWG Issue #2110 and #2113 as completed - they were already done

llvm-svn: 188378

11 years agoAdd the C99 hex-float assembly syntax to our extension document.
Tim Northover [Wed, 14 Aug 2013 15:27:20 +0000 (15:27 +0000)]
Add the C99 hex-float assembly syntax to our extension document.

As Ben pointed out, GAS doesn't support this syntax so we should give at least
some warning that it might not be portable.

llvm-svn: 188377

11 years ago[lit] Support parsing scripts with inconsistent or invalid encodings.
Daniel Dunbar [Wed, 14 Aug 2013 15:24:58 +0000 (15:24 +0000)]
[lit] Support parsing scripts with inconsistent or invalid encodings.

 - For whatever reason, we have a lot of test files with bogus unicode
   characters. This patch allows those scripts to still be parsed on Python3 by
   changing the parsing logic to work on binary files, and only require the
   actual script commands to be convertible to ascii.

llvm-svn: 188376

11 years agoAdd a deleted assignment operator for basic_ostream; LWG Issue #2067
Marshall Clow [Wed, 14 Aug 2013 15:15:28 +0000 (15:15 +0000)]
Add a deleted assignment operator for basic_ostream; LWG Issue #2067

llvm-svn: 188375

11 years agocpp11-migrate: Fix silly logic error preventing multiple transforms
Edwin Vane [Wed, 14 Aug 2013 15:09:44 +0000 (15:09 +0000)]
cpp11-migrate: Fix silly logic error preventing multiple transforms

A missed clause in an error test added in r188371 caused any use of the
migrator requesting multiple transforms to fail.

llvm-svn: 188374

11 years agoRevert r188354, "[tests] Ensure subsitution string is ascii."
NAKAMURA Takumi [Wed, 14 Aug 2013 14:57:01 +0000 (14:57 +0000)]
Revert r188354, "[tests] Ensure subsitution string is ascii."

It caused "shell parser error" on win32 internal shell. ShParser doesn't expect unicode, but str.

llvm-svn: 188373

11 years agoAdd test-case for hex floating-literals
Tim Northover [Wed, 14 Aug 2013 14:55:54 +0000 (14:55 +0000)]
Add test-case for hex floating-literals

Somehow I forgot to test one of the error conditions I'd added.

llvm-svn: 188372

11 years agocpp11-migrate: Adding -yaml-only option
Edwin Vane [Wed, 14 Aug 2013 14:52:45 +0000 (14:52 +0000)]
cpp11-migrate: Adding -yaml-only option

For use with -headers, -yaml-only will cause cpp11-migrate to not write header
changes to disk and instead write them as header change description files. This
option facilitiates upcoming functionality to properly support changing headers
as part of migration.

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

llvm-svn: 188371

11 years agoSupport C99 hexadecimal floating-point literals in assembly
Tim Northover [Wed, 14 Aug 2013 14:23:31 +0000 (14:23 +0000)]
Support C99 hexadecimal floating-point literals in assembly

It's useful to be able to write down floating-point numbers without having to
worry about what they'll be rounded to (as C99 discovered), this extends that
ability to the MC assembly parsers.

llvm-svn: 188370

11 years ago[sanitizer] Split platform_limits_posix into system- and kernel-dependent parts.
Evgeniy Stepanov [Wed, 14 Aug 2013 13:34:14 +0000 (13:34 +0000)]
[sanitizer] Split platform_limits_posix into system- and kernel-dependent parts.

This change moves everything depending on kernel headers (mostly ioctl types
and ids) into a separate source file. This will reduce the possibility of
header conflict on various platforms (most importantly, older glibc versions).

This change also removes 2 deprecated ioctls, and symbolic ids for other bunch
of ambiguous ioctls (i.e. same id is shared by ioctls with different memory
behavior).

llvm-svn: 188369

11 years ago\param is not for referring to arguments.
Benjamin Kramer [Wed, 14 Aug 2013 10:21:47 +0000 (10:21 +0000)]
\param is not for referring to arguments.

Found by -Wdocumentation.

llvm-svn: 188368

11 years agoFix a really terrifying but improbable bug in mem2reg. If you have seen
Chandler Carruth [Wed, 14 Aug 2013 08:56:41 +0000 (08:56 +0000)]
Fix a really terrifying but improbable bug in mem2reg. If you have seen
extremely subtle miscompilations (such as a load getting replaced with
the value stored *below* the load within a basic block) related to
promoting an alloca to an SSA value, there is the dim possibility that
you hit this. Please let me know if you won this unfortunate lottery.

The first half of mem2reg's core logic (as it is used both in the
standalone mem2reg pass and in SROA) builds up a mapping from
'Instruction *' to the index of that instruction within its basic block.
This allows quickly establishing which store dominate a particular load
even for large basic blocks. We cache this information throughout the
run of mem2reg over a function in order to amortize the cost of
computing it.

This is not in and of itself a strange pattern in LLVM. However, it
introduces a very important constraint: absolutely no instruction can be
deleted from the program without updating the mapping. Otherwise a newly
allocated instruction might get the same pointer address, and then end
up with a wrong index. Yes, LLVM routinely suffers from a *single
threaded* variant of the ABA problem. Most places in LLVM don't find
avoiding this an imposition because they don't both delete and create
new instructions iteratively, but mem2reg *loves* to do this... All the
time. Fortunately, the mem2reg code was really careful about updating
this cache to handle this eventuallity... except when it comes to the
debug declare intrinsic. Oops. The fix is to invalidate that pointer in
the cache when we delete it, the same as we do when deleting alloca
instructions and other instructions.

I've also caused the same bug in new code while working on a fix to
PR16867, so this seems to be a really unfortunate pattern. Hopefully in
subsequent patches the deletion of dead instructions can be consolidated
sufficiently to make it less likely that we'll see future occurences of
this bug.

Sorry for not having a test case, but I have literally no idea how to
reliably trigger this kind of thing. It may be single-threaded, but it
remains an ABA problem. It would require a really amazing number of
stars to align.

llvm-svn: 188367

11 years agoMake more helper methods into static functions.
Craig Topper [Wed, 14 Aug 2013 07:53:41 +0000 (07:53 +0000)]
Make more helper methods into static functions.

llvm-svn: 188366

11 years agoRemove tab characters.
Craig Topper [Wed, 14 Aug 2013 07:35:18 +0000 (07:35 +0000)]
Remove tab characters.

llvm-svn: 188365

11 years agoMake some helper methods static.
Craig Topper [Wed, 14 Aug 2013 07:34:43 +0000 (07:34 +0000)]
Make some helper methods static.

llvm-svn: 188364

11 years agoUse MVT in more lowering code.
Craig Topper [Wed, 14 Aug 2013 07:04:42 +0000 (07:04 +0000)]
Use MVT in more lowering code.

llvm-svn: 188363