summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* bpf: New calling convention for 32-bit subregistersYonghong Song2018-02-233-9/+37
| | | | | | | | | | | This patch add new calling conventions to allow GPR32RegClass as valid register class for arguments and return types. New calling convention will only be choosen when -mattr=+alu32 specified. Signed-off-by: Jiong Wang <jiong.wang@netronome.com> Reviewed-by: Yonghong Song <yhs@fb.com> llvm-svn: 325983
* bpf: New target attribute "alu32" for 32-bit subregister supportYonghong Song2018-02-233-0/+9
| | | | | | | | | | | | | | | | | | This new attribute aims to control the enablement of 32-bit subregister support on eBPF backend. Name the interface as "alu32" is because we in particular want to enable the generation of BPF_ALU32 instructions by enable subregister support. This attribute could be used in the following format with llc: llc -mtriple=bpf -mattr=[+|-]alu32 It is disabled at default. Signed-off-by: Jiong Wang <jiong.wang@netronome.com> Reviewed-by: Yonghong Song <yhs@fb.com> llvm-svn: 325982
* bpf: Define instruction patterns for extensions and truncations between i32 ↵Yonghong Song2018-02-231-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | to i64 For transformations between i32 and i64, if it is explicit signed extension: - first cast the operand to i64 - then use SLL + SRA to finish the extension. if it is explicit zero extension: - first cast the operand to i64 - then use SLL + SRL to finish the extension. if it is explicit any extension: - just refer to 64-bit register. if it is explicit truncation: - just refer to 32-bit subregister. NOTE: Some of the zero extension sequences might be unnecessary, they will be removed by an peephole pass on MachineInstruction layer. Signed-off-by: Jiong Wang <jiong.wang@netronome.com> Reviewed-by: Yonghong Song <yhs@fb.com> llvm-svn: 325981
* bpf: Tighten the immediate predication for 32-bit alu instructionsYonghong Song2018-02-231-2/+4
| | | | | | | | | | | | | | | | | These 32-bit ALU insn patterns which takes immediate as one operand were initially added to enable AsmParser support, and the AsmMatcher uses "ins" and "outs" fields to deduct the operand constraint. However, the instruction selector doesn't work the same as AsmMatcher. The selector will use the "pattern" field for which we are not setting the predication for immediate operands correctly. Without this patch, i32 would eventually means all i32 operands are valid, both imm and gpr, while these patterns should allow imm only. Signed-off-by: Jiong Wang <jiong.wang@netronome.com> Reviewed-by: Yonghong Song <yhs@fb.com> llvm-svn: 325980
* bpf: Use markSuperRegs to mark reserved registersYonghong Song2018-02-231-2/+2
| | | | | | | | | markSuperRegs is the canonical helper function used to mark reserved registers. It could mark any overlapping sub-registers automatically. Reviewed-by: Yonghong Song <yhs@fb.com> Signed-off-by: Jiong Wang <jiong.wang@netronome.com> llvm-svn: 325979
* [CFG] Try to narrow down MSVC compiler crash via binary search.Artem Dergachev2018-02-231-11/+17
| | | | | | | | | | Split the presumably offending function in two to see which part of it causes the crash to occur. The crash was introduced in r325966. r325969 did not help. llvm-svn: 325978
* [analyzer] Relax the assert used when traversing the node graph.George Karpenkov2018-02-232-1/+22
| | | | | | | | | | | | | | The assertion gets exposed when changing the exploration order. This is a quick hacky fix, but the intention is that if the nodes do merge, it should not matter which predecessor should be traverse. A proper fix would be not to traverse predecessors at all, as all information relevant for any decision should be avilable locally. rdar://37540480 Differential Revision: https://reviews.llvm.org/D42773 llvm-svn: 325977
* [analyzer] mark returns of functions where the region passed as parameter ↵George Karpenkov2018-02-236-5/+772
| | | | | | | | | | | | | | | | | | was not initialized In the wild, many cases of null pointer dereference, or uninitialized value read occur because the value was meant to be initialized by the inlined function, but did not, most often due to error condition in the inlined function. This change highlights the return branch taken by the inlined function, in order to help user understand the error report and see why the value was uninitialized. rdar://36287652 Differential Revision: https://reviews.llvm.org/D41848 llvm-svn: 325976
* [analyzer] Consider switch- and goto- labels when constructing the set of ↵George Karpenkov2018-02-234-6/+77
| | | | | | | | | | | | executed lines When viewing the report in the collapsed mode the label signifying where did the execution go is often necessary for properly understanding the context. Differential Revision: https://reviews.llvm.org/D43145 llvm-svn: 325975
* Fix a compiler warning in ModuleCacheTest.cpp, NFCVedant Kumar2018-02-231-2/+2
| | | | llvm-svn: 325974
* [DebugInfo] Add remaining files to r325970Scott Linder2018-02-2312-0/+224
| | | | | | Add files which I missed in the original check-in llvm-svn: 325973
* [PowerPC] Disable shrink-wrapping when getting PC address through the LRNemanja Ivanovic2018-02-234-0/+93
| | | | | | | | | | | | | | The instruction sequence used to get the address of the PC into a GPR requires that we clobber the link register. Doing so without having first saved it in the prologue leaves the function unable to return. Currently, this sequence is emitted into the entry block. To ensure the prologue is inserted before this sequence, disable shrink-wrapping. This fixes PR33547. Differential Revision: https://reviews.llvm.org/D43677 llvm-svn: 325972
* [MemorySSA] Fix a cache invalidation bug with removed accessesGeorge Burgess IV2018-02-233-3/+45
| | | | | | | I suspect there's a deeper issue here, but we probably shouldn't be using INVALID_MEMORYSSA_ID as liveOnEntry's ID anyway. llvm-svn: 325971
* [DebugInfo] Support DWARF v5 source code embedding extensionScott Linder2018-02-2351-221/+581
| | | | | | | | | | | | | | | | | | | In DWARF v5 the Line Number Program Header is extensible, allowing values with new content types. In this extension a content type is added, DW_LNCT_LLVM_source, which contains the embedded source code of the file. Add new optional attribute for !DIFile IR metadata called source which contains source text. Use this to output the source to the DWARF line table of code objects. Analogously extend METADATA_FILE in Bitcode and .file directive in ASM to support optional source. Teach llvm-dwarfdump and llvm-objdump about the new values. Update the output format of llvm-dwarfdump to make room for the new attribute on file_names entries, and support embedded sources for the -source option in llvm-objdump. Differential Revision: https://reviews.llvm.org/D42765 llvm-svn: 325970
* [CFG] NFC: Speculative attempt to fix MSVC internal compiler error on buildbot.Artem Dergachev2018-02-231-3/+6
| | | | | | Don't use fancy initialization and member access in a DenseMap. llvm-svn: 325969
* [InstCombine] simplify code for fabs(X) * fabs(X) -> X * X; NFCSanjay Patel2018-02-231-13/+4
| | | | llvm-svn: 325968
* Sink the verification code around the assert where it's handled and wrap in ↵Eric Christopher2018-02-231-25/+14
| | | | | | | | | | NDEBUG. This has the advantage of making release only builds more warning free and there's no need to make this routine a class function if it isn't using class members anyhow. llvm-svn: 325967
* [CFG] [analyzer] NFC: Allow more complicated construction contexts.Artem Dergachev2018-02-232-33/+97
| | | | | | | | | | | | | | ConstructionContexts introduced in D42672 are an additional piece of information included with CFGConstructor elements that help the client of the CFG (such as the Static Analyzer) understand where the newly constructed object is stored. The patch refactors the ConstructionContext class to prepare for including multi-layered contexts that are being constructed gradually, layer-by-layer, as the AST is traversed. Differential Revision: https://reviews.llvm.org/D43428 llvm-svn: 325966
* [InstSimplify] sqrt(X) * sqrt(X) --> XSanjay Patel2018-02-234-15/+21
| | | | | | This was misplaced in InstCombine. We can loosen the FMF as a follow-up step. llvm-svn: 325965
* [Utility] Simplify and generalize the CleanUp helper, NFCVedant Kumar2018-02-237-300/+125
| | | | | | | | | | | | | | | | | | Removing the template arguments and most of the mutating methods from CleanUp makes it easier to understand and reuse. In its present state, CleanUp would be too cumbersome to adapt to cases where multiple objects need to be released. Take for example this change in swift-lldb: https://github.com/apple/swift-lldb/pull/334/files#diff-6f474df750f75c8ba675f2a8408a5629R219 This change is simple to express with the new CleanUp, but not so simple with the old version. Differential Revision: https://reviews.llvm.org/D43662 llvm-svn: 325964
* [ELF] Fix IsPreemptible comment and typo. NFCFangrui Song2018-02-233-4/+4
| | | | llvm-svn: 325963
* Intrinsics calls should avoid the PLT when "RtLibUseGOT" metadata is present.Sriraman Tallam2018-02-235-2/+46
| | | | | | Differential Revision: https://reviews.llvm.org/D42216 llvm-svn: 325962
* Set Module Metadata "RtLibUseGOT" when fno-plt is used.Sriraman Tallam2018-02-232-1/+5
| | | | | | Differential Revision: https://reviews.llvm.org/D42217 llvm-svn: 325961
* [InstCombine] allow fmul-sqrt folds with less than full -ffast-mathSanjay Patel2018-02-234-39/+59
| | | | | | Also, add a Builder method for intrinsics to reduce code duplication for clients. llvm-svn: 325960
* Simplify a DEBUG statement to remove a set but not used variable in release ↵Eric Christopher2018-02-231-7/+4
| | | | | | builds. llvm-svn: 325959
* Fix breakpoint thread name conditionals after breakpoint options refactor.Jim Ingham2018-02-233-39/+42
| | | | | | PR36435 llvm-svn: 325958
* [X86] Add assembler/disassembler support for blendm with zero masking and ↵Craig Topper2018-02-233-0/+192
| | | | | | | | broacast. Fixes PR31617 llvm-svn: 325957
* [Power9] Add missing instructions to the Power 9 schedulerStefan Pintilie2018-02-231-47/+97
| | | | | | | | | | This is the first in a series of patches that will define more instructions using InstRW so that we can move away from ItinRW and ultimately have a complete Power 9 scheduler. Differential Revision: https://reviews.llvm.org/D43635 llvm-svn: 325956
* Remove dead code.Rui Ueyama2018-02-231-2/+0
| | | | llvm-svn: 325955
* [Hexagon] Recognize non-immediate constants in HexagonConstPropagationKrzysztof Parzyszek2018-02-233-6/+36
| | | | llvm-svn: 325954
* Inline printHelp.Rui Ueyama2018-02-231-5/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D43526 llvm-svn: 325953
* Handle --version before handling --mllvm.Rui Ueyama2018-02-231-5/+6
| | | | | | | | Because it's a waste of time to handle --mllvm before --version. Differential Revision: https://reviews.llvm.org/D43527 llvm-svn: 325952
* Fixed unused variable warning. NFCI.Simon Pilgrim2018-02-231-1/+1
| | | | llvm-svn: 325950
* [X86] Add DAG combine to remove (and X, 1) from in front of a v1i1 scalar to ↵Craig Topper2018-02-233-8/+26
| | | | | | | | | | | | vector. These can be created by type legalization promoting the inputs to select to match scalar boolean contents. We were trying to pattern match them away during isel, but its better to just remove them from the DAG. I've cleaned up some patterns to not check for this 'and' anymore. But I suspect this has also opened up opportunities for pattern removal. llvm-svn: 325949
* Inline a trivial ctor.Rui Ueyama2018-02-231-15/+9
| | | | | | Differential Revision: https://reviews.llvm.org/D43525 llvm-svn: 325948
* [WebAssembly] Fix macro metaprogram to not duplicate code as much.Benjamin Kramer2018-02-231-7/+11
| | | | | | No functionality change intended. llvm-svn: 325947
* Because of CVE-2018-6574, some compiler options and linker options are ↵Eric Christopher2018-02-231-0/+8
| | | | | | | | | | | | | | | | | | | | restricted to prevent arbitrary code execution. https://github.com/golang/go/issues/23672 By this change, building a Go code with LLVM Go bindings causes a compilation error as follows. go build llvm.org/llvm/bindings/go/llvm: invalid flag in #cgo LDFLAGS: -Wl,-headerpad_max_install_names llvm-go tool generates cgo LDFLAGS directive from `llvm-config --ldflags` and it contains -Wl,option options. But -Wl,option is banned by default. To avoid this problem, we need to set $CGO_LDFLAGS_ALLOW environment variable to notify a compiler that the flags should be allowed. $ export CGO_LDFLAGS_ALLOW='-Wl,(-search_paths_first|-headerpad_max_install_names)' By default for go 1.10 and go 1.9.5 these options should appear in the accepted set of options, however, if you're running into the error it's useful to have this documented. Patch by Ryuichi Hayashida llvm-svn: 325946
* [Driver] Make -fno-common default for FuchsiaPetr Hosek2018-02-232-0/+3
| | | | | | | | We never want to generate common symbols on Fuchsia. Differential Revision: https://reviews.llvm.org/D43545 llvm-svn: 325945
* [X86][SSE] Generalize x > C-1 ? x+-C : 0 --> subus x, C combine for ↵Simon Pilgrim2018-02-232-115/+43
| | | | | | non-uniform constants llvm-svn: 325944
* Really fix test on windows.Rafael Espindola2018-02-231-3/+3
| | | | | | Sorry for the noise. llvm-svn: 325943
* Fix one last test on a windows host.Rafael Espindola2018-02-231-1/+1
| | | | llvm-svn: 325942
* Shrink various scheduling tables by using narrower types.Benjamin Kramer2018-02-234-30/+35
| | | | | | 16 bits ought to be enough for everyone. This shrinks clang by ~1MB. llvm-svn: 325941
* Bring r325915 back.Rafael Espindola2018-02-23198-1970/+2020
| | | | | | | | | | | | | | | The tests that failed on a windows host have been fixed. Original message: Start setting dso_local for COFF. With this there are still some GVs where we don't set dso_local because setGVProperties is never called. I intend to fix that in followup commits. This is just the bare minimum to teach shouldAssumeDSOLocal what it should do for COFF. llvm-svn: 325940
* [PATCH] [AArch64] Add new target feature to fuse conditional selectEvandro Menezes2018-02-234-22/+103
| | | | | | | | | This feature enables the fusion of the comparison and the conditional select instructions together. Differential revision: https://reviews.llvm.org/D42392 llvm-svn: 325939
* Fix compiler warning introduced in r325931. NFC.Geoff Berry2018-02-231-3/+2
| | | | llvm-svn: 325938
* [Test] Fix the test to output to /dev/null instead of redirecting.Matt Davis2018-02-231-1/+1
| | | | | | The redirection was confusing the windows build machine. llvm-svn: 325937
* [X86][SSE] Add x > C-1 ? x+-C : 0 --> subus x, C test caaes for non-uniform ↵Simon Pilgrim2018-02-231-0/+136
| | | | | | constants llvm-svn: 325936
* [MemorySSA] Use fewer magic numbers. NFCGeorge Burgess IV2018-02-231-1/+1
| | | | | | | | | INVALID_MEMORYACCESS_ID == 0. This patch also makes this initialization consistent with the rest of the "invalid" ones in this file. llvm-svn: 325935
* [MemorySSA] Reduce padding in MemoryDefs. NFCGeorge Burgess IV2018-02-231-1/+1
| | | | llvm-svn: 325934
* [X86] Custom split v32i16/v64i8 bitcasts when AVX512F is available, but BWI ↵Craig Topper2018-02-232-2123/+126
| | | | | | | | | | is not. The test changes you can see are related to the changes in ReplaceNodeResults. Though shuffle-vs-trunc-512.ll does have a test that exercises the code in LowerBITCAST. Looks like the test output didn't change because DAG combining is able to clean up the resulting type legalization. Adding the custom hook just makes type legalization work less hard. Differential Revision: https://reviews.llvm.org/D43447 llvm-svn: 325933
OpenPOWER on IntegriCloud