summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fixed a warning in PlatformiOSSimulator where GetSDKDirectory was hiding ↵Greg Clayton2013-10-302-4/+4
| | | | | | recently added virtual function. Renamed GetSDKDirectory to GetSDKsDirectory to fix the issue. GetSDKsDirectory is a better fit because it finds the directory that contains all SDKs, not the current one. llvm-svn: 193707
* Add {start,end}with_lower methods to StringRef.Rui Ueyama2013-10-303-5/+53
| | | | | | | | | startswith_lower is ocassionally useful and I think worth adding. endwith_lower is added for completeness. Differential Revision: http://llvm-reviews.chandlerc.com/D2041 llvm-svn: 193706
* [ARM] NEON instructions were erroneously decoded from certain invalid encodingsArtyom Skrobov2013-10-302-20/+28
| | | | llvm-svn: 193705
* <rdar://problem/13308704>Enrico Granata2013-10-301-1/+1
| | | | | | | | | Fixing a problem where ValueObject::GetPointeeData() would not accept "partial" valid reads (i.e. asking for 10 items and getting only 5 back) While suboptimal, this situation is not a flat-out failure and could well be caused by legit scenarios, such as hitting a page boundary Among others, this allows data formatters to print char* buffers allocated under libgmalloc llvm-svn: 193704
* [msandr] Add check-before-write optimization.Evgeniy Stepanov2013-10-301-7/+21
| | | | | | | | Replace blind store with check-before-store to avoid unnecessary memory stores. Patch by Qin Zhao. llvm-svn: 193703
* clang-cl: Parse the /arch, /Yu and /Fp options (PR17736)Hans Wennborg2013-10-302-0/+4
| | | | | | We don't support these options, but should at least parse them. llvm-svn: 193702
* R600: Custom lower f32 = uint_to_fp i64Tom Stellard2013-10-303-4/+42
| | | | llvm-svn: 193701
* [Sanitizer] Update comment in sanitizer_symbolizer.hAlexey Samsonov2013-10-301-13/+7
| | | | llvm-svn: 193700
* DwarfDebug: Change Abbreviations member from pointer to referenceDavid Blaikie2013-10-302-10/+10
| | | | llvm-svn: 193699
* fix RST reference in Writing an LLVM PassBenjamin Kramer2013-10-301-1/+1
| | | | | | | | | | Currently, instead of showing up as link, it is rendered as ...of FunctionPass <writing-an-llvm-pass-FunctionPass>. The... PR17733. Patch by Tay Ray Chuan! llvm-svn: 193698
* [Sanitizer] Use SpinMutex for Symbolizer initialization (per dvyukov's ↵Alexey Samsonov2013-10-303-27/+19
| | | | | | suggestion) llvm-svn: 193697
* Add #include of raw_ostream.h to MipsSEISelLowering.cppHans Wennborg2013-10-301-0/+1
| | | | | | | | Fixing this Windows build error: ..\lib\Target\Mips\MipsSEISelLowering.cpp(997) : error C2027: use of undefined type 'llvm::raw_ostream' llvm-svn: 193696
* [mips][msa] Correct definition of bins[lr] and CHECK-DAG-ize related testsDaniel Sanders2013-10-305-105/+182
| | | | llvm-svn: 193695
* make ConstantRange::signExtend() optimalNuno Lopes2013-10-302-0/+8
| | | | | | the case [x, INT_MIN) was not handled optimally llvm-svn: 193694
* [mips][msa] Added support for matching bmnz, bmnzi, bmz, and bmzi from ↵Daniel Sanders2013-10-3010-190/+496
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | normal IR (i.e. not intrinsics) Also corrected the definition of the intrinsics for these instructions (the result register is also the first operand), and added intrinsics for bsel and bseli to clang (they already existed in the backend). These four operations are mostly equivalent to bsel, and bseli (the difference is which operand is tied to the result). As a result some of the tests changed as described below. bitwise.ll: - bsel.v test adapted so that the mask is unknown at compile-time. This stops it emitting bmnzi.b instead of the intended bsel.v. - The bseli.b test now tests the right thing. Namely the case when one of the values is an uimm8, rather than when the condition is a uimm8 (which is covered by bmnzi.b) compare.ll: - bsel.v tests now (correctly) emits bmnz.v instead of bsel.v because this is the same operation (see MSA.txt). i8.ll - CHECK-DAG-ized test. - bmzi.b test now (correctly) emits equivalent bmnzi.b with swapped operands because this is the same operation (see MSA.txt). - bseli.b still emits bseli.b though because the immediate makes it distinguishable from bmnzi.b. vec.ll: - CHECK-DAG-ized test. - bmz.v tests now (correctly) emits bmnz.v with swapped operands (see MSA.txt). - bsel.v tests now (correctly) emits bmnz.v with swapped operands (see MSA.txt). llvm-svn: 193693
* [AArch64] Add support for NEON scalar floating-point compare instructions.Chad Rosier2013-10-304-15/+304
| | | | llvm-svn: 193692
* [AArch64] Add support for NEON scalar floating-point compare instructions.Chad Rosier2013-10-309-37/+780
| | | | llvm-svn: 193691
* Refactor the AVX512 intrinsics. Cluster the intrinsics into the appropriate ↵Cameron McInally2013-10-301-82/+104
| | | | | | vector extension class within the .td file. llvm-svn: 193690
* Rehash but don't grow when full of tombstones.Howard Hinnant2013-10-301-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This problem was found and fixed by José Fonseca in March 2011 for SmallPtrSet, committed r128566. But as far as I can tell, all other llvm hash tables retain the same problem: the bucket count can grow without bound while size() remains near constant by repeated insert/erase cycles that tend to fill the container with tombstones. Here is a demo that has been reduced to a trivial case: int main() { llvm::DenseSet<unsigned> d; for (unsigned i = 0; i < 0xFFFFFFF; ++i) { d.insert(i); d.erase(i); } } While the container size() never grows above 1, the bucket count grows like this: nb = 64 nb = 128 nb = 256 nb = 512 nb = 1024 nb = 2048 nb = 4096 nb = 8192 nb = 16384 nb = 32768 nb = 65536 nb = 131072 nb = 262144 nb = 524288 nb = 1048576 nb = 2097152 nb = 4194304 nb = 8388608 nb = 16777216 nb = 33554432 nb = 67108864 nb = 134217728 nb = 268435456 The above program currently consumes a few GB ram. This patch brings the memory consumption down by several orders of magnitude, and keeps the bucket count at 64 for the above test. llvm-svn: 193689
* Avoid diagnosing twice on non-x86 targetsAlp Toker2013-10-301-8/+10
| | | | | | The PowerPC and ARM native builders spotted this. llvm-svn: 193688
* [mips][msa] Added support for matching bins[lr]i.[bhwd] from normal IR (i.e. ↵Daniel Sanders2013-10-3012-135/+411
| | | | | | | | | | | | | | | | | not intrinsics) This required correcting the definition of the bins[lr]i intrinsics because the result is also the first operand. It also required removing the (arbitrary) check for 32-bit immediates in MipsSEDAGToDAGISel::selectVSplat(). Currently using binsli.d with 2 bits set in the mask doesn't select binsli.d because the constant is legalized into a ConstantPool. Similar things can happen with binsri.d with more than 10 bits set in the mask. The resulting code when this happens is correct but not optimal. llvm-svn: 193687
* Fix triple / REQUIRES in test from r193685Alp Toker2013-10-301-1/+2
| | | | llvm-svn: 193686
* Recover instead of crashing on MS assembly when no target is loadedAlp Toker2013-10-303-6/+18
| | | | | | | It's possible to embed the frontend in applications that haven't initialized backend targets so we need to handle this condition gracefully. llvm-svn: 193685
* clang-format: Fix indenting corner case with comment and else.Daniel Jasper2013-10-302-1/+9
| | | | | | | | | | | | | | | | | | | | | | Before: if (a) { f(); } // or else .. else { g(); } After: if (a) { f(); } // or else .. else { g(); } llvm-svn: 193684
* clang-format: Fix whitespaces in include directives.Daniel Jasper2013-10-303-4/+14
| | | | | | | | | | | | | | Before (clang-format wouldn't change): #include "a.h" #include<a> After: #include "a.h" #include <a> This fixes llvm.org/PR16151. llvm-svn: 193683
* [mips][msa] Combine binsri-like DAG of AND and OR into equivalent VSELECTDaniel Sanders2013-10-302-0/+272
| | | | | | | | | | | | | | | (or (and $a, $mask), (and $b, $inverse_mask)) => (vselect $mask, $a, $b). where $mask is a constant splat. This allows bitwise operations to make use of bsel. It's also a stepping stone towards matching bins[lr], and bins[lr]i from normal IR. Two sets of similar tests have been added in this commit. The bsel_* functions test the case where binsri cannot be used. The binsr_*_i functions will start to use the binsri instruction in the next commit. llvm-svn: 193682
* [mips] MipsSETargetLowering now reports DAGCombiner changes when using ↵Daniel Sanders2013-10-301-1/+9
| | | | | | | | -debug-only=mips-isel No test since -debug output is intended for developers and not end-users. llvm-svn: 193681
* [mips][msa] Added support for matching splat.[bhw] from normal IR (i.e. not ↵Daniel Sanders2013-10-304-59/+101
| | | | | | | | | | intrinsics) splat.d is implemented but this subtest is currently disabled. This is because it is difficult to match the appropriate IR on MIPS32. There is a patch under review that should help with this so I hope to enable the subtest soon. llvm-svn: 193680
* Make thunk this/return adjustment ABI-specific. Also, fix the return ↵Timur Iskhodzhanov2013-10-3010-156/+305
| | | | | | | | adjustment when using -cxx-abi microsoft Reviewed at http://llvm-reviews.chandlerc.com/D2026 llvm-svn: 193679
* clang-format: fix for \r\r\n produced in multiline block commentsDaniel Jasper2013-10-302-1/+13
| | | | | | Patch by Christopher Olsen. Thank you! llvm-svn: 193678
* Revert "SelectionDAG: Teach the legalizer to split SETCC if VSELECT needs ↵Juergen Ributzka2013-10-304-87/+9
| | | | | | | | splitting too." Now Hexagon and SystemZ are not happy with it :-( llvm-svn: 193677
* SelectionDAG: Teach the legalizer to split SETCC if VSELECT needs splitting too.Juergen Ributzka2013-10-304-9/+87
| | | | | | | | | | | | | | | | | | | | The Type Legalizer recognizes that VSELECT needs to be split, because the type is to wide for the given target. The same does not always apply to SETCC, because less space is required to encode the result of a comparison. As a result VSELECT is split and SETCC is unrolled into scalar comparisons. This commit fixes the issue by checking for VSELECT-SETCC patterns in the DAG Combiner. If a matching pattern is found, then the result mask of SETCC is promoted to the expected vector mask type for the given target. This mask has usually the same size as the VSELECT return type (except for Intel KNL). Now the type legalizer will split both VSELECT and SETCC. This allows the following X86 DAG Combine code to sucessfully detect the MIN/MAX pattern. This fixes PR16695, PR17002, and <rdar://problem/14594431>. Reviewed by Nadav llvm-svn: 193676
* Reformat Makefile. No other changes.Bill Wendling2013-10-301-4/+3
| | | | llvm-svn: 193675
* [mips] Delete unused functions.Akira Hatanaka2013-10-301-10/+0
| | | | llvm-svn: 193674
* [mips] Compute stack alignment on the fly.Akira Hatanaka2013-10-303-7/+3
| | | | llvm-svn: 193673
* Reformat code with clang-format.Josh Magee2013-10-302-42/+46
| | | | | | Differential Revision: http://llvm-reviews.chandlerc.com/D2057 llvm-svn: 193672
* PR17731: When determining whether a tag and a non-tag were declared in the sameRichard Smith2013-10-302-2/+62
| | | | | | | scope, be careful about function-scope declarations (which are not declared in their semantic context). llvm-svn: 193671
* [asan] Fix syscall hooks build on Android.Evgeniy Stepanov2013-10-304-9/+23
| | | | llvm-svn: 193670
* StackProtector.h: Fix trailing comments for doxygen. [-Wdocumentation]NAKAMURA Takumi2013-10-301-8/+8
| | | | | | s!//<!///<! llvm-svn: 193669
* Trailing whitespace in a comment line.NAKAMURA Takumi2013-10-301-1/+1
| | | | llvm-svn: 193668
* [santiizer] Disable sincos interceptor in OSX.Evgeniy Stepanov2013-10-301-1/+1
| | | | llvm-svn: 193667
* <rdar://problem/15143022>Enrico Granata2013-10-301-0/+1
| | | | | | | CFNumberRef is toll-free bridged to NSNumber We can use the same summary formatter for both types llvm-svn: 193666
* Minor efficiency refactor related to 193661. No functional change.Warren Hunt2013-10-301-4/+2
| | | | llvm-svn: 193665
* Activating latent test case for r193661.Warren Hunt2013-10-301-3/+3
| | | | llvm-svn: 193664
* <rdar://problem/15045059>Enrico Granata2013-10-303-0/+56
| | | | | | | One of the things that dynamic typing affects is the count of children a type has Clear out the flag that makes us blindly believe the children count when a dynamic type change is detected llvm-svn: 193663
* [ELF] Implement minimal support for .eh_frame_hdr.Michael J. Spencer2013-10-3013-79/+195
| | | | llvm-svn: 193662
* Fixing code gen to handle microsoft layouts for which size % alignment Warren Hunt2013-10-291-0/+3
| | | | | | != 0 llvm-svn: 193661
* Debug Info: code clean up.Manman Ren2013-10-292-3/+5
| | | | | | | | | | Use EmitLabelOffsetDifference for handling on darwin platform when non-darwin platforms use EmitLabelPlusOffset. Also fix a bug in EmitLabelOffsetDifference where the size is hard-coded to 4 even though Size is passed in as an argument. llvm-svn: 193660
* <rdar://problem/15296388>Enrico Granata2013-10-291-9/+21
| | | | | | | | | | Fix a crasher that would occur if one tried to read memory as characters of some size != 1, e.g. x -f c -s 10 buffer This commit tries to do the right thing and uses the byte-size as the number of elements, unless both are specified and the number of elements is != 1 In this latter case (e.g. x -f c -s 10 -c 3 buffer) one could multiply the two and read 30 characters, but it seems a stretch in mind reading. llvm-svn: 193659
* Debug Info: support for DW_FORM_ref_addr.Manman Ren2013-10-296-3/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | To support ref_addr, we calculate the section offset of a DIE (i.e. offset of a DIE from beginning of the debug info section). The Offset field in DIE is currently CU-relative. To calculate the section offset, we add a DebugInfoOffset field in CompileUnit to store the offset of a CU from beginning of the debug info section. We set the value in DwarfUnits::computeSizeAndOffset for each CompileUnit. A helper function DIE::getCompileUnit is added to return the CU DIE that the input DIE belongs to. We also add a map CUDieMap in DwarfDebug to help finding the CU for a given CU DIE. For a cross-referenced DIE, we first find the CU DIE it belongs to with getCompileUnit, then we use CUDieMap to get the corresponding CU for the CU DIE. Adding the section offset of the CU with the CU-relative offset of a DIE gives us the seciton offset of the DIE. We correctly emit ref_addr with relocation using EmitLabelPlusOffset when doesDwarfUseRelocationsAcrossSections is true. This commit handles the emission of DW_FORM_ref_addr when we have an attribute with FORM_ref_addr. A follow-on patch will start using ref_addr when adding a DIEEntry. This commit will be tested and verified in the follow-on patch. Reviewed off-list by Eric, Thanks. llvm-svn: 193658
OpenPOWER on IntegriCloud