- Apr 22, 2019
-
-
Philip Reames authored
llvm-svn: 358906
-
Ben Hamilton authored
[ASTMatchers] Introduce Objective-C matchers `isClassMessage`, `isClassMethod`, and `isInstanceMethod` Summary: isClassMessage is an equivalent to isInstanceMessage for ObjCMessageExpr, but matches message expressions to classes. isClassMethod and isInstanceMethod check whether a method declaration (or definition) is for a class method or instance method (respectively). Contributed by @mywman! Reviewers: benhamilton, klimek, mwyman Reviewed By: benhamilton, mwyman Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D60920 llvm-svn: 358904
-
Justin Bogner authored
Back in August, r340525 introduced a dependency on the assumption cache tracker in the ipsccp pass, but that commit missed a call to INITIALIZE_PASS_DEPENDENCY, which leaves the assumption cache improperly registered if SCCP is the only thing that pulls it in. llvm-svn: 358903
-
Alexey Bataev authored
Fix the test to run it really in SPMD mode without runtime. Previously it was run in SPMD + full runtime mode and does not allow to cehck the functionality correctly. llvm-svn: 358902
-
Philip Reames authored
Currently, we do not expose BPI to loop passes at all. In the old pass manager, we appear to have been ignoring the fact that LCSSA and/or LoopSimplify didn't preserve BPI, and making it available to the following loop passes anyways. In the new one, it's invalidated before running any loop pass if either LCSSA or LoopSimplify actually make changes. If they don't make changes, then BPI is valid and available. So, we go ahead and teach LCSSA and LoopSimplify how to preserve BPI for consistency between old and new pass managers. This patch avoids an invalidation between the two requires in the following trivial pass pipeline: opt -passes="requires<branch-prob>,loop(no-op-loop),requires<branch-prob>" (when the input file is one which requires either LCSSA or LoopSimplify to canonicalize the loops) Differential Revision: https://reviews.llvm.org/D60790 llvm-svn: 358901
-
Wei Mi authored
to CallInst. The issue was raised here: https://reviews.llvm.org/D60903#1472783 The function Instruction::updateProfWeight is only used for CallInst in profile update. From the current interface, it is very easy to think that the function can also be used for branch instruction. However, Branch instruction does't need the scaling the function provides for branch_weights and VP (value profile), in addition, scaling may introduce inaccuracy for branch probablity. The patch moves the function updateProfWeight from Instruction class to CallInst to remove the confusion. The patch also changes the scaling of branch_weights from a loop to a block because we know that ProfileData for branch_weights of CallInst will only have two operands at most. Differential Revision: https://reviews.llvm.org/D60911 llvm-svn: 358900
-
Sam Clegg authored
We can't (currently) meaningfully resolve certain types of relocations against undefined data symbols. Previously when `--allow-undefined` was used we were treating such relocation much like weak data symbols and simply inserting zeros. This change turns such use cases in to an error. This means that `--allow-undefined` is no longer effective for data symbols. Fixes https://bugs.llvm.org/show_bug.cgi?id=40364 Differential Revision: https://reviews.llvm.org/D60882 llvm-svn: 358899
-
Matt Davis authored
Summary: * Removed a member that was only used during construction. * Use range-based for iteration when accessing the result of the search. * Require an `ObjCMethodDecl` reference upon construction of an * Constify. Reviewers: rjmccall Reviewed By: rjmccall Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D60850 llvm-svn: 358898
-
Fangrui Song authored
llvm-svn: 358897
-
Louis Dionne authored
llvm-svn: 358896
-
Aaron Ballman authored
llvm-svn: 358895
-
Matt Arsenault authored
llvm-svn: 358894
-
Fangrui Song authored
llvm-svn: 358893
-
Matt Arsenault authored
llvm-svn: 358892
-
Nico Weber authored
llvm-svn: 358891
-
Matt Arsenault authored
Effectively reverts r356956. The check for isFullCopy was excessive, but there still needs to be a check that this is a copy. llvm-svn: 358890
-
George Rimar authored
section-index.elf was removed and the corresponding test was replaced with a yaml2obj based test. llvm-svn: 358889
-
Dmitry Preobrazhensky authored
See bug 41156: https://bugs.llvm.org/show_bug.cgi?id=41156 Reviewers: artem.tamazov, arsenm Differential Revision: https://reviews.llvm.org/D60624 llvm-svn: 358888
-
Simon Pilgrim authored
This patch adds support for BigBitWidth -> SmallBitWidth bitcasts, splitting the DemandedBits/Elts accordingly. The AMDGPU backend needed an extra (srl (and x, c1 << c2), c2) -> (and (srl(x, c2), c1) combine to encourage BFE creation, I investigated putting this in DAGCombine but it caused a lot of noise on other targets - some improvements, some regressions. The X86 changes are all definite wins. Differential Revision: https://reviews.llvm.org/D60462 llvm-svn: 358887
-
Sanjay Patel authored
llvm-svn: 358886
-
George Rimar authored
LLD did not use ELF::Chdr::ch_addralign for decompressed sections. This resulted in a broken output. Fixes https://bugs.llvm.org/show_bug.cgi?id=40482. Differential revision: https://reviews.llvm.org/D60959 llvm-svn: 358885
-
Sanjay Patel authored
llvm-svn: 358884
-
Robert Widmann authored
Summary: Add a getter and setter pair for floating-point accuracy metadata. Reviewers: whitequark, deadalnix Reviewed By: whitequark Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60527 llvm-svn: 358883
-
Bruno Ricci authored
CWG 1691 changed the definition of the namespaces associated with a class type or enumeration type. For a class type, the associated namespaces are the innermost enclosing namespaces of the associated classes. For an enumeration type, the associated namespace is the innermost enclosing namespace of its declaration. This also fixes CWG 1690 and CWG 1692. Differential Revision: https://reviews.llvm.org/D60573 Reviewed By: rjmccall, rsmith llvm-svn: 358882
-
Bruno Ricci authored
The goal here is to exercise each rule in [basic.lookup.argdep] at least once. These new tests expose what I believe are 2 issues: 1. CWG 1691 needs to be implemented (p2: [...] Its associated namespaces are the innermost enclosing namespaces of its associated classes [...]) The corresponding tests are adl_class_type::X2 and adl_class_type::X5. 2. The end of paragraph 2 ([...] Additionally, if the aforementioned set of overloaded functions is named with a template-id, its associated classes and namespaces also include those of its type template-arguments and its template template-arguments.) is not implemented. Closely related, the restriction on non-dependent parameter types in this same paragraph needs to be removed. The corresponding tests are in adl_overload_set (both issues are from CWG 997). Differential Revision: https://reviews.llvm.org/D60570 Reviewed By: riccibruno, Quuxplusone llvm-svn: 358881
-
Serguei Katkov authored
This patch enables passing options to SimpleLoopUnswitch via the passes pipeline. Reviewers: chandlerc, fedor.sergeev, leonardchan, philip.pfaffe Reviewed By: fedor.sergeev Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D60676 llvm-svn: 358880
-
Simon Pilgrim authored
Prep work for D60462 llvm-svn: 358879
-
Serguei Katkov authored
llvm-svn: 358878
-
Kristof Umann authored
llvm-svn: 358877
-
Nikita Popov authored
This reverts commit 7bf4d7c07f2fac862ef34c82ad0fef6513452445. After thinking about this more, this isn't right, the range is not exact in the same sense as makeExactICmpRegion(). This needs a separate function. llvm-svn: 358876
-
Nikita Popov authored
Following D60632 makeGuaranteedNoWrapRegion() always returns an exact nowrap region. Rename the function accordingly. This is in line with the naming of makeExactICmpRegion(). llvm-svn: 358875
-
George Rimar authored
This is the https://bugs.llvm.org/show_bug.cgi?id=41356, Seems it is kind of unusual case but it is possible to have sections that require quotes for their namings. Like "aaa bbb". This patch adds support for those. Differential revision: https://reviews.llvm.org/D60901 llvm-svn: 358874
-
Aleksandr Urakov authored
Summary: This patch adds anonymous namespaces support to the native PDB plugin. I had to reference from the main function variables of the types that are inside of the anonymous namespace to include them in debug info. Without the references they are not included. I think it's because they are static, then are visible only in the current translation unit, so they are not needed without any references to them. There is also the problem case with variables of types that are nested in template structs. For now I've left FIXME in the test because this case is not related to the change. Reviewers: zturner, asmith, labath, stella.stamenova, amccarth Reviewed By: amccarth Subscribers: zloyrobot, aprantl, teemperor, lldb-commits, leonid.mashinskiy Tags: #lldb Differential Revision: https://reviews.llvm.org/D60817 llvm-svn: 358873
-
Craig Topper authored
[X86] Reject 512-bit types in getRegForInlineAsmConstraint when AVX512 is not enabled. Same for 256 bit and AVX. llvm-svn: 358872
-
Sam Clegg authored
We were incorrectly used the symbol table version of the function rather than the object-local version when checking the existing relocation value. This was causing erroneous warnings for comat symbols defined in multiple object.s Fixes: https://bugs.llvm.org/show_bug.cgi?id=40503 Differential Revision: https://reviews.llvm.org/D60928 llvm-svn: 358871
-
Fangrui Song authored
Summary: Fixes PR35242. A simplified reproduce: thread_local int i; int f() { return i; } % {g++,clang++} -fPIC -shared -ftls-model=local-dynamic -fuse-ld=lld a.cc ld.lld: error: can't create dynamic relocation R_X86_64_DTPOFF32 against symbol: i in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output In isStaticLinkTimeConstant(), Syn.IsPreemptible is true, so it is not seen as a constant. The error is then issued in processRelocAux(). A symbol of the local-dynamic TLS model cannot be preempted but it can preempt symbols of the global-dynamic TLS model in other DSOs. So it makes some sense that the variable is not static. This patch fixes the linking error by changing getRelExpr() on R_386_TLS_LDO_32 and R_X86_64_DTPOFF{32,64} from R_ABS to R_DTPREL. R_PPC64_DTPREL_* and R_MIPS_TLS_DTPREL_* need similar fixes, but they are not handled in this patch. As a bonus, we use `if (Expr == R_ABS && !Config->Shared)` to find ld-to-le opportunities. R_ABS is overloaded here for such STT_TLS symbols. A dedicated R_DTPREL is clearer. Differential Revision: https://reviews.llvm.org/D60945 llvm-svn: 358870
-
Lang Hames authored
llvm-svn: 358869
-
Fangrui Song authored
Summary: This relocation type is used by R_386_TLS_GD. Its formula is the same as R_GOTPLT (e.g R_X86_64_GOT{32,64} R_386_TLS_GOTIE). Rename it to be clearer. Differential Revision: https://reviews.llvm.org/D60941 llvm-svn: 358868
-
Fangrui Song authored
Otherwise llvm-jit would say "utils/lit/lit/llvm/subst.py:127: note: Did not find llvm-jitlink in ..." llvm-svn: 358867
-
Fangrui Song authored
Patch by Nathan Ridge! Dependent bases are handled heuristically, by replacing them with the class template that they are a specialization of, where possible. Care is taken to avoid infinite recursion. Differential Revision: https://reviews.llvm.org/D59756 llvm-svn: 358866
-