summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [codeview] Clean up machinery for deferring .cv_loc emissionReid Kleckner2018-08-2815-144/+84
| | | | | | | | | | | Now that we create the label at the point of the directive, we don't need to set the "current CV location", and then later when we emit the next instruction, create a label for it and emit it. DWARF still defers the labels used in .debug_loc until the next instruction or value, for reasons unknown. llvm-svn: 340883
* [QTOOL-37352] Consider isLegalAddressingImm in Constant HoistingZhaoshi Zheng2018-08-282-1/+141
| | | | | | | | | | | | | | In Thumb1, legal imm range is [0, 255] for ADD/SUB instructions. However, the legal imm range for LD/ST in (R+Imm) addressing mode is [0, 127]. Imms in [128, 255] are materialized by mov R, #imm, and LD/STs use them in (R+R) addressing mode. This patch checks if a constant is used as offset in (R+Imm), if so, it checks isLegalAddressingMode passing the constant value as BaseOffset. Differential Revision: https://reviews.llvm.org/D50931 llvm-svn: 340882
* [ORC] Add a testcase for r338975.Lang Hames2018-08-282-0/+9
| | | | | | Tests that bad object files generate a predictable error from the JIT APIs. llvm-svn: 340881
* Allow IRInterpreter to deal with non-power-of-2 sized types to support some ↵Frederic Riss2018-08-283-11/+53
| | | | | | | | | | | | | | | | | | | | bitfield accesses. Summary: For some bitfield patterns (like the one added by this commit), Clang will generate non-regular data types like i24 or i48. This patch follows a pretty naive approach of just bumping the type size to the next power of 2. DataExtractor know how to deal with weird sizes. The operations on Scalar do not know how to deal with those types though, so we have to legalize the size when creating a Scalar. Reviewers: jingham, clayborg Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D51245 llvm-svn: 340880
* [X86] Add kadd intrinsics to match gcc and icc.Craig Topper2018-08-286-1/+101
| | | | | | | | | | | | This adds the following intrinsics: _kadd_mask64 _kadd_mask32 _kadd_mask16 _kadd_mask8 These are missing from the Intel Intrinsics Guide, but are implemented by both gcc and icc. llvm-svn: 340879
* [codeview] Emit labels for .cv_loc immediatelyReid Kleckner2018-08-283-8/+181
| | | | | | | | | | | | | | | Previously we followed the DWARF implementation, which waits until the next instruction or data to emit the label to use in the .debug_loc section. We might want to consider re-evaluating that design choice as well, since it means the .loc skips alignment padding, for better or worse. This was the most minimal fix I could come up with, but we should be able to do a lot of cleanups now that we don't need to save a pending CV location on the CodeViewContext. I plan to do those next, but this immediately fixes an assertion for some of our users. llvm-svn: 340878
* Remove unnecessary entitlement in debugserver for iOS.Jason Molenda2018-08-281-2/+0
| | | | | | <rdar://problem/43631901> llvm-svn: 340877
* [lldb] Fix lldb build on muslRaphael Isemann2018-08-281-0/+1
| | | | | | | | | | | | | | | | | | | Summary: limits.h is needed for getting PATH_MAX definition, this comes to fore with musl libc where limits.h is not included indirectly via other system headers. Patch by Khem Raj, thanks! Reviewers: compnerd Reviewed By: compnerd Subscribers: llvm-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D31275 llvm-svn: 340876
* [X86] Remove GCCBuiltin from kadd intrinsics.Craig Topper2018-08-281-4/+4
| | | | | | We need to custom handle it in clang so we can bit cast to the mask type. llvm-svn: 340875
* [ORC] Replace lookupFlags in JITSymbolResolver with getResponsibilitySet.Lang Hames2018-08-2817-228/+261
| | | | | | | | | | | | | | The new method name/behavior more closely models the way it was being used. It also fixes an assertion that can occur when using the new ORC Core APIs, where flags alone don't necessarily provide enough context to decide whether the caller is responsible for materializing a given symbol (which was always the reason this API existed). The default implementation of getResponsibilitySet uses lookupFlags to determine responsibility as before, so existing JITSymbolResolvers should continue to work. llvm-svn: 340874
* [HIP] Fix output file extensionYaxun Liu2018-08-282-1/+10
| | | | | | | | | | | | | | | | | | OffloadBundlingJobAction constructor accepts a list of JobAction as inputs. The host JobAction is the last one. The file type of OffloadBundlingJobAction should be determined by the host JobAction (the last one) instead of the first one. Since HIP emits LLVM bitcode for device compilation, device JobAction has different file type as host Job Action. This bug causes incorrect output file extension for HIP. This patch fixes it by using the last input JobAction (host JobAction) to determine file type of OffloadBundlingJobAction. Differential Revision: https://reviews.llvm.org/D51336 llvm-svn: 340873
* [NFC][PassTiming] factor out generic PassTimingInfoFedor Sergeev2018-08-289-97/+221
| | | | | | | | Moving PassTimingInfo from legacy pass manager code into a separate header. Making it suitable for both legacy and new pass manager. Adding a test on -time-passes main functionality. llvm-svn: 340872
* [SimpleLoopUnswitch] Form dedicated exits after trivial unswitches.Alina Sbirlea2018-08-284-5/+92
| | | | | | | | | | | | | | Summary: Form dedicated exits after trivial unswitches. Fixes PR38737, PR38283. Reviewers: chandlerc, fedor.sergeev Subscribers: sanjoy, jlebar, uabelho, llvm-commits Differential Revision: https://reviews.llvm.org/D51375 llvm-svn: 340871
* [ORC] Add an addObjectFile method to LLJIT.Lang Hames2018-08-285-25/+71
| | | | | | | | | | The addObjectFile method adds the given object file to the JIT session, making its code available for execution. Support for the -extra-object flag is added to lli when operating in -jit-kind=orc-lazy mode to support testing of this feature. llvm-svn: 340870
* [X86] Add intrinsics for KADD instructionsCraig Topper2018-08-284-0/+116
| | | | | | | | | | These are intrinsics for supporting kadd builtins in clang. These builtins are already in gcc to implement intrinsics from icc. Though they are missing from the Intel Intrinsics Guide. This instruction adds two mask registers together as if they were scalar rather than a vXi1. We might be able to get away with a bitcast to scalar and a normal add instruction, but that would require DAG combine smarts in the backend to recoqnize add+bitcast. For now I'd prefer to go with the easiest implementation so we can get these builtins in to clang with good codegen. Differential Revision: https://reviews.llvm.org/D51370 llvm-svn: 340869
* [AMDGPU] Fix -Wunused-variable when -DLLVM_ENABLE_ASSERTIONS=offFangrui Song2018-08-281-2/+1
| | | | llvm-svn: 340868
* Revert "[libFuzzer] Port to Windows"Matt Morehouse2018-08-2815-148/+26
| | | | | | This reverts commit r340860 due to failing tests. llvm-svn: 340867
* AMDGPU: Don't delete instructions if S_ENDPGM has implicit usesMatt Arsenault2018-08-282-1/+25
| | | | | | | | This can leave behind the uses with the defs removed. Since this should only really happen in tests, it's not worth the effort of trying to handle this. llvm-svn: 340866
* [GISel]: Add missing opcodes for overflow intrinsicsAditya Nandakumar2018-08-285-18/+66
| | | | | | | | | | | | | | | | https://reviews.llvm.org/D51197 Currently, IRTranslator (and GISel) seems to be arbitrarily picking which overflow intrinsics get mapped into opcodes which either have a carry as an input or not. For intrinsics such as Intrinsic::uadd_with_overflow, translate it to an opcode (G_UADDO) which doesn't have any carry inputs (similar to LLVM IR). This patch adds 4 missing opcodes for completeness - G_UADDO, G_USUBO, G_SSUBE and G_SADDE. llvm-svn: 340865
* [WebAssembly][NFC] Document stackifier tablegen backendThomas Lively2018-08-282-3/+19
| | | | | | | | | | | | | | Summary: Add comments to help readers avoid having to read tablegen backends to understand the code. Also remove unecessary breaks from the output. Reviewers: dschuff, aheejin Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D51371 llvm-svn: 340864
* [llvm-mca] use llvm::any_of instead of std::any_of. NFCAndrea Di Biagio2018-08-281-1/+2
| | | | llvm-svn: 340863
* AMDGPU: Force shrinking of add/sub even if the carry is usedMatt Arsenault2018-08-282-9/+39
| | | | | | | | | The original motivating example uses a 64-bit add, so the carry is used. Insert a copy from VCC. This may allow shrinking of the used carry instruction. At worst, we are replacing a mov to materialize the constant with a copy of vcc. llvm-svn: 340862
* [WebAssembly][NFC] Fix formatting from rL340781Thomas Lively2018-08-281-2/+4
| | | | | | | | | | Reviewers: aheejin Subscribers: dschuff, sbc100, jgravelle-google, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D51367 llvm-svn: 340861
* [libFuzzer] Port to WindowsMatt Morehouse2018-08-2815-26/+148
| | | | | | | | | | | | | | | | | | | | Summary: Port libFuzzer to windows-msvc. This patch allows libFuzzer targets to be built and run on Windows, using -fsanitize=fuzzer and/or fsanitize=fuzzer-no-link. It allows these forms of coverage instrumentation to work on Windows as well. It does not fix all issues, such as those with -fsanitize-coverage=stack-depth, which is not usable on Windows as of this patch. It also does not fix any libFuzzer integration tests. Nearly all of them fail to compile, fixing them will come in a later patch, so libFuzzer tests are disabled on Windows until them. Patch By: metzman Reviewers: morehouse, rnk Reviewed By: morehouse, rnk Subscribers: morehouse, kcc, eraman Differential Revision: https://reviews.llvm.org/D51022 llvm-svn: 340860
* AMDGPU: Shrink insts to fold immediatesMatt Arsenault2018-08-286-54/+564
| | | | | | | | | This needs to be done in the SSA fold operands pass to be effective, so there is a bit of overlap with SIShrinkInstructions but I don't think this is practically avoidable. llvm-svn: 340859
* [WebAssembly][NFC] Fix up SIMD bitwise testsThomas Lively2018-08-281-12/+15
| | | | | | | | | | | | | | Summary: The updated tests were previously infallible because the SIMD bitwise operations do not contain vector types in their names. Reviewers: aheejin, dschuff Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D51369 llvm-svn: 340858
* [WebAssembly] v128.notThomas Lively2018-08-282-0/+66
| | | | | | Implementation and tests. llvm-svn: 340857
* SafeStack: Fix thread liveness check on *BSDVlad Tsyrklevich2018-08-281-1/+4
| | | | | | | | | | | | | | | | Summary: The Linux/BSD system call interfaces report errors differently, use the internal_iserror() function to correctly check errors on either. Reviewers: eugenis Reviewed By: eugenis Subscribers: delcypher, llvm-commits, #sanitizers, krytarowski, kcc, devnexen Differential Revision: https://reviews.llvm.org/D51368 llvm-svn: 340856
* AMDGPU: Move canShrink into TIIMatt Arsenault2018-08-283-56/+57
| | | | llvm-svn: 340855
* Define variables in test case rather than using values from functionsAkira Hatanaka2018-08-281-2/+2
| | | | | | emitted ealier. llvm-svn: 340854
* [DAGCombine] Rework MERGE_VALUES to inline in single pass. NFCI.Nirav Dave2018-08-281-1/+4
| | | | | | | Avoid hyperlinear cost of inlining MERGE_VALUE node by constructing temporary vector and doing a single replacement. llvm-svn: 340853
* [DAG] Avoid recomputing Divergence checks. NFCI.Nirav Dave2018-08-281-6/+10
| | | | | | | When making multiple updates to the same SDNode, recompute node divergence only once after all changes have been made. llvm-svn: 340852
* [DAG] Fix updateDivergence calculationNirav Dave2018-08-281-1/+1
| | | | | | | Check correct SDNode when deciding if we should update the divergence property. llvm-svn: 340851
* AMDGPU: Remove nan tests in class if src is nnanMatt Arsenault2018-08-282-0/+40
| | | | llvm-svn: 340850
* [ubsan] Enable -fsanitize=vptr on Apple devices and simulatorsVedant Kumar2018-08-282-2/+17
| | | | | | | | | It seems like an oversight that this check was not always enabled for on-device or device simulator targets. Differential Revision: https://reviews.llvm.org/D51239 llvm-svn: 340849
* [WebAssembly] Use getCalleeOpNo utility function (NFC)Heejin Ahn2018-08-281-14/+2
| | | | | | | | | | Reviewers: tlively Subscribers: dschuff, sbc100, jgravelle-google, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D51366 llvm-svn: 340848
* [XRay][docs] Chrome Trace Viewer InstructionsDean Michael Berris2018-08-281-2/+16
| | | | | | | This patch adds an example on how to generate a Chrome Trace Viewer loadable trace from an XRay trace. llvm-svn: 340847
* [InstCombine] fix baseline assertionsSanjay Patel2018-08-281-8/+14
| | | | | | rL340842 contained the wrong version of the check lines. llvm-svn: 340846
* [Driver] Delete last reference of lld -flavor old-gnuFangrui Song2018-08-281-8/+1
| | | | | | This is dead code because lld -flavor old-gnu was removed in 2016 by rLLD262158. llvm-svn: 340845
* [X86] Mark the FUCOMI instructions as requiring CMOV to be enabled. NFCICraig Topper2018-08-281-0/+3
| | | | | | | | These instructions were added on the PentiumPro along with CMOV. This was already comprehended by the lowering process which should emit an alternate sequence using FCOM and FNSTW. This just makes it an explicit error if that doesn't work for some reason. llvm-svn: 340844
* [XRay][docs] Update instructionsDean Michael Berris2018-08-281-1/+1
| | | | | | | Add `xray_mode=xray-basic` to the list of options in the "further exploration" section of the doc. llvm-svn: 340843
* [InstCombine] add tests for select narrowing (PR38691); NFCSanjay Patel2018-08-281-0/+121
| | | | llvm-svn: 340842
* Respect platform sysroot when loading core filesPavel Labath2018-08-282-19/+70
| | | | | | | Patch by Eugene Birukov <eugenebi@microsoft.com> Differential Revision: https://reviews.llvm.org/D49685 llvm-svn: 340841
* [lit, shtest-timeout] Always use an internal shell for the shtest-timeout to ↵Stella Stamenova2018-08-281-1/+3
| | | | | | | | | | | | | | | | | | | diagnose buildbot failures Summary: Right now this test is failing on the builtbots on Windows but we have a very similar setup where the test passes. The test is meant to test that specifying a timeout works correctly by running an infnite loop and having it timeout - on the buildbot, the infinite loop doesn't actually execute. This change runs all of the tests in the set using an internal shell rather than an external shell. I expect this will make the test pass which means that either the way the external shell is invoked or the external shell setup on the buildbots is not correct. Regardless of whether the test passes with this change, we'll need to undo this change and have a real fix. @gkistanova was able to get logs from the buildbot to rule out a number of theories as to why this test is failing, but they didn't have enough information to confirm exactly what the issue is. The purpose of this change is to narrow it down, but if someone has a local repro and can aid in debugging, that would make it much speedier (and less prone to making the bots fail). Reviewers: gkistanova, asmith, zturner, modocache, rnk, delcypher Reviewed By: rnk Subscribers: delcypher, llvm-commits, gkistanova Differential Revision: https://reviews.llvm.org/D51326 llvm-svn: 340840
* [debuginfo] generate debug info with asm+.fileBrian Cain2018-08-282-8/+32
| | | | | | | | | | | | | | | Summary: For assembly input files, generate debug info even when the .file directive is present, provided it does not include a file-number argument. Fixes PR38695. Reviewers: probinson, sidneym Subscribers: aprantl, hiraditya, JDevlieghere, llvm-commits Differential Revision: https://reviews.llvm.org/D51315 llvm-svn: 340839
* Parse compile commands lazily in InterpolatingCompilationDatabaseIlya Biryukov2018-08-282-60/+67
| | | | | | | | | | | | | | | | | Summary: This greatly reduces the time to read 'compile_commands.json'. For Chromium on my machine it's now 0.7 seconds vs 30 seconds before the change. Reviewers: sammccall, jfb Reviewed By: sammccall Subscribers: mgrang, jfb, cfe-commits Differential Revision: https://reviews.llvm.org/D51314 llvm-svn: 340838
* [TableGen] CodeGenDAGPatterns::GenerateVariants - basic caching of matching ↵Simon Pilgrim2018-08-281-2/+14
| | | | | | | | | | | | | | predicates CodeGenDAGPatterns::GenerateVariants is a costly function in many tblgen commands (33.87% of the total runtime of x86 -gen-dag-isel), and due to the O(N^2) nature of the function, there are a high number of repeated comparisons of the pattern's vector<Predicate>. This initial patch at least avoids repeating these comparisons for every Variant in a pattern. I began investigating caching all the matches before entering the loop but hit issues with how best to store the data and how to update the cache as patterns were added. Saves around 15secs in debug builds of x86 -gen-dag-isel. Differential Revision: https://reviews.llvm.org/D51035 llvm-svn: 340837
* [benchmark] Stop building benchmarks by defaultKirill Bobyrev2018-08-282-2/+2
| | | | | | | | | | | | | Although the benchmark regex-related build issue seems to be fixed, it appears that benchmark library triggers some stage 2 clang-cl bugs: http://lab.llvm.org:8011/builders/clang-x86-windows-msvc2015/builds/13495/steps/build%20stage%202/logs/stdio The only sensible option now is to prevent benchmark library from building in the default configuration. llvm-svn: 340836
* Use a RAII guard to control access to DisassemblerLLVMC.Raphael Isemann2018-08-282-60/+59
| | | | | | | | | | | | | | | | | | | | Summary: This patch replaces the manual lock/unlock calls for gaining exclusive access to the disassembler with a RAII-powered access scope. This should prevent that we somehow skip over these trailing Unlock calls (e.g. with early returns). We also have a second `GetDisasmToUse` method now that takes an already constructed access scope to prevent deadlocks when we call this from other methods. Reviewers: #lldb, davide, vsk Reviewed By: #lldb, davide, vsk Subscribers: davide, vsk, lldb-commits Differential Revision: https://reviews.llvm.org/D51319 llvm-svn: 340835
* [Inliner] Attribute callsites with inline remarksDavid Bolvansky2018-08-282-10/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Sometimes reading an output *.ll file it is not easy to understand why some callsites are not inlined. We can read output of inline remarks (option --pass-remarks-missed=inline) and try correlating its messages with the callsites. An easier way proposed by this patch is to add to every callsite processed by Inliner an attribute with the latest message that describes the cause of not inlining this callsite. The attribute is called //inline-remark//. By default this feature is off. It can be switched on by the option //-inline-remark-attribute//. For example in the provided test the result method //@test1// has two callsites //@bar// and inline remarks report different inlining missed reasons: remark: <unknown>:0:0: bar not inlined into test1 because too costly to inline (cost=-5, threshold=-6) remark: <unknown>:0:0: bar not inlined into test1 because it should never be inlined (cost=never): recursive It is not clear which remark correspond to which callsite. With the inline remark attribute enabled we get the reasons attached to their callsites: define void @test1() { call void @bar(i1 true) #0 call void @bar(i1 false) #2 ret void } attributes #0 = { "inline-remark"="(cost=-5, threshold=-6)" } .. attributes #2 = { "inline-remark"="(cost=never): recursive" } Patch by: yrouban (Yevgeny Rouban) Reviewers: xbolva00, tejohnson, apilipenko Reviewed By: xbolva00, tejohnson Subscribers: eraman, llvm-commits Differential Revision: https://reviews.llvm.org/D50435 llvm-svn: 340834
OpenPOWER on IntegriCloud