summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [InstCombine] Support (mul (sext x), cst) --> (sext (mul x, cst')) and (mul ↵Craig Topper2018-09-112-16/+16
| | | | | | | | | | (zext x), cst) --> (zext (mul x, cst')) for vectors constants. Similar to D51236, but for mul instead of add. Differential Revision: https://reviews.llvm.org/D51900 llvm-svn: 341961
* [NFC] Fix typo in commentJessica Paquette2018-09-111-1/+1
| | | | | | Fore -> For llvm-svn: 341960
* [MachineOutliner][NFC] Factor out instruction mapping into its own functionJessica Paquette2018-09-111-28/+38
| | | | | | | Just some tidy-up. Pull the mapper stuff into `populateMapper`. This makes it a bit easier to read what's going on in `runOnModule`. llvm-svn: 341959
* [ASTMatchers] add three matchers for dependent expressionsJonas Toth2018-09-114-0/+127
| | | | | | | | | | | | | | | | | | | Summary: The new matchers can be used to check if an expression is type-, value- or instantiation-dependent in a templated context. These matchers are used in a clang-tidy check and generally useful as the problem of unresolved templates occurs more often in clang-tidy and they provide an easy way to check for this issue. Reviewers: aaron.ballman, alexfh, klimek Reviewed By: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D51880 llvm-svn: 341958
* Remove undefined behavior around the use of StateTypeShafik Yaghmour2018-09-113-3/+34
| | | | | | | | | | rdar://problem/43530233 Patch by Shafik Yaghmour. Differential Revision: https://reviews.llvm.org/D51445 llvm-svn: 341957
* [X86] Correct the one use check from r341915.Craig Topper2018-09-111-1/+1
| | | | | | The one use check should be on the bitcast, not the input to the bitcast. llvm-svn: 341956
* Reland "Implement a (simple) Markdown generator"Julie Hockett2018-09-1113-38/+730
| | | | | | | | Relanding with fixes to tests for the failing bots. Differential Revision: https://reviews.llvm.org/D43424 llvm-svn: 341955
* [GVNHoist] Re-enable GVNHoist by defaultAlexandros Lamprineas2018-09-117-26/+30
| | | | | | | Rebase rL340922 since https://bugs.llvm.org/show_bug.cgi?id=38807 has been fixed by rL341947. llvm-svn: 341954
* [DagCombine][NFC] Some more tests fo for X % C == 0 (UREM case) transformRoman Lebedev2018-09-116-4/+1823
| | | | | | | | For https://reviews.llvm.org/D50222 Patch by: hermord (Dmytro Shynkevych)! llvm-svn: 341953
* [MIPS] Fix illegal type assert in single-float modeSimon Atanasyan2018-09-112-3/+60
| | | | | | | | | | | | An fp_to_sint node would be incorrectly lowered to a TruncIntFP node in single-float mode. This would trigger an "Unexpected illegal type!" assert. Patch by Dan Ravensloft. Differential revision: https://reviews.llvm.org/D51810 llvm-svn: 341952
* [SanitizerCoverage] Create comdat for global arrays.Matt Morehouse2018-09-116-21/+38
| | | | | | | | | | | | | | | | | Summary: Place global arrays in comdat sections with their associated functions. This makes sure they are stripped along with the functions they reference, even on the BFD linker. Reviewers: eugenis Reviewed By: eugenis Subscribers: eraman, hiraditya, llvm-commits Differential Revision: https://reviews.llvm.org/D51902 llvm-svn: 341951
* [clangd] Add unittests for D51917Kadir Cetinkaya2018-09-111-0/+39
| | | | | | | | | | | | Reviewers: ilya-biryukov Reviewed By: ilya-biryukov Subscribers: ioeric, MaskRay, jkorous, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D51924 llvm-svn: 341950
* [CodeCompletion] Enable signature help when initializing class/struct/union ↵Kadir Cetinkaya2018-09-115-17/+95
| | | | | | | | | | | | | | | | | | | | members. Summary: Factors out member decleration gathering and uses it in parsing to call signature help. Doesn't support signature help for base class constructors, the code was too coupled with diagnostic handling, but still can be factored out but just needs more afford. Reviewers: sammccall, ilya-biryukov, ioeric Reviewed By: ilya-biryukov Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D51917 llvm-svn: 341949
* Simplify.Rui Ueyama2018-09-112-23/+15
| | | | | | Instead of Map<StringRef, bool>, we can simply use Set<StringRef>. llvm-svn: 341948
* [MemorySSAUpdater] Avoid creating self-referencing MemoryDefsAlexandros Lamprineas2018-09-112-4/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix for https://bugs.llvm.org/show_bug.cgi?id=38807, which occurred while compiling SemaTemplateInstantiate.cpp with clang and GVNHoist enabled. In the following example: 1=def(entry) / \ 2=def(1) 4=def(1) 3=def(2) 5=def(4) When removing the MemoryDef 2=def(1) from its basic block, and just before adding it to the end of the parent basic block, we first replace all its uses with the defining memory access: 3=def(2) -> 3=def(1) Then we call insertDef for adding 2=def(1) to the parent basic block, where we replace the uses of 1=def(entry) with 2=def(1). Doing so we create a self reference: 2=def(1) -> 2=def(2) (bad) 3=def(1) -> 3=def(2) (ok) 4=def(1) -> 4=def(2) (ok) Differential Revision: https://reviews.llvm.org/D51801 llvm-svn: 341947
* [PerfMonitor] Fix rdtscp callsitesTobias Grosser2018-09-115-56/+48
| | | | | | | | | | | | | Summary: Update all rdtscp callsites in PerfMonitor so that they conform with the signature changes introduced in r341698. Reviewers: grosser, bollu Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D51928 llvm-svn: 341946
* pdb output: Initialize padding in PublicsStreamHeader.Nico Weber2018-09-111-2/+3
| | | | | | | | | Makes the produced pdbs more deterministic; before they'd contain 2 arbitary bytes where this padding was. Also reorder initialization to match the order of the fields in the struct (nfc) llvm-svn: 341945
* Make malformed-machos.test pass on my Mac.Nico Weber2018-09-111-1/+1
| | | | | | | For some reason, llvm-objdump defaults to -arch=i386 on this system while the test checks x86_64 output. Explicitly pass -arch=x86_64. llvm-svn: 341944
* [Hexagon] [Test] Remove undef and infinite loop from testRoman Lebedev2018-09-111-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | Summary: The undef and the infinite loop at the end cause this test to be translated unpredictably. In particular, the checked-for `mpy` disappears under certain legal optimizations (e.g. the one in D50222). Since the use of these constructs is not relevant to the behavior tested, according to the header comment, this change, suggested by @kparzysz, eliminates them. Was initially committed in r341046, but was reverted. Patch by: hermord (Dmytro Shynkevych)! Reviewers: kparzysz Reviewed By: kparzysz Subscribers: lebedev.ri, llvm-commits, kparzysz Differential Revision: https://reviews.llvm.org/D50944 llvm-svn: 341943
* [PDB] Fix problems after rL341782Aleksandr Urakov2018-09-114-6/+54
| | | | | | | | | | | | | Summary: This commit fixes following problems after rL341782: - Broken SymbolFilePDBTests - Warning on comparison of integers of different signs Tags: #lldb Differential Revision: https://reviews.llvm.org/D51162 llvm-svn: 341942
* [ARM] Add smlald support in ARMParallelDSPSam Parker2018-09-114-13/+405
| | | | | | | | | Search from i64 reducing phis, as well as i32, to allow the generation of smlald instructions. Differential Revision: https://reviews.llvm.org/D51101 llvm-svn: 341941
* Print the correct error when our DynamicCheckerFunctions fail to installRaphael Isemann2018-09-111-2/+2
| | | | | | | | | | | | | | | | | | | | Summary: The check is inverted here: If we have error messages, we should print those instead of our default error message. But currently we print the default message when we actually have a sensible error to print. Fixes https://bugs.llvm.org/show_bug.cgi?id=38383 Thanks Nat for the patch! Reviewers: #lldb, JDevlieghere Reviewed By: JDevlieghere Subscribers: JDevlieghere, lldb-commits Differential Revision: https://reviews.llvm.org/D51602 llvm-svn: 341940
* [OPENMP] Simplified checks for declarations in declare target regions.Alexey Bataev2018-09-112-108/+38
| | | | | | | | Sema analysis should not mark functions as an implicit declare target, it may break codegen. Simplified semantic analysis and removed extra code for implicit declare target functions. llvm-svn: 341939
* Remove unnecessary semicolon to silence -Wpedantic warning. NFCI.Simon Pilgrim2018-09-111-1/+1
| | | | llvm-svn: 341938
* Style fix.Rui Ueyama2018-09-111-4/+2
| | | | llvm-svn: 341937
* [AArch64] test codegen for unsigned saturated add; NFCSanjay Patel2018-09-111-0/+729
| | | | | | | This is identical to the tests added for x86 at rL341845. A semi-generic DAGCombine should improve things universally. llvm-svn: 341935
* [MIPS] ORC JIT supportPetar Jovanovic2018-09-115-5/+565
| | | | | | | | | | | | This patch adds support for ORC JIT for mips/mips64 architecture. In common code $static is changed to __ORCstatic because on MIPS architecture "$" is a reserved character. Patch by Luka Ercegovcevic Differential Revision: https://reviews.llvm.org/D49665 llvm-svn: 341934
* [NFC][clangd] fix warning for extra semicolonJonas Toth2018-09-111-2/+2
| | | | llvm-svn: 341933
* [ARM] Enable ARMCodeGenPrepare by defaultSam Parker2018-09-111-1/+1
| | | | | | | | | We've had the pass enabled downstream for a couple of weeks and it seems to be okay, so enable it by default. Differential Revision: https://reviews.llvm.org/D51920 llvm-svn: 341932
* [NFC] Fix compiler warning in TestArmv7Disassembly.cppRaphael Isemann2018-09-111-1/+1
| | | | | | | | | | The warning is comparison of integers of different signs: 'const int' and 'const unsigned long' and triggered by EXPECT_EQ (num_of_instructions, inst_list.GetSize()); as num_of_instructions is an int in this comparison (and the RHS is size_t). llvm-svn: 341931
* [python bindings] Expose getNumTemplateArgumentsJonathan Coe2018-09-112-0/+40
| | | | | | | | | | | | | | | Expose the C bindings for clang_Type_getNumTemplateArguments() and clang_Type_getTemplateArgumentAsType() in the python API. Patch by kjteske (Kyle Teske). Reviewed By: jbcoe Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D51299 llvm-svn: 341930
* [clang-tidy] Insert absl::StrAppend when replacing StrCat.Benjamin Kramer2018-09-112-5/+5
| | | | | | | There might be no using decl for StrAppend around, inserting the qualified name is less likely to break things. llvm-svn: 341929
* [AMDGPU] Preliminary patch for divergence driven instruction selection. ↵Alexander Timofeev2018-09-1152-488/+491
| | | | | | | | | Immediate selection predicate changed Differential revision: https://reviews.llvm.org/D51734 Reviewers: rampitec llvm-svn: 341928
* [FuncAttrs] Remove "access range attributes" for read-none functionsJohannes Doerfert2018-09-112-0/+39
| | | | | | | | | | The presence of readnone and an access range attribute (argmemonly, inaccessiblememonly, inaccessiblemem_or_argmemonly) is considered an error by the verifier. This seems strict but also not wrong. This patch makes sure function attribute detection will remove all access range attributes for readnone functions. llvm-svn: 341927
* [LoopInfo] Fix Loop::getLoopID() for loops with multiple latchesJohannes Doerfert2018-09-112-12/+61
| | | | | | | | The previous implementation traversed all loop blocks and bailed if one was not a latch block. Since we are only interested in latch blocks, we should only traverse those. llvm-svn: 341926
* [clang-tidy] Add a missing comma after "flags"Benjamin Kramer2018-09-114-16/+7
| | | | llvm-svn: 341925
* [Msan] Fix unit test linkage issue on FreeBSDDavid Carlier2018-09-111-1/+1
| | | | | | | | | | | | Fix typical relocation linkage issue. Reviwewers: dim, emaste Reviewed By: krytarowski Differential Revision: https://reviews.llvm.org/D51681 llvm-svn: 341924
* [clangd] NFC: Use uint32_t for FuzzyFindRequest limitsKirill Bobyrev2018-09-112-12/+10
| | | | | | | | Reviewed By: ioeric Differential Revision: https://reviews.llvm.org/D51860 llvm-svn: 341921
* [mips] Add a pattern for 64-bit GPR variant of the `rdhwr` instructionSimon Atanasyan2018-09-112-4/+7
| | | | | | | | | | | | | | | | | | | | | MIPS ISAs start to support third operand for the `rdhwr` instruction starting from Revision 6. But LLVM generates assembler code with three-operands version of this instruction on any MIPS64 ISA. The third operand is always zero, so in case of direct code generation we get correct code. This patch fixes the bug by adding an instruction alias. The same alias already exists for 32-bit ISA. Ideally, we also need to reject three-operands version of the `rdhwr` instruction in an assembler code if ISA revision is less than 6. That is a task for a separate patch. This fixes PR38861 (https://bugs.llvm.org/show_bug.cgi?id=38861) Differential revision: https://reviews.llvm.org/D51773 llvm-svn: 341919
* [NFC] Sanitizing asserts for OrderedBasicBlockMax Kazantsev2018-09-111-0/+3
| | | | llvm-svn: 341917
* [X86] In combineMOVMSK, look through int->fp bitcasts before callling ↵Craig Topper2018-09-112-99/+37
| | | | | | | | SimplifyDemandedBits. MOVMSKPS and MOVMSKPD both take FP types, but likely the operations before it are on integer types with just a int->fp bitcast between them. If the bitcast isn't used by anything else and doesn't change the element width we can look through it to simplify the integer ops. llvm-svn: 341915
* [XRay] Ensure lambda outlives llvm::function_refDean Michael Berris2018-09-112-3/+3
| | | | | | Follow-up to D51912. llvm-svn: 341912
* [Tooling] Restore working dir in ClangTool.Ilya Biryukov2018-09-113-1/+42
| | | | | | | | | | | | | | | | | | | Summary: And add an option to disable this behavior. The option is only used in AllTUsExecutor to avoid races when running concurrently on multiple threads. This fixes PR38869 introduced by r340937. Reviewers: ioeric, steveire Reviewed By: ioeric Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D51864 llvm-svn: 341910
* [XRay] Write the TSC along with CPUIDDean Michael Berris2018-09-111-1/+1
| | | | | | | | Fixes builds in non-little-endian systems. This is a follow-up to D51911. llvm-svn: 341909
* [X86] Add test cases inspired by PR38840.Craig Topper2018-09-111-0/+4058
| | | | | | | | | | | | | | | | | | | | | | | These are test cases inspired by sequences like below for extracting the same bit from every vector element and checking for all zeros/ones. define i1 @and256_x8(<8 x i32>) { %a = trunc <8 x i32> %0 to <8 x i1> %b = bitcast <8 x i1> %a to i8 %d = icmp eq i8 %b, -1 ret i1 %d } This is what the above looks like after InstCombine. define i1 @and256_x8_opt(<8 x i32>) { %2 = and <8 x i32> %0, <i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1> %a = icmp ne <8 x i32> %2, zeroinitializer %b = bitcast <8 x i1> %a to i8 %d = icmp eq i8 %b, -1 ret i1 %d } llvm-svn: 341908
* Make test more robust in case the expected output appears in clang version ↵Douglas Yung2018-09-111-3/+3
| | | | | | string. llvm-svn: 341907
* [XRay] Use FDR Records+Visitors for Trace LoadingDean Michael Berris2018-09-116-546/+230
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: In this change, we overhaul the implementation for loading `llvm::xray::Trace` objects from files by using the combination of specific FDR Record types and visitors breaking up the logic to reconstitute an execution trace from flight-data recorder mode traces. This change allows us to handle out-of-temporal order blocks as written in files, and more consistently recreate an execution trace spanning multiple blocks and threads. To do this, we use the `WallclockRecord` associated with each block to maintain temporal order of blocks, before attempting to recreate an execution trace. The new addition in this change is the `TraceExpander` type which can be thought of as a decompression/decoding routine. This allows us to maintain the state of an execution environment (thread+process) and create `XRayRecord` instances that fit nicely into the `Trace` container. We don't have a specific unit test for the TraceExpander type, since the end-to-end tests for the `llvm-xray convert` tools already cover precisely this codepath. This change completes the refactoring started with D50441. Depends on D51911. Reviewers: mboerger, eizan Subscribers: mgorny, hiraditya, mgrang, llvm-commits Differential Revision: https://reviews.llvm.org/D51912 llvm-svn: 341906
* [XRay] Add TSC to NewCPUId RecordsDean Michael Berris2018-09-1111-26/+36
| | | | | | | | | | | | | | | Summary: This more correctly reflects the data written by the FDR mode runtime. This is a continuation of the work in D50441. Reviewers: mboerger, eizan Subscribers: hiraditya, llvm-commits Differential Revision: https://reviews.llvm.org/D51911 llvm-svn: 341905
* [NFC] Specify test's option to reduce reliance on defaultsMax Kazantsev2018-09-111-1/+1
| | | | llvm-svn: 341904
* [ASan] [Windows] Remove const from _msize function declaration parameterMartin Storsjo2018-09-111-1/+1
| | | | | | | | | This function isn't declared with a const parameter anywhere; neither in MSVC (neither in ucrt or in older msvcrt versions) nor in mingw-w64. Differential Revision: https://reviews.llvm.org/D51876 llvm-svn: 341903
OpenPOWER on IntegriCloud