summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [libFuzzer] remove a couple of reduntant includesKostya Serebryany2017-09-092-2/+0
| | | | llvm-svn: 312848
* RegAllocFast: Cleanup; NFCMatthias Braun2017-09-093-301/+298
| | | | | | | | | | | | | - Use range based for - Variable names should start with upper case - Add `const` - Change class name to match filename - Fix doxygen comments - Use MCPhysReg instead of unsigned - Use references instead of pointers where things cannot be nullptr - Misc coding style improvements llvm-svn: 312846
* RegAllocFast: Move vector to class level to avoid reallocation; NFCMatthias Braun2017-09-091-2/+5
| | | | llvm-svn: 312845
* RegAllocFast: Remove write-only set; NFCMatthias Braun2017-09-091-10/+0
| | | | llvm-svn: 312844
* PPC: Don't select lxv/stxv for insufficiently aligned stack slots.Kyle Butt2017-09-092-1/+57
| | | | | | | | | | | | | | The lxv/stxv instructions require an offset that is 0 % 16. Previously we were selecting lxv/stxv for loads and stores to the stack where the offset from the slot was a multiple of 16, but the stack slot was not 16 or more byte aligned. When the frame gets lowered these transform to r(1|31) + slot + offset. If slot is not aligned, slot + offset may not be 0 % 16. Now we require 16 byte or more alignment for select lxv/stxv to stack slots. Includes a testcase that shows both sufficiently and insufficiently aligned stack slots. llvm-svn: 312843
* Catch more cases with -Wenum-compareRichard Trieu2017-09-093-4/+51
| | | | | | | Treat typedef enum as named enums instead of anonymous enums. Anonymous enums are ignored by the warning, so previously, typedef enums were ignored as well. llvm-svn: 312842
* Plugins: fix resolution ambiguity in PDB pluginSaleem Abdulrasool2017-09-091-22/+24
| | | | | | | | | A clang change caused the inclusion of `llvm::Type` and `lldb_private::Type` to be pulled into the global namespace due to the `using namespace llvm;` and `using namespace lldb_private;`. Explicitly qualify the `Type` to resolve the ambiguity. NFC llvm-svn: 312841
* bpf: fix test failures due to previous bpf change of assembly code syntaxYonghong Song2017-09-095-6/+6
| | | | | Signed-off-by: Yonghong Song <yhs@fb.com> llvm-svn: 312840
* Implement vload_half{,n} and vload(half)Jan Vesely2017-09-086-20/+132
| | | | | | | | | | v2: add vload(half) as well make helpers amdgpu specific (NVPTX uses different private AS numbering) use clang builtin on clang >= 6 Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Reviewed-by: Tom Stellard <tstellar@redhat.com> llvm-svn: 312839
* vstore: Cleanup and add vstore(half)Jan Vesely2017-09-086-12/+45
| | | | | | | | | | Add missing undefs Make helpers amdgpu specific (NVPTX uses different numbering for private AS) Use clang builtins on clang >= 6 Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Reviewed-by: Tom Stellard <tstellar@redhat.com> llvm-svn: 312838
* configure.py: Simplify compatibility sourcesJan Vesely2017-09-081-6/+4
| | | | | | | | Just add the SOURCE_X.Y list to the list of sources if X.Y is the current llvm version. Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Reviewed-by: Tom Stellard <tstellar@redhat.com> llvm-svn: 312837
* [AMDGPU] Remove unused function. NFCI.Davide Italiano2017-09-081-9/+0
| | | | llvm-svn: 312836
* CodeGen: correct arguments for NSFastEnumerationSaleem Abdulrasool2017-09-083-17/+49
| | | | | | | | | | | | | | | When performing a NSFastEnumeration, the compiler synthesizes a call to `countByEnumeratingWithState:objects:count:` where the `count` parameter is of type `NSUInteger` and the return type is a `NSUInteger`. We would previously always use a `UnsignedLongTy` for the `NSUInteger` type. On 32-bit targets, `long` is 32-bits which is the same as `unsigned int`. Most 64-bit targets are LP64, where `long` is 64-bits. However, on LLP64 targets, such as Windows, `long` is 32-bits. Introduce new `getNSUIntegerType` and `getNSIntegerType` helpers to allow us to determine the correct type for the `NSUInteger` type. Wire those through into the generation of the message dispatch to the selector. llvm-svn: 312835
* [TargetTransformInfo] Remove the extra "default" in a switch that all enum ↵Guozhi Wei2017-09-081-4/+2
| | | | | | | | values has been covered. In function TargetTransformInfo::getInstructionCost, all enum values in the switch statement has been covered, so the default is unnecessary, and may cause error with option -Werror,-Wcovered-switch-default, so remove it. llvm-svn: 312834
* bpf: proper print imm64 expression in inst printerYonghong Song2017-09-082-2/+4
| | | | | | | | | | | | | | Fixed an issue in printImm64Operand where if the value is an expression, print out the expression properly. Currently, it will print r1 = <MCOperand Expr:(tx_port)>ll With the patch, the printout will be r1 = tx_port Suggested-by: Jiong Wang <jiong.wang@netronome.com> Signed-off-by: Yonghong Song <yhs@fb.com> Acked-by: Alexei Starovoitov <ast@kernel.org> llvm-svn: 312833
* [TargetTransformInfo] Add a new public interface getInstructionCostGuozhi Wei2017-09-086-562/+662
| | | | | | | | | | | | | | | | | | | | | | | | | | Current TargetTransformInfo can support throughput cost model and code size model, but sometimes we also need instruction latency cost model in different optimizations. Hal suggested we need a single public interface to query the different cost of an instruction. So I proposed following interface: enum TargetCostKind { TCK_RecipThroughput, ///< Reciprocal throughput. TCK_Latency, ///< The latency of instruction. TCK_CodeSize ///< Instruction code size. }; int getInstructionCost(const Instruction *I, enum TargetCostKind kind) const; All clients should mainly use this function to query the cost of an instruction, parameter <kind> specifies the desired cost model. This patch also provides a simple default implementation of getInstructionLatency. The default getInstructionLatency provides latency numbers for only small number of instruction classes, those latency numbers are only reasonable for modern OOO processors. It can be extended in following ways: Add more detail into this function. Add getXXXLatency function and call it from here. Implement target specific getInstructionLatency function. Differential Revision: https://reviews.llvm.org/D37170 llvm-svn: 312832
* [CMake][runtimes] Use the same configuration for non-target and "default" targetPetr Hosek2017-09-081-97/+106
| | | | | | | | | | | | | | The default host target for builtins and runtimes has special behavior on some platforms, e.g. on Linux both i386 and x86_64 targets are being built. Specifying "default" as a target name should lead to the same behavior, which wasn't the case in the past. This patch unifies the configuration between the non-target and "default" target to produce the same behavior by moving the default configuration into a function that can be used from both paths. Differential Revision: https://reviews.llvm.org/D37450 llvm-svn: 312831
* Reinstall the patch "Use EmitPointerWithAlignment to get alignment ↵Wei Mi2017-09-082-8/+38
| | | | | | | | | | | | | | information of the pointer used in atomic expr". This is to fix PR34347. EmitAtomicExpr now only uses alignment information from Type, instead of Decl, so when the declaration of an atomic variable is marked to have the alignment equal as its size, EmitAtomicExpr doesn't know about it and will generate libcall instead of atomic op. The patch uses EmitPointerWithAlignment to get the precise alignment information. Differential Revision: https://reviews.llvm.org/D37310 llvm-svn: 312830
* Migrate llvm-symbolizer tests to not use %TDavid Blaikie2017-09-0814-28/+69
| | | | | | (context around the %T removal here: https://reviews.llvm.org/D35396 ) llvm-svn: 312828
* Revert "Prevent DCE on __lsan_is_turned_off and re-enable test case"Francis Ricci2017-09-081-0/+2
| | | | | | | | | This doesn't fix the failing test. Leave in the comment and the attribute, since the used attribute is still required. This partially reverts commit r312824 llvm-svn: 312827
* [llvm-cov] Use portable output redirection in a testVedant Kumar2017-09-081-1/+1
| | | | | | A follow-up to a test fix (r312825). llvm-svn: 312826
* [llvm-cov] Try to appease a Windows botVedant Kumar2017-09-081-1/+1
| | | | | | | | | | | | | | | | On a Windows bot, I see a FileCheck error where the source being matched over no longer exists, i.e it seems like it's FileCheck'ing some stale output: http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win/builds/4747 You can see "// CHECK: [[@LINE]]|{{ +}Marker at 19:3 = 1" in the FileCheck stderr, but that CHECK line doesn't exist. Remove the input file to FileCheck before running the test, to try and appease the bot. llvm-svn: 312825
* Prevent DCE on __lsan_is_turned_off and re-enable test caseFrancis Ricci2017-09-082-3/+3
| | | | | | | | | | | | | | | Summary: -dead_strip in ld64 strips weak interface symbols, which I believe is most likely the cause of this test failure. Re-enable after marking the interface function as used. Reviewers: alekseyshl, kubamracek, kcc Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D37635 llvm-svn: 312824
* Remove a redundant local variable.Rui Ueyama2017-09-081-2/+1
| | | | llvm-svn: 312823
* AMDGPU: Start using !con operatorMatt Arsenault2017-09-081-14/+12
| | | | | | | | | | | | | We have a lot of operand definition work essentially producing every valid permutation of operands to workaround builiding operand lists based on the instruction features. Apparently tablegen already has a mostly undocumented operator to concat dags which simplies this. Convert one simple place to use this. The BUF instruction definitions have much more complicated logic that can be totally rewritten now. llvm-svn: 312822
* [llvm-cov] Disable name-compression in a test binaryVedant Kumar2017-09-081-0/+0
| | | | | | | | | | This should fix the lld bot: The Buildbot has detected a new failure on builder llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast while building cfe. Full details are available at: http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/16993 llvm-svn: 312821
* Handle empty dynamic lists.Rafael Espindola2017-09-084-1/+21
| | | | llvm-svn: 312820
* AMDGPU: Recompute scc livenessMatt Arsenault2017-09-082-1/+67
| | | | | | | | The various scalar bit operations set SCC, so one is erased or moved it needs to be recomputed. Not sure why the existing tests don't fail on this. llvm-svn: 312819
* [Coverage] Precise region termination with deferred regions (reapply)Vedant Kumar2017-09-088-22/+276
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current coverage implementation doesn't handle region termination very precisely. Take for example an `if' statement with a `return': void f() { if (true) { return; // The `if' body's region is terminated here. } // This line gets the same coverage as the `if' condition. } If the function `f' is called, the line containing the comment will be marked as having executed once, which is not correct. The solution here is to create a deferred region after terminating a region. The deferred region is completed once the start location of the next statement is known, and is then pushed onto the region stack. In the cases where it's not possible to complete a deferred region, it can safely be dropped. Testing: lit test updates, a stage2 coverage-enabled build of clang This is a reapplication but there are no changes from the original commit. With D36813, the segment builder in llvm will be able to handle deferred regions correctly. llvm-svn: 312818
* [Coverage] Build sorted and unique segmentsVedant Kumar2017-09-085-53/+380
| | | | | | | | | | | | | | | | | | | | | | | | A coverage segment contains a starting line and column, an execution count, and some other metadata. Clients of the coverage library use segments to prepare line-oriented reports. Users of the coverage library depend on segments being unique and sorted in source order. Currently this is not guaranteed (this is why the clang change which introduced deferred regions was reverted). This commit documents the "unique and sorted" condition and asserts that it holds. It also fixes the SegmentBuilder so that it produces correct output in some edge cases. Testing: I've added unit tests for some edge cases. I've also checked that the new SegmentBuilder implementation is fully covered. Apart from running check-profile and the llvm-cov tests, I've successfully used a stage1 llvm-cov to prepare a coverage report for an instrumented clang binary. Differential Revision: https://reviews.llvm.org/D36813 llvm-svn: 312817
* [llvm-cov] Fix a lifetime issueVedant Kumar2017-09-088-18/+32
| | | | | | | This fixes an issue where a std::string was moved to a constructor which accepted a StringRef. llvm-svn: 312816
* [Coverage] Define LineColPair for convenience. NFC.Vedant Kumar2017-09-082-7/+6
| | | | llvm-svn: 312815
* [Coverage] Report errors when reading malformed source regionsVedant Kumar2017-09-089-18/+60
| | | | | | | | | | | | | Each source region has a start and end location. Report an error when the end location does not precede the begin location. The old lineExecutionCounts.covmapping test actually had a buggy source region in it. This commit introduces a regenerated copy of the coverage and moves the old copy to malformedRegions.covmapping, for a test. Differential Revision: https://reviews.llvm.org/D37387 llvm-svn: 312814
* [llvm-cov] Unify region marker placement between text/html modesVedant Kumar2017-09-088-31/+79
| | | | | | | | | | | | Make sure that the text and html emitters always emit the same set of region markers, and avoid emitting redundant markers for line segments which don't end on the line they start on. This is related to D35925, and depends on D36014 Differential Revision: https://reviews.llvm.org/D36020 llvm-svn: 312813
* Handle lazy symbols is computeIsPreemptible.Rafael Espindola2017-09-083-1/+21
| | | | llvm-svn: 312812
* Add some documentation on how to generate the documentation.Aaron Ballman2017-09-081-0/+18
| | | | llvm-svn: 312811
* Delete empty file test/CodeGenCXX/atomic-align.cpp after the revert at rL312805.Wei Mi2017-09-081-0/+0
| | | | llvm-svn: 312810
* [x86] Fix GCC pedantic warnings about default arguments for lambdas.Chandler Carruth2017-09-081-6/+6
| | | | llvm-svn: 312809
* Simplify. NFC.Rafael Espindola2017-09-081-1/+1
| | | | | | We handled all undefined symbols before this. llvm-svn: 312808
* Simplify as this runs before copy relocations are created.Rafael Espindola2017-09-081-7/+1
| | | | llvm-svn: 312807
* If --dynamic-list is given, only those symbols are preemptible.Rafael Espindola2017-09-086-5/+123
| | | | | | | | | | | | | This allows combining --dynamic-list and version scripts too. The version script controls which symbols are visible, and --dynamic-list controls which of those are preemptible. Unlike previous versions, undefined symbols are still considered preemptible, which was the issue breaking the cfi tests. This fixes pr34053. llvm-svn: 312806
* Revert rL312801 since it generated some calls from libatomic and broke some ↵Wei Mi2017-09-082-38/+8
| | | | | | tests. llvm-svn: 312805
* [X86] Simplify the slow-incdec test and add test cases with optsize.Craig Topper2017-09-081-73/+60
| | | | | | I think we want to consider using inc/dec with optsize. llvm-svn: 312804
* Restrict debuginfo-tests to native configurations.Paul Robinson2017-09-081-0/+3
| | | | llvm-svn: 312803
* [SLPVectorizer] Add struct InstructionsState that holds information about ↵Dinar Temirbulatov2017-09-081-88/+120
| | | | | | | | | | | | analysis of vector to be vectorized. Reviewers: spatel, mzolotukhin, mkuper, hfinkel, RKSimon, filcab, ABataev, davide Subscribers: llvm-commits, rengolin Differential Revision: https://reviews.llvm.org/D37212 llvm-svn: 312802
* Use EmitPointerWithAlignment to get alignment information of the pointer ↵Wei Mi2017-09-082-8/+38
| | | | | | | | | | | | | | used in atomic expr. This is to fix PR34347. EmitAtomicExpr now only uses alignment information from Type, instead of Decl, so when the declaration of an atomic variable is marked to have the alignment equal as its size, EmitAtomicExpr doesn't know about it and will generate libcall instead of atomic op. The patch uses EmitPointerWithAlignment to get the precise alignment information. Differential Revision: https://reviews.llvm.org/D37310 llvm-svn: 312801
* Fix a bug for rL312641.Wei Mi2017-09-082-4/+42
| | | | | | | | | | | rL312641 Allowed llvm.memcpy/memset/memmove to be tail calls when parent function return the intrinsics's first argument. However on arm-none-eabi platform, llvm.memcpy will be expanded to __aeabi_memcpy which doesn't have return value. The fix is to check the libcall name after expansion to match "memcpy/memset/memmove" before allowing those intrinsic to be tail calls. llvm-svn: 312799
* Add _Float16 as a C/C++ source language typeSjoerd Meijer2017-09-081-3/+3
| | | | | | | Pacify the windows builder; fixed the new test as on Windows some additional attributes are printed. llvm-svn: 312798
* Preserve existing regs when adding pristines to LivePhysRegs/LiveRegUnitsKrzysztof Parzyszek2017-09-085-15/+90
| | | | | | Differential Revision: https://reviews.llvm.org/D37600 llvm-svn: 312797
* Currently lld creates a single section to collect all commons. There is no wayDmitry Mikulin2017-09-0815-71/+243
| | | | | | | | | | | | | | | to separate commons based on file name patterns. The following linker script construct does not work because commons are allocated before section placement is done and the only synthesized BssSection that holds all commons has no file associated with it: SECTIONS { .common_0 : { *file0.o(COMMON) }} This patch changes the allocation of commons to create a section per common symbol and let the section logic do the layout. Differential revision: https://reviews.llvm.org/D37489 llvm-svn: 312796
OpenPOWER on IntegriCloud