Commit Graph

186515 Commits

Author SHA1 Message Date
Ahmed Bougacha 55a333d89b Add fortified (__*_chk) library functions to TLI (NFC)
One of them (__memcpy_chk) was already there, the others were checked
by comparing function names.
Note that the fortified libfuncs are now part of TLI, but are always
available, because they aren't generated, only optimized into the
non-checking versions.

Differential Revision: http://reviews.llvm.org/D6179

llvm-svn: 221817
2014-11-12 21:23:34 +00:00
Richard Smith 38af8561f9 Update Clang's SD-6 support to match N4200 (except for __has_cpp_attribute,
which we don't yet implement).

llvm-svn: 221816
2014-11-12 21:16:38 +00:00
Ed Maste 6e494780c5 Add decorator for failing null dereference test on FreeBSD
llvm.org/pr21550

llvm-svn: 221815
2014-11-12 20:53:04 +00:00
Timur Iskhodzhanov c80bd6974e Add a test for PR21528 to make sure ASan C++ symbolization doesn't regress
llvm-svn: 221814
2014-11-12 20:37:57 +00:00
Timur Iskhodzhanov 0e76a16200 Temporary fix for PR21528 - use mangled C++ function names in COFF debug info to un-break ASan on Windows
llvm-svn: 221813
2014-11-12 20:21:20 +00:00
Timur Iskhodzhanov a11b32b7e5 [COFF] Make it clearer that the symbols subsection holds function display name rather than just name
llvm-svn: 221812
2014-11-12 20:10:09 +00:00
Cameron McInally 73a6bca32b [AVX512] Add integer shift by immediate intrinsics.
llvm-svn: 221811
2014-11-12 19:58:54 +00:00
Jason Molenda d8cc6bc325 Use PRIx64 when printing addr_t's. Don't need to force full-width 0 padding
with addresses that aren't designed to be column-aligned across multiple lines.

llvm-svn: 221810
2014-11-12 19:51:43 +00:00
Jason Molenda 043109ee21 Update comments to reflect how the new methods ended up being written.
llvm-svn: 221809
2014-11-12 19:49:58 +00:00
Aaron Ballman 9f8d2b0995 Changing a StringRef::begin() call into StringRef::data(); NFC.
llvm-svn: 221808
2014-11-12 19:43:13 +00:00
Zachary Turner a32d2cecba [ProcessWindows] Improve support for launching processes.
This sends notifications for module load / unload to the process
plugin, and also manages the state more accurately during the
loading sequence.

Similar work by Virgile Bello was referenced during the
implementation of this patch.

Differential Revision: http://reviews.llvm.org/D6224

llvm-svn: 221807
2014-11-12 19:31:56 +00:00
Zachary Turner d6a7b63f26 [ProcessWindows] Simplify the DebugDelegate interface.
Due to a previous multi-threaded design involving message
passing, we used message classes to pass event information
to the delegate.  Since the multi-threaded design has gone
away, we simplify this by passing event arguments as direct
function parameters, which is more clear and easier to
understand.

llvm-svn: 221806
2014-11-12 19:31:39 +00:00
Ed Maste b5363110c7 Avoid crash in InitializeNonZerothFrame if no module found
After r221575 TestCallStopAndContinue and TestCallThatRestarts started
crashing on FreeBSD with a null temporary_module_sp in
RegisterContextLLDB::InitializeNonZerothFrame().

llvm-svn: 221805
2014-11-12 18:49:54 +00:00
Rafael Espindola 0c9aa57a07 Use the return of readBytes to find out if we are at the end of the stream.
This allows the removal of isObjectEnd and opens the way for reading 64 bits
at a time.

llvm-svn: 221804
2014-11-12 18:37:00 +00:00
Kaelyn Takata 98a3ec010a Pass the filter function_ref by value now that r221753 fixes the bug
that was preventing pass-by-value from working correctly.

llvm-svn: 221803
2014-11-12 18:34:08 +00:00
Sanjay Patel 4c219fd248 CGSCC should not treat intrinsic calls like function calls (PR21403)
Make the handling of calls to intrinsics in CGSCC consistent: 
they are not treated like regular function calls because they
are never lowered to function calls.

Without this patch, we can get dangling pointer asserts from
the subsequent loop that processes callsites because it already
ignores intrinsics.

See http://llvm.org/bugs/show_bug.cgi?id=21403 for more details / discussion.

Differential Revision: http://reviews.llvm.org/D6124

llvm-svn: 221802
2014-11-12 18:25:47 +00:00
Jingyue Wu a41cf018b8 Fix broken doxygen annotations, NFC
llvm-svn: 221801
2014-11-12 18:25:06 +00:00
Kostya Serebryany 2dd74371b2 [asan] [mips] added support of asan for mips64/mips64el, patch by Kumar Sukhani
llvm-svn: 221800
2014-11-12 18:23:16 +00:00
Jingyue Wu 8a12cea5f1 Disable indvar widening if arithmetics on the wider type are more expensive
Summary:
Reapply r221772. The old patch breaks the bot because the @indvar_32_bit test
was run whether NVPTX was enabled or not.

IndVarSimplify should not widen an indvar if arithmetics on the wider
indvar are more expensive than those on the narrower indvar. For
instance, although NVPTX64 treats i64 as a legal type, an ADD on i64 is
twice as expensive as that on i32, because the hardware needs to
simulate a 64-bit integer using two 32-bit integers.

Split from D6188, and based on D6195 which adds NVPTXTargetTransformInfo.

Fixes PR21148.

Test Plan:
Added @indvar_32_bit that verifies we do not widen an indvar if the arithmetics
on the wider type are more expensive. This test is run only when NVPTX is
enabled.

Reviewers: jholewinski, eliben, meheff, atrick

Reviewed By: atrick

Subscribers: jholewinski, llvm-commits

Differential Revision: http://reviews.llvm.org/D6196

llvm-svn: 221799
2014-11-12 18:09:15 +00:00
Sanjay Patel 7777b50eaf remove function names from comments; NFC
llvm-svn: 221798
2014-11-12 18:07:42 +00:00
Greg Clayton e3a73eb30f Fix the iOS build after recent inherited OTHER_LDFLAGS.
llvm-svn: 221797
2014-11-12 18:05:32 +00:00
Fariborz Jahanian f122f4b99d Check for IRGen output when varag is used
in -funknown-anytype  mode (in lldb use).

llvm-svn: 221796
2014-11-12 17:54:11 +00:00
Rafael Espindola 2d05db49bb Return the number of read bytes in MemoryObject::readBytes.
Returning more information will allow BitstreamReader to be simplified a bit
and changed to read 64 bits at a time.

llvm-svn: 221794
2014-11-12 17:11:16 +00:00
Justin Hibbits 21c5353f54 Revert part of the PIC tests (TLS part)
This change actually wasn't warranted for -O0, and the new changes prove it and
break the build.

llvm-svn: 221793
2014-11-12 16:50:15 +00:00
Justin Hibbits b296c9735e Fix thet tests.
I seem to have missed the update I made for changing 'flag_pic' to "PIC Level".
Mea culpa.

llvm-svn: 221792
2014-11-12 16:40:00 +00:00
Justin Hibbits a88b605721 Add support for small-model PIC for PowerPC.
Summary:
Large-model was added first.  With the addition of support for multiple PIC
models in LLVM, now add small-model PIC for 32-bit PowerPC, SysV4 ABI.  This
generates more optimal code, for shared libraries with less than about 16380
data objects.

Test Plan: Test cases added or updated

Reviewers: joerg, hfinkel

Reviewed By: hfinkel

Subscribers: jholewinski, mcrosier, emaste, llvm-commits

Differential Revision: http://reviews.llvm.org/D5399

llvm-svn: 221791
2014-11-12 15:16:30 +00:00
Justin Hibbits 62cf35b8a3 FIx a bug with PC-register handling in a RA register.
The addition of RegisterNumber introduced a bug where if the PC is stored in a
return address register, such as on ARM and PowerPC, this register number is
retrieved and used, but never checked in the row if it's saved.  Correct this by
setting the variable that's used to the new register number.

Patch by Jason Molenda.

llvm-svn: 221790
2014-11-12 15:14:12 +00:00
Justin Hibbits 89e6f3851e Improve PowerPC unwind support
Summary:
Taking advantage of the new 'CFAIsRegisterDereferenced' CFA register type, add
full stack unwind support to the PowerPC/PowerPC64 ABI.  Also, add a new
register set for powerpc32-on-64, so the register sizes are correct.  This also
requires modifying the ProcessMonitor to add support for non-uintptr_t-sized
register values.

Reviewers: jasonmolenda, emaste

Subscribers: emaste, lldb-commits

Differential Revision: http://reviews.llvm.org/D6183

llvm-svn: 221789
2014-11-12 15:14:08 +00:00
Justin Hibbits 43bcdbde4a Add an alternative CFA type.
Summary:
PowerPC handles the stack chain with the current stack pointer being a pointer
to the backchain (CFA).  LLDB currently has no way of handling this, so this
adds a "CFA is dereferenced from a register" type.

Discussed with Jason Molenda, who also provided the initial patch for this.

Reviewers: jasonmolenda

Reviewed By: jasonmolenda

Subscribers: emaste, lldb-commits

Differential Revision: http://reviews.llvm.org/D6182

llvm-svn: 221788
2014-11-12 15:14:03 +00:00
Justin Hibbits 3cba1c267d Add powerpc support for the test suite.
Reviewed by Ed Maste at MeetBSD.

llvm-svn: 221787
2014-11-12 15:13:58 +00:00
Rafael Espindola fd832395b1 Update for llvm api change.
llvm-svn: 221786
2014-11-12 14:48:44 +00:00
Rafael Espindola de1e5b8dfd Reduce code duplication a bit. NFC.
llvm-svn: 221785
2014-11-12 14:48:38 +00:00
Rafael Espindola af0e40ac0e Simplify code a bit by passing StreamFile to the BitstreamCursor constructor.
llvm-svn: 221784
2014-11-12 14:42:25 +00:00
Rafael Espindola 301396c911 Fix the test.
It was broken since r221708.

llvm-svn: 221783
2014-11-12 14:23:04 +00:00
Aaron Ballman 106fd7bed5 Fixing more -Wcast-qual warnings; NFC.
llvm-svn: 221782
2014-11-12 14:01:17 +00:00
Aaron Ballman 7a7b144117 Fixing a -Wcast-qual warning; NFC.
llvm-svn: 221781
2014-11-12 13:55:27 +00:00
Zoran Jovanovic fd888630b5 [mips][micromips] Add predicate 'InMicroMips' at CodeGen patterns for microMIPS instructions
Differential Revision: http://reviews.llvm.org/D6198

llvm-svn: 221780
2014-11-12 13:30:10 +00:00
Chandler Carruth 0c922fcec5 [x86] Start improving the matching of unpck instructions based on test
cases from Halide folks. This initial step was extracted from
a prototype change by Clay Wood to try and address regressions found
with Halide and the new vector shuffle lowering.

llvm-svn: 221779
2014-11-12 10:05:18 +00:00
Jay Foad 9b70a919db [ASan] Skip dump_instruction_bytes test on non-x86 targets
Summary: This test case is blatantly x86-specific, so skip it on other targets.

Reviewers: kcc, eugenis, earthdok, samsonov

Reviewed By: samsonov

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D6216

llvm-svn: 221778
2014-11-12 09:45:40 +00:00
Jay Foad 854655886b [ASan] Skip ptrace test on non-x86 targets
Summary:
Address sanitization of ptrace(2) is only implemented for x86, so skip
the test on other targets.

Reviewers: kcc, eugenis, earthdok, samsonov

Reviewed By: samsonov

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D6215

llvm-svn: 221777
2014-11-12 09:42:01 +00:00
Chandler Carruth ce6947d4cf [x86] Clean up a bunch of vector shuffle tests with my script. Notably,
removes windows line endings and other noise. This is in prelude to
making substantive changes to these tests.

llvm-svn: 221776
2014-11-12 09:17:15 +00:00
NAKAMURA Takumi c06606a98c MCDisassembler::getInstruction():: Prune also "\param Region", since it was removed in r221751. [-Wdocumentation]
llvm-svn: 221775
2014-11-12 07:42:26 +00:00
Elena Demikhovsky be8808dc3f AVX-512: Intrinsics for ERI
3 instructions: vrcp28, vrsqrt28, vexp2, only vector forms.
Intrinsics include SAE (Suppres All Exceptions) parameter.

http://reviews.llvm.org/D6214

llvm-svn: 221774
2014-11-12 07:31:03 +00:00
Jingyue Wu a48273390c Reverts r221772 which fails tests
llvm-svn: 221773
2014-11-12 07:19:25 +00:00
Jingyue Wu 635a9b14fa Disable indvar widening if arithmetics on the wider type are more expensive
Summary:
IndVarSimplify should not widen an indvar if arithmetics on the wider
indvar are more expensive than those on the narrower indvar. For
instance, although NVPTX64 treats i64 as a legal type, an ADD on i64 is
twice as expensive as that on i32, because the hardware needs to
simulate a 64-bit integer using two 32-bit integers.

Split from D6188, and based on D6195 which adds NVPTXTargetTransformInfo.

Fixes PR21148.

Test Plan:
Added @indvar_32_bit that verifies we do not widen an indvar if the arithmetics
on the wider type are more expensive.

Reviewers: jholewinski, eliben, meheff, atrick

Reviewed By: atrick

Subscribers: jholewinski, llvm-commits

Differential Revision: http://reviews.llvm.org/D6196

llvm-svn: 221772
2014-11-12 06:58:45 +00:00
Nico Weber 83a63877dc Mark TypeDecls used in explicit destructor calls as referenced.
Fixes PR21221. Patch by Axel Naumann, test by me.

llvm-svn: 221771
2014-11-12 04:33:52 +00:00
Rafael Espindola d6bce443d7 Delete dead code. NFC.
llvm-svn: 221770
2014-11-12 04:31:19 +00:00
Richard Trieu b6b141d601 delete => delete[] for arrays.
llvm-svn: 221769
2014-11-12 04:19:57 +00:00
Bill Schmidt 9ec8cea02b [PowerPC] Add vec_vsx_ld and vec_vsx_st intrinsics
This patch enables the vec_vsx_ld and vec_vsx_st intrinsics for
PowerPC, which provide programmer access to the lxvd2x, lxvw4x,
stxvd2x, and stxvw4x instructions.

New code in altivec.h defines these in terms of new builtins, which
are themselves defined in BuiltinsPPC.def.  The builtins are converted
to LLVM intrinsics in CGBuiltin.cpp.  Additional code is added to
builtins-ppc-vsx.c to verify the correct generation of the intrinsics.

Note that I moved the other VSX builtins so all VSX builtins will be
alphabetical in their own section in BuiltinsPPC.def.

There is a companion patch for LLVM.

llvm-svn: 221768
2014-11-12 04:19:56 +00:00
Bill Schmidt 729547847f [PowerPC] Add vec_vsx_ld and vec_vsx_st intrinsics
This patch enables the vec_vsx_ld and vec_vsx_st intrinsics for
PowerPC, which provide programmer access to the lxvd2x, lxvw4x,
stxvd2x, and stxvw4x instructions.

New LLVM intrinsics are provided to represent these four instructions
in IntrinsicsPowerPC.td.  These are patterned after the similar
intrinsics for lvx and stvx (Altivec).  In PPCInstrVSX.td, these
intrinsics are tied to the code gen patterns, with additional patterns
to allow plain vanilla loads and stores to still generate these
instructions.

At -O1 and higher the intrinsics are immediately converted to loads
and stores in InstCombineCalls.cpp.  This will open up more
optimization opportunities while still allowing the correct
instructions to be generated.  (Similar code exists for aligned
Altivec loads and stores.)

The new intrinsics are added to the code that checks for consecutive
loads and stores in PPCISelLowering.cpp, as well as to
PPCTargetLowering::getTgtMemIntrinsic().

There's a new test to verify the correct instructions are generated.
The loads and stores tend to be reordered, so the test just counts
their number.  It runs at -O2, as it's not very effective to test this
at -O0, when many unnecessary loads and stores are generated.

I ended up having to modify vsx-fma-m.ll.  It turns out this test case
is slightly unreliable, but I don't know a good way to prevent
problems with it.  The xvmaddmdp instructions read and write the same
register, which is one of the multiplicands.  Commutativity allows
either to be chosen.  If the FMAs are reordered differently than
expected by the test, the register assignment can be different as a
result.  Hopefully this doesn't change often.

There is a companion patch for Clang.

llvm-svn: 221767
2014-11-12 04:19:40 +00:00