summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* remove function names from comments; NFCSanjay Patel2014-11-121-11/+10
| | | | llvm-svn: 221798
* Fix the iOS build after recent inherited OTHER_LDFLAGS.Greg Clayton2014-11-121-6/+0
| | | | llvm-svn: 221797
* Check for IRGen output when varag is usedFariborz Jahanian2014-11-121-0/+2
| | | | | | in -funknown-anytype mode (in lldb use). llvm-svn: 221796
* Return the number of read bytes in MemoryObject::readBytes.Rafael Espindola2014-11-125-24/+38
| | | | | | | Returning more information will allow BitstreamReader to be simplified a bit and changed to read 64 bits at a time. llvm-svn: 221794
* Revert part of the PIC tests (TLS part)Justin Hibbits2014-11-121-1/+1
| | | | | | | This change actually wasn't warranted for -O0, and the new changes prove it and break the build. llvm-svn: 221793
* Fix thet tests.Justin Hibbits2014-11-122-2/+2
| | | | | | | I seem to have missed the update I made for changing 'flag_pic' to "PIC Level". Mea culpa. llvm-svn: 221792
* Add support for small-model PIC for PowerPC.Justin Hibbits2014-11-1212-84/+153
| | | | | | | | | | | | | | | | | | | | 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
* FIx a bug with PC-register handling in a RA register.Justin Hibbits2014-11-121-0/+1
| | | | | | | | | | | 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
* Improve PowerPC unwind supportJustin Hibbits2014-11-126-19/+47
| | | | | | | | | | | | | | | | | 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
* Add an alternative CFA type.Justin Hibbits2014-11-124-48/+115
| | | | | | | | | | | | | | | | | | | 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
* Add powerpc support for the test suite.Justin Hibbits2014-11-121-0/+6
| | | | | | Reviewed by Ed Maste at MeetBSD. llvm-svn: 221787
* Update for llvm api change.Rafael Espindola2014-11-121-1/+1
| | | | llvm-svn: 221786
* Reduce code duplication a bit. NFC.Rafael Espindola2014-11-122-11/+6
| | | | llvm-svn: 221785
* Simplify code a bit by passing StreamFile to the BitstreamCursor constructor.Rafael Espindola2014-11-123-8/+4
| | | | llvm-svn: 221784
* Fix the test.Rafael Espindola2014-11-121-2/+10
| | | | | | It was broken since r221708. llvm-svn: 221783
* Fixing more -Wcast-qual warnings; NFC.Aaron Ballman2014-11-122-6/+14
| | | | llvm-svn: 221782
* Fixing a -Wcast-qual warning; NFC.Aaron Ballman2014-11-121-2/+3
| | | | llvm-svn: 221781
* [mips][micromips] Add predicate 'InMicroMips' at CodeGen patterns for ↵Zoran Jovanovic2014-11-122-1/+26
| | | | | | | | microMIPS instructions Differential Revision: http://reviews.llvm.org/D6198 llvm-svn: 221780
* [x86] Start improving the matching of unpck instructions based on testChandler Carruth2014-11-123-15/+13
| | | | | | | | 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
* [ASan] Skip dump_instruction_bytes test on non-x86 targetsJay Foad2014-11-121-2/+2
| | | | | | | | | | | | | | 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
* [ASan] Skip ptrace test on non-x86 targetsJay Foad2014-11-121-2/+1
| | | | | | | | | | | | | | | | 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
* [x86] Clean up a bunch of vector shuffle tests with my script. Notably,Chandler Carruth2014-11-124-65/+69
| | | | | | | removes windows line endings and other noise. This is in prelude to making substantive changes to these tests. llvm-svn: 221776
* MCDisassembler::getInstruction():: Prune also "\param Region", since it was ↵NAKAMURA Takumi2014-11-121-1/+0
| | | | | | removed in r221751. [-Wdocumentation] llvm-svn: 221775
* AVX-512: Intrinsics for ERIElena Demikhovsky2014-11-128-94/+180
| | | | | | | | | 3 instructions: vrcp28, vrsqrt28, vexp2, only vector forms. Intrinsics include SAE (Suppres All Exceptions) parameter. http://reviews.llvm.org/D6214 llvm-svn: 221774
* Reverts r221772 which fails testsJingyue Wu2014-11-123-106/+12
| | | | llvm-svn: 221773
* Disable indvar widening if arithmetics on the wider type are more expensiveJingyue Wu2014-11-123-12/+106
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Mark TypeDecls used in explicit destructor calls as referenced.Nico Weber2014-11-122-0/+14
| | | | | | Fixes PR21221. Patch by Axel Naumann, test by me. llvm-svn: 221771
* Delete dead code. NFC.Rafael Espindola2014-11-121-6/+0
| | | | llvm-svn: 221770
* delete => delete[] for arrays.Richard Trieu2014-11-122-5/+5
| | | | llvm-svn: 221769
* [PowerPC] Add vec_vsx_ld and vec_vsx_st intrinsicsBill Schmidt2014-11-124-6/+165
| | | | | | | | | | | | | | | | | | 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
* [PowerPC] Add vec_vsx_ld and vec_vsx_st intrinsicsBill Schmidt2014-11-127-12/+145
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Merge StreamableMemoryObject into MemoryObject.Rafael Espindola2014-11-126-63/+51
| | | | | | | | | Every MemoryObject is a StreamableMemoryObject since the removal of StringRefMemoryObject, so just merge the two. I will clean up the MemoryObject interface in the upcoming commits. llvm-svn: 221766
* Mark TypeDecls used in member initializers as referenced.Nico Weber2014-11-122-0/+13
| | | | | | | | | | | | | | | | | | Without this, -Wunused-local-typedef would incorrectly warn on the two typedefs in this program: void foo() { struct A {}; struct B : public A { typedef A INHERITED; B() : INHERITED() {} typedef B SELF; B(int) : SELF() {} }; } llvm-svn: 221765
* clang-format a few lines, fixes one 80col violation. nfc.Nico Weber2014-11-121-6/+5
| | | | llvm-svn: 221764
* Fix non-variadic function_ref cases to match r221753David Blaikie2014-11-121-4/+16
| | | | llvm-svn: 221763
* Don't duplicate name in comments. NFC.Rafael Espindola2014-11-122-40/+33
| | | | llvm-svn: 221762
* Revert "Use a function_ref now that it works (r221753)."Rafael Espindola2014-11-121-2/+2
| | | | | | | | This reverts commit r221756. David Blaikie pointed out it was unsafe. llvm-svn: 221761
* Enable armv7 core file writing for Mach-O binaries. Jason Molenda2014-11-121-3/+4
| | | | | | | The problems with the dyld all image infos struct seems to be specific to arm64. llvm-svn: 221760
* Remove unused method. NFC.Rafael Espindola2014-11-123-22/+0
| | | | llvm-svn: 221759
* Make readBytes pure virtual. Every real implementation has it.Rafael Espindola2014-11-122-20/+2
| | | | llvm-svn: 221758
* Remove unused method. NFC.Rafael Espindola2014-11-124-8/+1
| | | | llvm-svn: 221757
* Use a function_ref now that it works (r221753).Rafael Espindola2014-11-121-2/+2
| | | | llvm-svn: 221756
* Remove the now unused StringRefMemoryObject.h.Rafael Espindola2014-11-127-75/+0
| | | | llvm-svn: 221755
* Try a different workaround for GCC 4.7.2 lambda capture bug. The previousRichard Smith2014-11-121-7/+8
| | | | | | workaround took us from wrong-code to ICE. llvm-svn: 221754
* Ensure function_refs are copyable even from non-const referencesDavid Blaikie2014-11-123-2/+34
| | | | | | | | | | | | | | | | | | A subtle bug was found where attempting to copy a non-const function_ref lvalue would actually invoke the generic forwarding constructor (as it was a closer match - being T& rather than the const T& of the implicit copy constructor). In the particular case this lead to a dangling function_ref member (since it had referenced the function_ref passed by value to its ctor, rather than the outer function_ref that was still alive) SFINAE the converting constructor to not be considered if the copy constructor is available and demonstrate that this causes the copy to refer to the original functor, not to the function_ref it was copied from. (without the code change, the test would fail as Y would be referencing X and Y() would see the result of the mutation to X, ie: 2) llvm-svn: 221753
* Update for llvm API change.Rafael Espindola2014-11-121-4/+2
| | | | llvm-svn: 221752
* Pass an ArrayRef to MCDisassembler::getInstruction.Rafael Espindola2014-11-1217-113/+95
| | | | | | | | | | | | With this patch MCDisassembler::getInstruction takes an ArrayRef<uint8_t> instead of a MemoryObject. Even on X86 there is a maximum size an instruction can have. Given that, it seems way simpler and more efficient to just pass an ArrayRef to the disassembler instead of a MemoryObject and have it do a virtual call every time it wants some extra bytes. llvm-svn: 221751
* Instantiate exception specifications when instantiating function types (otherRichard Smith2014-11-1215-241/+423
| | | | | | | | | | | | | | | | | | | | | | | | | | | than the type of a function declaration). We previously didn't instantiate these at all! This also covers the pathological case where the only mention of a parameter pack is within the exception specification; this gives us a second way (other than alias templates) to reach the horrible state where a type contains an unexpanded pack, but its canonical type does not. This is a re-commit of r219977: r219977 was reverted in r220038 because it hit a wrong-code bug in GCC 4.7.2. (That's gcc.gnu.org/PR56135, and affects any implicit lambda-capture of 'this' within a template.) r219977 was a re-commit of r217995, r218011, and r218053: r217995 was reverted in r218058 because it hit a rejects-valid bug in MSVC. (Incorrect overload resolution in the presence of using-declarations.) It was re-committed in r219977 with a workaround for the MSVC rejects-valid. r218011 was a workaround for an MSVC parser bug. (Incorrect desugaring of unbraced range-based for loop). llvm-svn: 221750
* Revert "Update for LLVM API change in r221024"Duncan P. N. Exon Smith2014-11-122-2/+2
| | | | | | This reverts commit r221073 to match upstream revert in r221711. llvm-svn: 221749
* PR21536: Fix a corner case where we'd get confused by a pack expanding into theRichard Smith2014-11-122-2/+18
| | | | | | | penultimate parameter of a template parameter list, where the last parameter is itself a pack, and build a bogus empty final pack argument. llvm-svn: 221748
OpenPOWER on IntegriCloud