summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Sema: provide an extension warning for enable_ifSaleem Abdulrasool2016-02-183-0/+54
| | | | | | | Clang implements an enable_if attribute as an extension. Hook up `-Wpedantic` to issue an extension usage warning when __enable_if__ is used. llvm-svn: 261192
* [Parse] Make sure we don't forget to diagnose typos in exprsDavid Majnemer2016-02-182-3/+12
| | | | | | | If ActOn*Op fails, we will forget to diagnose typos in the LHS of expressions. llvm-svn: 261191
* [WebAssembly] Don't use setRequiresStructuredCFG(true).Dan Gohman2016-02-182-40/+32
| | | | | | | | | | | | While we still do want reducible control flow, the RequiresStructuredCFG flag imposes more strict structure constraints than WebAssembly wants. Unsetting this flag enables critical edge splitting and tail merging. Also, disable TailDuplication explicitly, as it doesn't support virtual registers, and was previously only disabled by the RequiresStructuredCFG flag. llvm-svn: 261190
* Revert "LiveIntervalAnalysis: Remove LiveVariables requirement" and ↵Matthias Braun2016-02-186-324/+7
| | | | | | | | | | | | | | | | | | | LiveIntervalTest The commit breaks stage2 compilation on PowerPC. Reverting for now while this is analyzed. I also have to revert the LiveIntervalTest for now as that depends on this commit. Revert "LiveIntervalAnalysis: Remove LiveVariables requirement" This reverts commit r260806. Revert "Remove an unnecessary std::move to fix -Wpessimizing-move warning." This reverts commit r260931. Revert "Fix typo in LiveIntervalTest" This reverts commit r260907. Revert "Add unittest for LiveIntervalAnalysis::handleMove()" This reverts commit r260905. llvm-svn: 261189
* [TableGen,X86] Add NDEBUG check to a variable initialization that's only ↵Craig Topper2016-02-181-0/+2
| | | | | | used by asserts. NFC llvm-svn: 261188
* [TableGen,X86] Remove extra optional operand from RawFrm. RawFrm with 2 ↵Craig Topper2016-02-181-3/+1
| | | | | | immediates is handled by RawFrmImm8/RawFrmImm16. llvm-svn: 261187
* [AMDGPU] Disassembler: Added basic disassembler for AMDGPU targetTom Stellard2016-02-1815-49/+588
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes: - Added disassembler project - Fixed all decoding conflicts in .td files - Added DecoderMethod=“NONE” option to Target.td that allows to disable decoder generation for an instruction. - Created decoding functions for VS_32 and VReg_32 register classes. - Added stubs for decoding all register classes. - Added several tests for disassembler Disassembler only supports: - VI subtarget - VOP1 instruction encoding - 32-bit register operands and inline constants [Valery] One of the point that requires to pay attention to is how decoder conflicts were resolved: - Groups of target instructions were separated by using different DecoderNamespace (SICI, VI, CI) using similar to AssemblerPredicate approach. - There were conflicts in IMAGE_<> instructions caused by two different reasons: 1. dmask wasn’t specified for the output (fixed) 2. There are image instructions that differ only by the number of the address components but have the same encoding by the HW spec. The actual number of address components is determined by the HW at runtime using image resource descriptor starting from the VGPR encoded in an IMAGE instruction. This means that we should choose only one instruction from conflicting group to be the rule for decoder. I didn’t find the way to disable decoder generation for an arbitrary instruction and therefore made a onelinear fix to tablegen generator that would suppress decoder generation when DecoderMethod is set to “NONE”. This is a change that should be reviewed and submitted first. Otherwise I would need to specify different DecoderNamespace for every instruction in the conflicting group. I haven’t checked yet if DecoderMethod=“NONE” is not used in other targets. 3. IMAGE_GATHER decoder generation is for now disabled and to be done later. [/Valery] Patch By: Sam Kolton Differential Revision: http://reviews.llvm.org/D16723 llvm-svn: 261185
* [libFuzzer] fix the libFuzzer bot Kostya Serebryany2016-02-182-2/+2
| | | | llvm-svn: 261184
* Add usage instructions for TypeSystemMap::AddToMap.Jim Ingham2016-02-181-0/+2
| | | | llvm-svn: 261183
* [sanitizer-coverage] allow -fsanitize-coverage=trace-pc w/o any other ↵Kostya Serebryany2016-02-183-57/+70
| | | | | | sanitizer and w/o ...=[func,bb,edge]. This makes this syntax a superset of the GCC's syntax llvm-svn: 261182
* Commit tests missing from r261180.Eric Fiselier2016-02-182-0/+42
| | | | llvm-svn: 261181
* Get <ext/hash_map> working againEric Fiselier2016-02-181-3/+5
| | | | llvm-svn: 261180
* Fix Clang-tidy modernize-use-nullptr warnings; other minor fixes.Eugene Zelenko2016-02-1812-265/+183
| | | | llvm-svn: 261179
* [sanitizer-coverage] add a deprecation warning for -fsanitize-coverage=[1234]Kostya Serebryany2016-02-172-20/+25
| | | | llvm-svn: 261178
* Add upport for bitcast in the C API echo testAmaury Sechet2016-02-171-1/+18
| | | | llvm-svn: 261177
* [WebAssembly] Disable register stackification and coloring when not optimizingDerek Schuff2016-02-173-11/+23
| | | | | | | | | | | | | | These passes are optimizations, and should be disabled when not optimizing. Also create an MCCodeGenInfo so the opt level is correctly plumbed to the backend pass manager. Also remove the command line flag for disabling register coloring; running llc with -O0 should now be useful for debugging, so it's not necessary. Differential Revision: http://reviews.llvm.org/D17327 llvm-svn: 261176
* AArch64: always clear kill flags up to last eliminated copyTim Northover2016-02-172-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | After r261154, we were only clearing flags if the known-zero register was originally live-in to the basic block, but we have to do it even if not when more than one COPY has been eliminated, otherwise the user of the first COPY may still have <kill> marked. E.g. BB#N: %X0 = COPY %XZR STRXui %X0<kill>, <fi#0> %X0 = COPY %XZR STRXui %X0<kill>, <fi#1> We can eliminate both copies, X0 is not live-in, but we must clear the kill on the first store. Unfortunately, I've been unable to come up with a non-fragile test for this. I've only seen it in the wild with regalloc-created spills, and attempts to reproduce that in a reasonable way run afoul of COPY coalescing. Even volatile asm clobbers were moved around. Should fix the aarch64 bot though. llvm-svn: 261175
* Add support for memory operations (load/store/gep) in C API echo testAmaury Sechet2016-02-174-0/+98
| | | | | | | | | | | | Summary: As per title. Reviewers: bogner, chandlerc, echristo, dblaikie, joker.eph, Wallbraker Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D17245 llvm-svn: 261174
* [DebugInfoPDB] A few cleanups on PDB Variant class.Zachary Turner2016-02-172-4/+6
| | | | | | | | Also implements the PDBSymbolCompilandEnv::getValue() method, which until now had been unimplemented specifically because variant did not support string values. llvm-svn: 261173
* Move LLVMCreateTargetData and LLVMDisposeTargetData together. NFCAmaury Sechet2016-02-172-8/+8
| | | | llvm-svn: 261172
* Don't crash w/ a diagnostic range containing a null byteDavid Majnemer2016-02-172-3/+11
| | | | | | | | We prematurely ended the line at the null byte which caused us to crash down stream because we tried to reason about columns beyond the end of the line. llvm-svn: 261171
* [readobj] Remove uneeded braces in case statement.Michael J. Spencer2016-02-171-2/+1
| | | | llvm-svn: 261170
* Make sure functions are generated even there is no global in the C API echo testAmaury Sechet2016-02-171-6/+10
| | | | llvm-svn: 261169
* DwarfDebug: Don't drop the DIExpression just because a variable isAdrian Prantl2016-02-172-3/+71
| | | | | | | | | | | described by an immediate. Found via http://reviews.llvm.org/D16867 Thanks to Paul Robinson for pointing this out. <rdar://problem/24456528> llvm-svn: 261168
* DbgVariable: Add an accessor for the common case of a single expressionAdrian Prantl2016-02-172-2/+5
| | | | | | | | belonging to a single DBG_VALUE instruction. NFC llvm-svn: 261167
* Apple simulator platforms don't have a shared cache to load Objective-C ↵Enrico Granata2016-02-171-8/+2
| | | | | | | | | | | class information from This code was doing the right thing for the iOS simulator, but not other simulator platforms Fix it by making the warning not happen for all platforms whose name ends in "-simulator" Since this code lives in AppleObjCRuntimeV2.cpp, this already only applies to Apple platforms by definition, so I am not too worried about conflicts with other vendors llvm-svn: 261165
* Add support for global variables in the C API echo testAmaury Sechet2016-02-172-32/+147
| | | | | | | | | | | | Summary: As per title Reviewers: bogner, chandlerc, echristo, dblaikie, joker.eph, Wallbraker Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D17249 llvm-svn: 261164
* Add 'nopartial' qualifier for availability attributes.Manman Ren2016-02-1715-29/+124
| | | | | | | | | | | | | | | | | | | | | | An optional nopartial can be placed after the platform name. int bar() __attribute__((availability(macosx,nopartial,introduced=10.12)) When deploying back to a platform version prior to when the declaration was introduced, with 'nopartial', Clang emits an error specifying that the function is not introduced yet; without 'nopartial', the behavior stays the same: the declaration is `weakly linked`. A member is added to the end of AttributeList to save the location of the 'nopartial' keyword. A bool member is added to AvailabilityAttr. The diagnostics for 'nopartial' not-yet-introduced is handled in the same way as we handle unavailable cases. Reviewed by Doug Gregor and Jordan Rose. rdar://23791325 llvm-svn: 261163
* [modules] Cache 'acceptable decl' lookups for namespaces. In projects withRichard Smith2016-02-173-0/+28
| | | | | | | | | | | | | | | | thousands of modules, each of which declares the same namespace, linearly scanning the redecl chain looking for a visible declaration (once for each leaf module, for each use) performs very poorly. Namespace visibility can only decrease when we leave a module during a module build step, and we never care *which* visible declaration of a namespace we find, so we can cache this very effectively. This results in a 35x speedup on one of our internal build steps (2m -> 3.5s), but is hard to unit test because it requires a very large number of modules. Ideas for a test appreciated! No functionality change intended other than the speedup. llvm-svn: 261161
* [sanitizer-coverage] implement -fsanitize-coverage=trace-pc. This is similar ↵Kostya Serebryany2016-02-1712-9/+101
| | | | | | to trace-bb, but has a different API. We already use the equivalent flag in GCC for Linux kernel fuzzing. We may be able to use this flag with AFL too llvm-svn: 261159
* PR26606: Make abort_on_error.cc test more portable.Alexey Samsonov2016-02-172-2/+2
| | | | llvm-svn: 261157
* NFC: Fix formatingAmaury Sechet2016-02-171-4/+4
| | | | llvm-svn: 261156
* Fix warning on build without assertsTim Northover2016-02-171-4/+5
| | | | llvm-svn: 261155
* AArch64: improve redundant copy elimination.Tim Northover2016-02-172-44/+69
| | | | | | | | | | | | | | | Mostly, this fixes the bug that if the CBZ guaranteed Xn but Wn was used, we didn't sort out the use-def chain properly. I've also made it check more than just the last instruction for a compatible CBZ (so it can cope without fallthroughs). I'd have liked to do that separately, but it's helps writing the test. Finally, I removed some custom loops in favour of MachineInstr helpers and refactored the control flow to flatten it and avoid possibly quadratic iterations in blocks with many copies. NFC for these, just a general tidy-up. llvm-svn: 261154
* [DebugInfoPDB] Raise getSymIndexId() up to PDBSymbolZachary Turner2016-02-1732-30/+3
| | | | | | | | | | | | | Every symbol, no matter what it's tag is, supports the method getSymIndexId(). However, this was being forwarded on every concrete symbol type, so if someone had a PDBSymbol that they didn't know what type it was (or simply didn't have an instance of the concrete symbol type), they would not be able to get its index id. This patch moves the method up to PDBSymbol, so that no matter what type of object you have, you can always get its id. llvm-svn: 261153
* [DebugInfoPDB] Teach Variant to support string types.Zachary Turner2016-02-173-24/+64
| | | | | | | | | | The IDiaSymbol::getValue() method returns a variant. Until now, I had never encountered a string value, so the Variant wrapper did not support VT_BSTR. Now we have need to support string values, so this patch just adds support for one extra type to Variant. llvm-svn: 261152
* [CodeGen] Fix an assert in CodeGenFunction::EmitFunctionEpilogAkira Hatanaka2016-02-172-1/+54
| | | | | | | | | | | | | | The assert is triggered because isObjCRetainableType() is called on the canonicalized return type that has been stripped of the typedefs and attributes attached to it. To fix this assert, this commit gets the original return type from CurCodeDecl or BlockInfo and uses it instead of the canoicalized type. rdar://problem/24470031 Differential Revision: http://reviews.llvm.org/D16914 llvm-svn: 261151
* Fix PR26608: Make sanitizer_common tests more portable.Alexey Samsonov2016-02-173-5/+6
| | | | llvm-svn: 261150
* [LIR] Avoid turning non-temporal stores into memsetHaicheng Wu2016-02-172-0/+35
| | | | | | This is to fix PR26645. llvm-svn: 261149
* [TSan] PR26609: Fix two test cases.Alexey Samsonov2016-02-172-4/+4
| | | | llvm-svn: 261148
* Debug Info: Teach LdStHasDebugValue() (Local.cpp) about DIExpressions.Adrian Prantl2016-02-172-17/+76
| | | | | | | | | | | This function is used to check whether a dbg.value intrinsic has already been inserted, but without comparing the DIExpression, it would erroneously fire on split aggregates and only the first scalar would survive. Found via http://reviews.llvm.org/D16867. <rdar://problem/24456528> llvm-svn: 261145
* Add static/const qualifiers to methods. NFC.George Burgess IV2016-02-171-3/+3
| | | | | | Split out this change as requested in D14933. llvm-svn: 261144
* [libFuzzer] don't timeout when loading the corpus. Be a bit more verbose ↵Kostya Serebryany2016-02-172-1/+7
| | | | | | when loading large corpus. llvm-svn: 261143
* [tests] Slightly improve a fix in r260669.Alexey Samsonov2016-02-172-2/+4
| | | | llvm-svn: 261142
* Mention 'notail' attribute in 3.9 release notes.Akira Hatanaka2016-02-171-0/+6
| | | | llvm-svn: 261141
* Create masked gather and scatter intrinsics in Loop Vectorizer.Elena Demikhovsky2016-02-175-112/+500
| | | | | | | | | Loop vectorizer now knows to vectorize GEP and create masked gather and scatter intrinsics for random memory access. The feature is enabled on AVX-512 target. Differential Revision: http://reviews.llvm.org/D15690 llvm-svn: 261140
* Fix load alignement when unpacking aggregates structsAmaury Sechet2016-02-172-12/+53
| | | | | | | | | | | | Summary: Store and loads unpacked by instcombine do not always have the right alignement. This explicitely compute the alignement and set it. Reviewers: dblaikie, majnemer, reames, hfinkel, joker.eph Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D17326 llvm-svn: 261139
* Revert "Reapply commit r258404 with fix."David Majnemer2016-02-172-249/+24
| | | | | | This reverts commit r259357, it caused PR26629. llvm-svn: 261137
* Enable SafeStack for CloudABI.Ed Schouten2016-02-173-0/+12
| | | | | | | | | | | | | | | | | Summary: I've got a patchset in my home directory to integrate support for SafeStack into CloudABI's C library. All of the CloudABI unit tests still seem to pass. Pretty sweet! This change adds the necessary changes to Clang to make -fsanitize=safe-stack work on CloudABI. Without it, passing this command line flag throws an error. Reviewers: eugenis, samsonov Differential Revision: http://reviews.llvm.org/D17243 llvm-svn: 261135
* [ObjCARC] Handle ARCInstKind::ClaimRV in OptimizeIndividualCalls.Frederic Riss2016-02-172-0/+48
| | | | | | | | | When support for objc_unsafeClaimAutoreleasedReturnValue has been added to the ARC optimizer in r258970, one case was missed which would lead the optimizer to execute an llvm_unreachable. In this case, just handle ClaimRV in the same way we handle RetainRV. llvm-svn: 261134
OpenPOWER on IntegriCloud