summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [ELF] Implements -z relro: create an ELF "PT_GNU_RELRO" segment header in ↵George Rimar2015-11-2417-52/+349
| | | | | | | | | | | | | | | | | the object. Partial (-z relro) and full (-z relro, -z now) relro cases are implemented. Partial relro: The ELF sections are reordered so that the ELF internal data sections (.got, .dtors, etc.) precede the program's data sections (.data and .bss). .got is readonly, .got.plt is still writeable. Full relro: Supports all the features of partial RELRO, .got.plt is also readonly. Differential revision: http://reviews.llvm.org/D14218 llvm-svn: 253967
* [ELF2] - Optimization for R_X86_64_GOTTPOFF relocation.George Rimar2015-11-244-1/+127
| | | | | | | | R_X86_64_GOTTPOFF is not always requires GOT entries. Some relocations can be converted to local ones. Differential revision: http://reviews.llvm.org/D14713 llvm-svn: 253966
* Let SelectionDAG start to use probability-based interface to add successors.Cong Hou2015-11-2423-277/+335
| | | | | | | | | | | | | | | | | | | | | | | | The patch in http://reviews.llvm.org/D13745 is broken into four parts: 1. New interfaces without functional changes. 2. Use new interfaces in SelectionDAG, while in other passes treat probabilities as weights. 3. Use new interfaces in all other passes. 4. Remove old interfaces. This the second patch above. In this patch SelectionDAG starts to use probability-based interfaces in MBB to add successors but other MC passes are still using weight-based interfaces. Therefore, we need to maintain correct weight list in MBB even when probability-based interfaces are used. This is done by updating weight list in probability-based interfaces by treating the numerator of probabilities as weights. This change affects many test cases that check successor weight values. I will update those test cases once this patch looks good to you. Differential revision: http://reviews.llvm.org/D14361 llvm-svn: 253965
* [TableGen] Use std::remove_if instead of manually coded loops that call ↵Craig Topper2015-11-241-74/+74
| | | | | | erase multiple times. NFC llvm-svn: 253964
* [TableGen] Use the other version of EnforceVectorEltTypeIs inside the ↵Craig Topper2015-11-241-15/+1
| | | | | | TypeSet version of EnforceVectorEltTypeIs to reduce duplicated code. NFC llvm-svn: 253963
* [TableGen] Fix formatting and use logical OR. NFCCraig Topper2015-11-241-2/+1
| | | | llvm-svn: 253962
* [TableGen] Use std::set_intersection to merge TypeSets. NFCCraig Topper2015-11-241-9/+8
| | | | llvm-svn: 253961
* [TableGen] Use SmallVector::assign instead of a resize and replace element.Craig Topper2015-11-241-2/+1
| | | | llvm-svn: 253960
* [CMake] When disabling PIC, also pass -fno-pie when linking if it is supported.Chris Bieneman2015-11-241-0/+4
| | | | | | Building clang with -fno-pie generates slightly faster code. In my not-very-rigorous testing I saw about a 4% speed up using the clang test-suite sources. llvm-svn: 253959
* Reduce the stack usage per recursive step when RecursiveASTVisitor cannot ↵Richard Smith2015-11-241-21/+16
| | | | | | perform data recursion. llvm-svn: 253958
* [ELF/AArch64] Add support for R_AARCH64_ADR_GOT_PAGE and ↵Igor Kudrin2015-11-244-3/+58
| | | | | | | | | | | R_AARCH64_LD64_GOT_LO12_NC. With these relocations, it is now possible to build a simple "hello world" program for AArch64 Debian. Differential revision: http://reviews.llvm.org/D14917 llvm-svn: 253957
* Revert change that accidentally snuck into r253955.Craig Topper2015-11-241-2/+1
| | | | llvm-svn: 253956
* [TableGen] Use array_pod_sort. NFCCraig Topper2015-11-241-2/+3
| | | | llvm-svn: 253955
* Add a FunctionImporter helper to perform summary-based cross-module function ↵Mehdi Amini2015-11-248-1/+429
| | | | | | | | | | | | | | | | | importing Summary: This is a helper to perform cross-module import for ThinLTO. Right now it is importing naively every possible called functions. Reviewers: tejohnson Subscribers: dexonsmith, llvm-commits Differential Revision: http://reviews.llvm.org/D14914 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 253954
* Add findFunctionInfoList() accessor to FunctionInfoIndex.Mehdi Amini2015-11-241-0/+5
| | | | | | | | | | | | | | | Summary: This allows to query for a function in the map without creating an entry, allowing to use a const FunctionInfoIndex. Reviewers: tejohnson Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D14912 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 253953
* [X86][SSE] Detect AVG pattern during instruction combine for SSE2/AVX2/AVX512BW.Cong Hou2015-11-244-4/+803
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch detects the AVG pattern in vectorized code, which is simply c = (a + b + 1) / 2, where a, b, and c have the same type which are vectors of either unsigned i8 or unsigned i16. In the IR, i8/i16 will be promoted to i32 before any arithmetic operations. The following IR shows such an example: %1 = zext <N x i8> %a to <N x i32> %2 = zext <N x i8> %b to <N x i32> %3 = add nuw nsw <N x i32> %1, <i32 1 x N> %4 = add nuw nsw <N x i32> %3, %2 %5 = lshr <N x i32> %N, <i32 1 x N> %6 = trunc <N x i32> %5 to <N x i8> and with this patch it will be converted to a X86ISD::AVG instruction. The pattern recognition is done when combining instructions just before type legalization during instruction selection. We do it here because after type legalization, it is much more difficult to do pattern recognition based on many instructions that are doing type conversions. Therefore, for target-specific instructions (like X86ISD::AVG), we need to take care of type legalization by ourselves. However, as X86ISD::AVG behaves similarly to ISD::ADD, I am wondering if there is a way to legalize operands and result types of X86ISD::AVG together with ISD::ADD. It seems that the current design doesn't support this idea. Tests are added for SSE2, AVX2, and AVX512BW and both i8 and i16 types of variant vector sizes. Differential revision: http://reviews.llvm.org/D14761 llvm-svn: 253952
* ScopInfo: Split hasAffineMemoryAccesses() into multiple functions [NFC]Tobias Grosser2015-11-242-115/+187
| | | | | | This makes the overall code more readable. llvm-svn: 253951
* [modules] Add -cc1 flag -fmodules-embed-all-files.Richard Smith2015-11-247-3/+28
| | | | | | | | | | | | | | This flag causes all files that were read by the compilation to be embedded into a produced module file. This is useful for distributed build systems that use an include scanning system to determine which files are "needed" by a compilation, and only provide those files to remote compilation workers. Since using a module can require any file that is part of that module (or anything it transitively includes), files that are not found by an include scanner can be required in a regular build using explicit modules. With this flag, only files that are actually referenced by transitively-#included files are required to be present on the build machine. llvm-svn: 253950
* Remove DataRecursiveASTVisitor; it no longer serves any purpose, since it's ↵Richard Smith2015-11-246-32/+10
| | | | | | just an alias for RecursiveASTVisitor. llvm-svn: 253949
* Use data recursion in RecursiveASTVisitor when traversing Stmt and Expr nodes.Richard Smith2015-11-244-2912/+137
| | | | | | | | | | | | | | | | | | When RAV traverses a Stmt or Expr node, if the corresponding Traverse* functions have not been overridden, it will now use data recursion to walk those nodes. We arrange this to be an unobservable optimization to RAV subclasses, and to gracefully degrade as parts of the visitation are overridden with functions that might observe the visitation. For instance, if an RAV subclass overrides TraverseUnaryNot, we will ensure that there are real recursive stack frames for those traversals, but we'll use data recursion for all other traversals. This removes the need for DataRecursiveASTVisitor, and for the 'shouldUseDataRecursionFor' extension point, both of which are removed by this change. llvm-svn: 253948
* Do not attempt to include CUDA headers during the test.Artem Belevich2015-11-241-1/+1
| | | | llvm-svn: 253947
* [coroutines] Build a CoroutineBodyStmt when finishing parsing a coroutine, ↵Richard Smith2015-11-244-10/+180
| | | | | | and form the initial_suspend, final_suspend, and get_return_object calls. llvm-svn: 253946
* [DIE] Make DIE.h NDEBUG conditional-free.Davide Italiano2015-11-242-52/+18
| | | | | | Switch dump()/print() method definitions to LLVM_DUMP_METHOD instead. llvm-svn: 253945
* [CMake] export_executable_symbols also needs to add -rdynamic to the linker ↵Chris Bieneman2015-11-241-0/+4
| | | | | | | | flags on Darwin Without -rdynamic LLVM built with LTO fails to pass "check" due to loadable modules failing. llvm-svn: 253944
* sync up InstrProfData.inc with masterXinliang David Li2015-11-241-5/+3
| | | | llvm-svn: 253943
* Use make_unique [NFC]Xinliang David Li2015-11-241-1/+2
| | | | llvm-svn: 253942
* Remove trailing space in commentsXinliang David Li2015-11-241-5/+3
| | | | llvm-svn: 253941
* minimize test case but still show the bugSanjay Patel2015-11-241-31/+14
| | | | llvm-svn: 253940
* CodeGenFunction.h: Prune a \param in r253926. [-Wdocumentation]NAKAMURA Takumi2015-11-231-3/+0
| | | | llvm-svn: 253938
* NFC. Fixing my consistently incorrect spelling.Chris Bieneman2015-11-232-12/+12
| | | | llvm-svn: 253937
* NFC. Fixing my consistently incorrect spelling.Chris Bieneman2015-11-231-4/+4
| | | | llvm-svn: 253936
* added comment (using freshly updated update_llc_test_checks.py)Sanjay Patel2015-11-231-0/+1
| | | | llvm-svn: 253935
* [x86] add test to show suboptimal codegen (PR25554)Sanjay Patel2015-11-231-0/+46
| | | | llvm-svn: 253934
* [RuntimeDyld] Avoid unused-private-field warning; NFCSanjoy Das2015-11-231-1/+5
| | | | | | Fixes the no asserts -Werror,-Wunused-private-field build. llvm-svn: 253933
* clang-c/Index.h: Move \brief. [-Wdocumentation]NAKAMURA Takumi2015-11-231-11/+11
| | | | llvm-svn: 253932
* [WebAssembly] Don't print the types of memory_size and grow_memoryDan Gohman2015-11-231-4/+4
| | | | | | This matches the current spec, for now. llvm-svn: 253931
* [PGO] In llvm-profdata text dump, add comment lines as annotationsXinliang David Li2015-11-231-1/+4
| | | | llvm-svn: 253930
* Fix test failure introduced by r253859. I believe that the new behaviorDaniel Jasper2015-11-231-6/+3
| | | | | | | | | in r253859 makes sense in many cases and thus, I have fixed the implementation of calculateChangedRanges instead. It had a FIXME anyway saying that it was unecessarily using shiftedCodePosition which resulted in O(N^2) runtime. llvm-svn: 253929
* Revert r253923.Krzysztof Parzyszek2015-11-235-217/+117
| | | | | | Per Eric's request. llvm-svn: 253928
* findDeadCallerSavedReg needs to pay attention to calling conventionAndy Ayers2015-11-2312-45/+85
| | | | | | | | | | Caller saved regs differ between SysV and Win64. Use the tail call available set to scavenge from. Refactor register info to create new helper to get at tail call GPRs. Added a new test case for windows. Fixed up a number of X64 tests since now RCX is preferred over RDX on SysV. Differential Revision: http://reviews.llvm.org/D14878 llvm-svn: 253927
* Preserve exceptions information during calls code generation.Samuel Antao2015-11-2310-41/+143
| | | | | | | | | | | This patch changes the generation of CGFunctionInfo to contain the FunctionProtoType if it is available. This enables the code generation for call instructions to look into this type for exception information and therefore generate better quality IR - it will not create invoke instructions for functions that are know not to throw. llvm-svn: 253926
* [WebAssembly] Don't special-case call operand order.Dan Gohman2015-11-234-12/+12
| | | | | | | | With the '=' suffix now indicating which operands are output operands, it's no longer as important to distinguish between a call's inputs and its outputs using operand ordering, so we can go back to printing them in the normal order. llvm-svn: 253925
* Don't create implicit comdats.Rafael Espindola2015-11-231-2/+0
| | | | | | comdats are explicitly represented for some time now. llvm-svn: 253924
* Add new vector types for 512-, 1024- and 2048-bit vectorsKrzysztof Parzyszek2015-11-235-117/+217
| | | | | | | | Those types are needed to implement instructions for Hexagon Vector Extensions (HVX): 16x32, 16x64, 32x16, 32x32, 32x64, 64x8, 64x16, 64x32, 128x8, 128x16, 256x8, 512x1, and 1024x1. llvm-svn: 253923
* [WebAssembly] Suffix output operands with '='.Dan Gohman2015-11-2327-297/+300
| | | | | | | | This distinguishes input operands from output operands. This is something of a syntactic experiment to see whether the mild amount of clutter this adds is outweighed by the extra information it conveys to the reader. llvm-svn: 253922
* [Support] Add optional argument to SaturatingAdd() and SaturatingMultiply() ↵Nathan Slingerland2015-11-232-8/+90
| | | | | | | | | | | | | | to indicate that overflow occurred Summary: Adds the ability for callers to detect when saturation occurred on the result of saturating addition/multiplication. Reviewers: davidxl, silvas, rsmith Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D14931 llvm-svn: 253921
* [RuntimeDyld] Don't allocate unnecessary stub buffer spaceSanjoy Das2015-11-237-4/+81
| | | | | | | | | | | | | | Summary: For relocation types that are known to not require stub functions, there is no need to allocate extra space for the stub functions. Reviewers: lhames, reames, maksfb Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D14676 llvm-svn: 253920
* [RuntimeDyld] Add bounds checking to SectionEntry::advanceStubOffsetSanjoy Das2015-11-233-7/+19
| | | | | | | | | | | | | | Summary: Change SectionEntry to keep track of the size of its underlying allocation, and use that to bounds check advanceStubOffset. Reviewers: lhames, andrew.w.kaylor, reames Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D14675 llvm-svn: 253919
* [RuntimeDyld] Add accessors to `SectionEntry`; NFCSanjoy Das2015-11-2312-223/+266
| | | | | | | | | | | | | | | | Summary: Remove naked access to the data members in `SectionEntry` and route accesses through accessor functions. This makes it obvious how the instances of the class are used, and will also facilitate adding bounds checking to `advanceStubOffset` in a later change. Reviewers: lhames, loladiro, andrew.w.kaylor Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D14674 llvm-svn: 253918
* Make utils/update_llc_test_checks.py note that the assertions areJames Y Knight2015-11-23100-1/+106
| | | | | | | | | autogenerated. Also update existing test cases which appear to be generated by it and weren't modified (other than addition of the header) by rerunning it. llvm-svn: 253917
OpenPOWER on IntegriCloud