summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Use WeakVH instead of WeakTrackingVH in AliasSetTracker's UnkownInstsSanjoy Das2017-04-262-2/+27
| | | | | | | | | | | | | | | | | | | Summary: In cases where an instruction (a call site, say) is RAUW'ed with some other value (this is possible via the `returned` attribute, amongst other things), we want the slot in UnknownInsts to point to the original Instruction we wanted to track, not the value it got replaced by. Fixes PR32587. Reviewers: davide Subscribers: mcrosier, llvm-commits Differential Revision: https://reviews.llvm.org/D32268 llvm-svn: 301426
* Add a new WeakVH value handle; NFCSanjoy Das2017-04-263-4/+61
| | | | | | | | | | | | | | Summary: WeakVH nulls itself out if the value it was tracking gets deleted, but it does not track RAUW. Reviewers: dblaikie, davide Subscribers: mcrosier, llvm-commits Differential Revision: https://reviews.llvm.org/D32267 llvm-svn: 301425
* Rename WeakVH to WeakTrackingVH; NFCSanjoy Das2017-04-2640-214/+201
| | | | | | | | | | | | | | | | Summary: I plan to use WeakVH to mean "nulls itself out on deletion, but does not track RAUW" in a subsequent commit. Reviewers: dblaikie, davide Reviewed By: davide Subscribers: arsenm, mehdi_amini, mcrosier, mzolotukhin, jfb, llvm-commits, nhaehnle Differential Revision: https://reviews.llvm.org/D32266 llvm-svn: 301424
* Make LLD work even if the current directory is not writable.Rui Ueyama2017-04-262-0/+16
| | | | llvm-svn: 301423
* Move code to emit error messages from Filesystem.cpp to Driver.cpp.Rui Ueyama2017-04-263-14/+11
| | | | | | | | isFileWritable() checked if a file is writable and then emitted an error message if it is not writable. So it did more than the name says. This patch moves error() calls to Driver. llvm-svn: 301422
* [globalisel][tablegen] Fix vector element sizeIgor Breger2017-04-261-1/+1
| | | | | | | | | | | | | | Summary: Fix vector element size. Reviewers: dsanders Reviewed By: dsanders Subscribers: rovka, llvm-commits, kristof.beyls Differential Revision: https://reviews.llvm.org/D32537 llvm-svn: 301421
* [Sema] Avoid using a null type pointer (fixes PR32750)Vedant Kumar2017-04-262-1/+9
| | | | | | | | | | isMicrosoftMissingTypename() uses a Type pointer without first checking that it's non-null. PR32750 reports a case where the pointer is in fact null. This patch adds in a defensive check and a regression test. Differential Revision: https://reviews.llvm.org/D32519 llvm-svn: 301420
* [sampleprof] Drop test dependency on the string hash func (NFC)Vedant Kumar2017-04-263-72/+72
| | | | | | | | | | | | | | The SampleProfWriter emits function information in an order determined by the string hash function. The situation is a bit brittle, because changing the hash function can break the tests. Instead of sorting the function samples to get a relaible ordering (that might be too expensive), make the tests not depend on a particular ordering of function samples. Differential Revision: https://reviews.llvm.org/D32516 llvm-svn: 301419
* [AMDGPU][MC] Added check for truncation of SOPK imm operandDmitry Preobrazhensky2017-04-265-17/+72
| | | | | | | | | | See bug 30827: https://bugs.llvm.org//show_bug.cgi?id=30827 Reviewers: artem.tamazov, vpykhtin Differential Revision: https://reviews.llvm.org/D32535 llvm-svn: 301418
* [OPENMP] Fix failing test.Alexey Bataev2017-04-261-2/+1
| | | | llvm-svn: 301417
* [OPENMP] Fix handling of OpenMP code during template instantiation.Alexey Bataev2017-04-264-95/+218
| | | | | | | | | If some function template is instantiated during handling of OpenMP code, currently it may cause crash of compiler because of trying of capturing variables in non-capturing function scopes. Patch fixes this bug. llvm-svn: 301416
* Use CHECK-NEXT in a test.Rafael Espindola2017-04-261-7/+7
| | | | | | This will simplify a future patch. llvm-svn: 301415
* [ELF] - Remove dead TLS relocations relative code for MIPS and ARMGeorge Rimar2017-04-261-16/+0
| | | | | | | | | | This code was not used because of handleARMTlsRelocation and handleMipsTlsRelocation methods that are called for these platforms instead of regular TLS code. Differential revision: https://reviews.llvm.org/D32355 llvm-svn: 301414
* [AVR] Remove an unused local variableDylan McKay2017-04-261-1/+0
| | | | llvm-svn: 301413
* [x86] change tests to use sext, not zext; NFCSanjay Patel2017-04-261-7/+8
| | | | | | These are intended to exercise D31944, so we need sexts. llvm-svn: 301412
* Fix unused-variable warning caused by r301407.Haojian Wu2017-04-261-2/+0
| | | | llvm-svn: 301411
* [OPENMP] Move handling of threadprivate vars from the stack, NFC.Alexey Bataev2017-04-261-69/+75
| | | | | | | Threadprivate variables do no need to be handled in the Stack of all directives, moving it out for better performance and memory. llvm-svn: 301410
* -Wunguarded-availability should support if (@available) checks in top-levelAlex Lorenz2017-04-263-6/+28
| | | | | | | | | | | | | blocks and lambdas Prior to this commit Clang emitted the old "partial availability" warning for expressions that referred to declarations that were not yet introduced in blocks and lambdas that were not in a function/method. This commit ensures that top-level blocks and lambdas use the new unguarded availability checks. rdar://31835952 llvm-svn: 301409
* [TargetLowering] fix isConstTrueVal to account for build vector truncationSanjay Patel2017-04-262-29/+29
| | | | | | | | | | | | | | Build vectors have magical truncation powers, so we have things like this: v4i1 = BUILD_VECTOR Constant:i32<1>, Constant:i32<1>, Constant:i32<1>, Constant:i32<1> v4i16 = BUILD_VECTOR Constant:i32<1>, Constant:i32<1>, Constant:i32<1>, Constant:i32<1> If we don't truncate the splat node returned by getConstantSplatNode(), then we won't find truth when ZeroOrNegativeOneBooleanContent is the rule. Differential Revision: https://reviews.llvm.org/D32505 llvm-svn: 301408
* Convert LoopRotation to use SimplifyQuery version of SimplifyInstruction. ↵Daniel Berlin2017-04-261-7/+13
| | | | | | Add AssumptionCache, DominatorTree, TLI if available. llvm-svn: 301407
* Convert SimplifyInstructions to use the SimplifyQuery version of ↵Daniel Berlin2017-04-261-8/+10
| | | | | | SimplifyInstruction llvm-svn: 301406
* Convert CVP to use SimplifyQuery version of SimplifyInstruction. Add ↵Daniel Berlin2017-04-262-10/+25
| | | | | | AssumptionCache, DominatorTree, TLI if available. llvm-svn: 301405
* Fix signed multiplication with overflow fallback.Ranjeet Singh2017-04-262-2/+18
| | | | | | | | | | | | | | | | For targets that don't have ISD::MULHS or ISD::SMUL_LOHI for the type and the double width type is illegal, then the two operands are sign extended to twice their size then multiplied to check for overflow. The extended upper halves were mismatched causing an incorrect result. This fixes the mismatch. A test was added for ARM V6-M where the bug was detected. Patch by James Duley. Differential Revision: https://reviews.llvm.org/D31807 llvm-svn: 301404
* [DAG] add FIXME comments for splat detection; NFCSanjay Patel2017-04-262-0/+7
| | | | llvm-svn: 301403
* -Wdocumentation should not check the @returns command for Objective-CAlex Lorenz2017-04-262-2/+12
| | | | | | | | | | | | | | | | function/block pointer properties The commit r300981 allowed @param/@return commands for function/block pointer property declarations. This meant that -Wdocumentation started warning about @return that was used to document properties whose function/block type returned void. However, prior to that commit, we allowed @return for all property declarations, because it can be used to document the value that's returned by the property getter. This commit restores the previous behaviour: now the @return command can be used to document all properties without warnings. rdar://24978538 llvm-svn: 301402
* [X86] Added pointer math zext test case (PR22970)Simon Pilgrim2017-04-261-0/+47
| | | | llvm-svn: 301401
* [AST] Look through attribute type locs when searching for function typeAlex Lorenz2017-04-262-1/+4
| | | | | | | | | | | | loc Prior to this commit -Wdocumentation crashed when checking the @returns command for declarations whose function/block pointer type included an attribute like _Nullable. rdar://31818195 llvm-svn: 301400
* clang-format: [JS/Java] ignore Objective-C constructs in JS & Java.Martin Probst2017-04-262-1/+8
| | | | | | | | | | | | | | | | | | | | | | | Summary: Java and JavaScript support annotations and decorators, respectively, that use a leading "@" token. clang-format currently detects this as an Objective-C construct and applies special formatting, for example no whitespace around "=" operators. This change disables the distinction for Java and JavaScript, which leads to normal formatting of single line annotated and initialized properties. Before: class X { @foo() bar=false; } After: class X { @foo() bar = false; } Reviewers: djasper, bkramer Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D32532 llvm-svn: 301399
* formattingMartin Probst2017-04-261-7/+5
| | | | llvm-svn: 301398
* clang-format: [JS] prevent wraps before class members.Martin Probst2017-04-263-1/+28
| | | | | | | | | | | | Summary: In JavaScript/TypeScript, class member definitions that use modifiers can be subject to Automatic Semicolon Insertion (ASI). For example, "class X { get \n foo }" defines a property called "get" and a property called "foo", both with no type annotation. This change prevents wrapping after the modifier keywords (visibility modifiers, static, get and set) to prevent accidental ASI. Reviewers: djasper, bkramer Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D32531 llvm-svn: 301397
* [X86][SSE] Add test case for repeated vector insertions of the same element ↵Simon Pilgrim2017-04-261-0/+58
| | | | | | (PR15298) llvm-svn: 301396
* Simplify the CFG after loop pass cleanup.Filipe Cabecinhas2017-04-265-0/+67
| | | | | | | | | | | | | | | | Summary: Otherwise we might end up with some empty basic blocks or single-entry-single-exit basic blocks. This fixes PR32085 Reviewers: chandlerc, danielcdh Subscribers: mehdi_amini, RKSimon, llvm-commits Differential Revision: https://reviews.llvm.org/D30468 llvm-svn: 301395
* [mips] Fix test mips64fpldst.ll with machine verifier enabledSagar Thakur2017-04-269-46/+20
| | | | | | | | | Removed micro mips register classes for gp initialization because gp initialization uses pure mips64 instruction. Even when compiling for micro mips, gp initialization can be done with pure mips64 instructions. Reviewed by Simon Dardis Differential: D32286 llvm-svn: 301394
* [X86] Add missing mayLoad/mayStore attributes to some X86 instructions ↵Ayman Musa2017-04-261-4/+6
| | | | | | | | | | (Continue) Complete the patch committed in rL300190. Differential Revision: https://reviews.llvm.org/D32287 llvm-svn: 301393
* [mips] Rework a portion of MipsCC interface. (NFC)Simon Dardis2017-04-264-21/+27
| | | | | | | | | | | | | | | | | r299766 contained a "conditional move or jump depends on uninitialized value" fault, identified by valgrind. This occurred as MipsFastISel::finishCall(..) used CCState over MipsCCState. The latter is required for the TableGen'd calling convention logic due to reliance on pre-analyzing type information to lower call results/returns of vectors correctly. This change modifies the MipsCC AnalyzeCallResult to be useful with both the SelectionDAG and FastISel lowering logic. Reviewers: slthakur Differential Revision: https://reviews.llvm.org/D32004 llvm-svn: 301392
* [ELF] - Implemented --defsym option.George Rimar2017-04-265-0/+79
| | | | | | | | | | | | | | | | | | | | | | gnu ld description of option is: --defsym=symbol=expression Create a global symbol in the output file, containing the absolute address given by expression. You may use this option as many times as necessary to define multiple symbols in the command line. A limited form of arithmetic is supported for the expression in this context: you may give a hexadecimal constant or the name of an existing symbol, or use "+" and "-" to add or subtract hexadecimal constants or symbols. If you need more elaborate expressions, consider using the linker command language from a script. Note: there should be no white space between symbol, the equals sign ("="), and expression. In compare with D32082, this patch does not support math expressions and absolute symbols. It implemented via code similar to --wrap. That covers 1 of 3 possible --defsym cases. Differential revision: https://reviews.llvm.org/D32171 llvm-svn: 301391
* PR31007 and PR27884 will be closed: a possibility to compile constants like ↵Andrew V. Tischenko2017-04-263-6/+12
| | | | | | 0bH is now supported in MS asm. llvm-svn: 301390
* Initial implementation of SB APIs for Tracing support.Ravitheja Addepally2017-04-2622-69/+785
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch introduces new SB APIs for tracing support inside LLDB. The idea is to gather trace data from LLDB and provide it through this APIs to external tools integrating with LLDB. These tools will be responsible for interpreting and presenting the trace data to their users. The patch implements the following new SB APIs -> -> StartTrace - starts tracing with given parameters -> StopTrace - stops tracing. -> GetTraceData - read the trace data . -> GetMetaData - read the meta data assosciated with the trace. -> GetTraceConfig - read the trace configuration Tracing is associated with a user_id that is returned by the StartTrace API and this id needs to be used for accessing the trace data and also Stopping the trace. The user_id itself may map to tracing the complete process or just an individual thread. The APIs require an additional thread parameter when the user of these APIs wishes to perform thread specific manipulations on the tracing instances. The patch also includes the corresponding python wrappers for the C++ based APIs. Reviewers: k8stone, lldb-commits, clayborg Reviewed By: clayborg Subscribers: jingham, mgorny Differential Revision: https://reviews.llvm.org/D29581 llvm-svn: 301389
* [test] Build sanitizer/xray tests only if COMPILER_RT_BUILD_* is onMichal Gorny2017-04-261-40/+42
| | | | | | | | | | | Cover the sanitizer tests with COMPILER_RT_BUILD_SANITIZERS conditional, and add COMPILER_RT_BUILD_XRAY conditional to the xray tests. This makes it possible to do a pure-builtins build with tests enabled. Differential Revision: https://reviews.llvm.org/D32489 llvm-svn: 301387
* [X86][SSE2] Fix asm string for movq (Move Quadword) instruction.Ayman Musa2017-04-2660-337/+333
| | | | | | | | Replace "mov{d|q}" with "movq". Differential Revision: https://reviews.llvm.org/D32220 llvm-svn: 301386
* [InstCombine] Add test cases for opportunities to improve knownbits handling ↵Craig Topper2017-04-261-0/+26
| | | | | | for cttz and ctlz intrinsics. llvm-svn: 301385
* [analyzer] Teach the MallocChecker about Glib API for two argumentsLeslie Zhai2017-04-262-28/+184
| | | | | | | | | | | | Reviewers: zaks.anna, NoQ, danielmarjamaki Reviewed By: zaks.anna, NoQ, danielmarjamaki Subscribers: cfe-commits, kalev, pwithnall Differential Revision: https://reviews.llvm.org/D30771 llvm-svn: 301384
* Remove tailing whitespaces.Michael Liao2017-04-261-5/+5
| | | | llvm-svn: 301383
* [Modules][ObjC] Check definition from canonical decl on designated initializersBruno Cardoso Lopes2017-04-267-1/+49
| | | | | | | | | | Use definition from canonical decl when checking for designated initializers. This is necessary since deserialization of a interface might reuse the definition from the canonical one (see r281119). rdar://problem/29360655 llvm-svn: 301382
* InstructionSimplify: Use braced initializer list for SimplifyQuery creationDaniel Berlin2017-04-261-45/+36
| | | | llvm-svn: 301381
* InstructionSimplify: Have SimplifyFPBinOp pass FastMathFlags by value, like ↵Daniel Berlin2017-04-262-4/+4
| | | | | | we do everywhere else llvm-svn: 301380
* InstructionSimplify: End our long national nightmare of ever-growing ↵Daniel Berlin2017-04-262-159/+364
| | | | | | | | | | | | | | | | | | | | | Simplify* arguments. Summary: Expose the internal query structure, start using it. Note: This is the most minimal change possible i could create. I have trivial followups, like fixing the one use of const FastMathFlags &, the renaming of CtxI to be consistent, etc. This should be NFC. Reviewers: majnemer, davide Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D32448 llvm-svn: 301379
* [XRay][tools] Remove wayward semicolon (NFC)Dean Michael Berris2017-04-261-1/+1
| | | | | | Follow-up to D29320. llvm-svn: 301378
* [ubsan] Skip alignment checks on allocas with known alignmentVedant Kumar2017-04-264-32/+12
| | | | | | | | | | | | | | | | | | | | It's possible to determine the alignment of an alloca at compile-time. Use this information to skip emitting some runtime alignment checks. Testing: check-clang, check-ubsan. This significantly reduces the amount of alignment checks we emit when compiling X86ISelLowering.cpp. Here are the numbers from patched/unpatched clangs based on r301361. ------------------------------------------ | Setup | # of alignment checks | ------------------------------------------ | unpatched, -O0 | 47195 | | patched, -O0 | 30876 | (-34.6%) ------------------------------------------ llvm-svn: 301377
* [XRay][tools] Fixup definition for stat division.Dean Michael Berris2017-04-261-3/+3
| | | | | | | | Copy-pasta error. Follow-up to D29320. llvm-svn: 301376
OpenPOWER on IntegriCloud