- Aug 03, 2017
-
-
Quentin Colombet authored
With this change, the GlobalISel library gets always built. In particular, this is not possible to opt GlobalISel out of the build using the LLVM_BUILD_GLOBAL_ISEL variable any more. llvm-svn: 309990
-
Davide Italiano authored
Patch by Daniel Berlin, fixes PR33196 (and probably something else). llvm-svn: 309988
-
Reid Kleckner authored
Summary: PDB section contributions are supposed to use output section indices and offsets, not input section indices and offsets. This allows the debugger to look up the index of the module that it should look up in the modules stream for symbol information. With this change, windbg can now find line tables, but it still cannot print local variables. Fixes PR34048 Reviewers: zturner Subscribers: hiraditya, ruiu, llvm-commits Differential Revision: https://reviews.llvm.org/D36285 llvm-svn: 309987
-
Hiroshi Yamauchi authored
Summary: (This is a second attempt as https://reviews.llvm.org/D34822 was reverted.) LazyValueInfo currently computes the constant value of the switch condition through case edges, which allows the constant value to be propagated through the case edges. But we have seen a case where a zero-extended value of the switch condition is used past case edges for which the constant propagation doesn't occur. This patch adds a small logic to handle such a case in getEdgeValueLocal(). This is motivated by the Python 2.7 eval loop in PyEval_EvalFrameEx() where the lack of the constant propagation causes longer live ranges and more spill code than necessary. With this patch, we see that the code size of PyEval_EvalFrameEx() decreases by ~5.4% and a performance test improves by ~4.6%. Reviewers: sanjoy Reviewed By: sanjoy Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D36247 llvm-svn: 309986
-
Taewook Oh authored
Summary: Move test/CodeGen/AArch64/reg-bank-128bit.mir to test/CodeGen/AArch64/GlobalISel/reg-bank-128bit.mir so that the test is executed only when global-isel is enabled. lit.local.cfg under test/CodeGen/AArch64/GlobalISel checks if 'global-isel' is in the available_features while the same file under test/CodeGen/AArch64 doesn't. Reviewers: qcolombet, davide Reviewed By: davide Subscribers: davide, aemerson, javed.absar, igorb, kristof.beyls, llvm-commits Differential Revision: https://reviews.llvm.org/D36282 llvm-svn: 309985
-
Zachary Turner authored
Sometimes the normal module equivalence detection algorithm doesn't quite work. For example, you might build the same program with MSVC and clang-cl, outputting to different object files, exes, and PDBs, then compare them. If the object files have different names though, then they won't be treated as equivalent. This way we can force specific module indices to be treated as equivalent. llvm-svn: 309983
-
George Karpenkov authored
Differential Revision: https://reviews.llvm.org/D36242 llvm-svn: 309982
-
Connor Abbott authored
llvm-svn: 309981
-
Nico Weber authored
The file is called "intrin.h". When building targeting Windows on a Linux system, with the SDK mounted in a case-insensitive file system, "Intrin.h" will miss clang's intrin.h header (because that's not in a case-insensitive file system) but then find intrin.h in the Microsoft SDK. clang can't handle the SDK's intrin.h. https://reviews.llvm.org/D36281 llvm-svn: 309980
-
Greg Bedwell authored
Multi-configuration CMake generators such as those for Visual Studio or Xcode do not specify a build config at configure time, but let the user choose at build time. In these cases binaries go into build/${Configuration}/bin rather than build/bin. Prior to this commit, check-lit would fail when using multi-configuration generators as it did not know how to resolve ${Configuration} in order to find tools such as FileCheck. This commit teaches it to resolve llvm_tools_dir within lit using the value specified with --param build_mode. Differential Revision: https://reviews.llvm.org/D36263 llvm-svn: 309967
-
Teresa Johnson authored
Summary: Peeling should not occur during the full unrolling invocation early in the pipeline, but rather later with partial and runtime loop unrolling. The later loop unrolling invocation will also eventually utilize profile summary and branch frequency information, which we would like to use to control peeling. And for ThinLTO we want to delay peeling until the backend (post thin link) phase, just as we do for most types of unrolling. Ensure peeling doesn't occur during the full unrolling invocation by adding a parameter to the shared implementation function, similar to the way partial and runtime loop unrolling are disabled. Performance results for ThinLTO suggest this has a neutral to positive effect on some internal benchmarks. Reviewers: chandlerc, davidxl Subscribers: mzolotukhin, llvm-commits, mehdi_amini Differential Revision: https://reviews.llvm.org/D36258 llvm-svn: 309966
-
Dehao Chen authored
Summary: For SamplePGO, we already record the callsite count in the call instruction itself. So we do not want to use BFI to get profile count as it is less accurate. Reviewers: tejohnson, davidxl, eraman Reviewed By: eraman Subscribers: sanjoy, llvm-commits, mehdi_amini Differential Revision: https://reviews.llvm.org/D36025 llvm-svn: 309964
-
Simon Pilgrim authored
When both the vector inputs of the shuffle vector is comprising of same vector or shuffle mask is accessing elements from only one operand vector (like in PR33758 test already present). Committed on behalf of @jbhateja (Jatin Bhateja) Differential Revision: https://reviews.llvm.org/D36271 llvm-svn: 309963
-
Tim Northover authored
This reverts commit r309821. My suggestion was wrong because it left the MachineOperands tied which confused the verifier. Since there's no easy way to untie operands, the original BuildMI solution is probably best. llvm-svn: 309962
-
Simon Pilgrim authored
llvm-svn: 309961
-
Changpeng Fang authored
AMDGPU/SI: Don't fix a PHI under uniform branch in SIFixSGPRCopies only when sources and destination are all sgprs Summary: If a PHI has at lease one VGPR operand, we have to fix the PHI in SIFixSGPRCopies. Reviewer: Matt Differential Revision: http://reviews.llvm.org/D34727 llvm-svn: 309959
-
Benjamin Kramer authored
llvm-svn: 309952
-
Nirav Dave authored
Remove restriction disallowing merging of stores vector loads into larger store of larger vector load. Reviewers: RKSimon, efriedma, spatel Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D36158 llvm-svn: 309951
-
Nico Weber authored
llvm-svn: 309950
-
Nirav Dave authored
Consider the following instruction: "inst.eq $dst, $src" where ".eq" is an optional flag operand. The $src and $dst operands are registers. If we parse the instruction "inst r0, r1", the flag is not present and it will be marked in the "OptionalOperandsMask" variable. After the matching is complete we call the "convertToMCInst" method. The current implementation works only if the optional operands are at the end of the array. The "Operands" array looks like [token:"inst", reg:r0, reg:r1]. The first operand that must be added to the MCInst is the destination, the r0 register. The "OpIdx" (in the Operands array) for this register is 2. However, since the flag is not present in the Operands, the actual index for r0 should be 1. The flag is not present since we rely on the default value. This patch removes the "NumDefaults" variable and replaces it with an array (DefaultsOffset). This array contains an index for each operand (excluding the mnemonic). At each index, the array contains the number of optional operands that should be subtracted. For the previous example, this array looks like this: [0, 1, 1]. When we need to access the r0 register, we compute its index as 2 - DefaultsOffset[1] = 1. Patch by Alexandru Guduleasa! Reviewers: SamWot, nhaustov, niravd Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D35998 llvm-svn: 309949
-
Sanjay Patel authored
llvm-svn: 309946
-
Sanjay Patel authored
llvm-svn: 309945
-
Florian Hahn authored
Summary: We only need to merge memory operands for instructions that access memory. This slightly reduces the number of actions executed. Reviewers: MatzeB, rovka, dsanders Reviewed By: dsanders Subscribers: aemerson, igorb, kristof.beyls, llvm-commits Differential Revision: https://reviews.llvm.org/D36151 llvm-svn: 309944
-
Robert Lougher authored
The debug value live intervals computed by Live Debug Variables may extend beyond the range of the debug location's lexical scope. In this case, splitting of an interval can result in an interval outside of the scope being created, causing extra unnecessary DBG_VALUEs to be emitted. To prevent this, trim the intervals to the lexical scope. This resolves PR33730. Reviewers: aprantl Differential Revision: https://reviews.llvm.org/D35953 llvm-svn: 309933
-
NAKAMURA Takumi authored
llvm-svn: 309932
-
NAKAMURA Takumi authored
llvm-svn: 309931
-
Simon Dardis authored
rL306209 taught SelectionDAG how to add the dereferenceable flag when expanding memcpy and memmove. The fix however contained a nit where the offset + size was constructed as an APInt of PointerSize rather than PointerSizeInBits. This lead to isDereferenceableAndAlignedPointer() get truncated values or values which would be sign extended within that function leading to incorrect results. Thanks to Alex Crichton for reporting the issue! This resolves PR33978. Reviewers: inouehrs Differential Revision: https://reviews.llvm.org/D36236 llvm-svn: 309930
-
Max Kazantsev authored
llvm-svn: 309929
-
Ewan Crawford authored
Duplicating the distinct Subprogram and CU metadata nodes seems like the incorrect thing to do in CloneModule for GlobalVariable debug info. As it results in the scope of the GlobalVariable DI no longer being consistent with the rest of the module, and the new CU is absent from llvm.dbg.cu. Fixed by adding RF_MoveDistinctMDs to MapMetadata flags for GlobalVariables. Current unit test IR after clone: ``` @gv = global i32 1, comdat($comdat), !dbg !0, !type !5 define private void @f() comdat($comdat) personality void ()* @persfn !dbg !14 { !llvm.dbg.cu = !{!10} !0 = !DIGlobalVariableExpression(var: !1) !1 = distinct !DIGlobalVariable(name: "gv", linkageName: "gv", scope: !2, file: !3, line: 1, type: !9, isLocal: false, isDefinition: true) !2 = distinct !DISubprogram(name: "f", linkageName: "f", scope: null, file: !3, line: 4, type: !4, isLocal: true, isDefinition: true, scopeLine: 3, isOptimized: false, unit: !6, variables: !5) !3 = !DIFile(filename: "filename.c", directory: "/file/dir/") !4 = !DISubroutineType(types: !5) !5 = !{} !6 = distinct !DICompileUnit(language: DW_LANG_C99, file: !7, producer: "CloneModule", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !5, globals: !8) !7 = !DIFile(filename: "filename.c", directory: "/file/dir") !8 = !{!0} !9 = !DIBasicType(tag: DW_TAG_unspecified_type, name: "decltype(nullptr)") !10 = distinct !DICompileUnit(language: DW_LANG_C99, file: !7, producer: "CloneModule", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !5, globals: !11) !11 = !{!12} !12 = !DIGlobalVariableExpression(var: !13) !13 = distinct !DIGlobalVariable(name: "gv", linkageName: "gv", scope: !14, file: !3, line: 1, type: !9, isLocal: false, isDefinition: true) !14 = distinct !DISubprogram(name: "f", linkageName: "f", scope: null, file: !3, line: 4, type: !4, isLocal: true, isDefinition: true, scopeLine: 3, isOptimized: false, unit: !10, variables: !5) ``` Patched IR after clone: ``` @gv = global i32 1, comdat($comdat), !dbg !0, !type !5 define private void @f() comdat($comdat) personality void ()* @persfn !dbg !2 { !llvm.dbg.cu = !{!6} !0 = !DIGlobalVariableExpression(var: !1) !1 = distinct !DIGlobalVariable(name: "gv", linkageName: "gv", scope: !2, file: !3, line: 1, type: !9, isLocal: false, isDefinition: true) !2 = distinct !DISubprogram(name: "f", linkageName: "f", scope: null, file: !3, line: 4, type: !4, isLocal: true, isDefinition: true, scopeLine: 3, isOptimized: false, unit: !6, variables: !5) !3 = !DIFile(filename: "filename.c", directory: "/file/dir/") !4 = !DISubroutineType(types: !5) !5 = !{} !6 = distinct !DICompileUnit(language: DW_LANG_C99, file: !7, producer: "CloneModule", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !5, globals: !8) !7 = !DIFile(filename: "filename.c", directory: "/file/dir") !8 = !{!0} !9 = !DIBasicType(tag: DW_TAG_unspecified_type, name: "decltype(nullptr)") ``` Reviewers: aprantl, probinson, dblaikie, echristo, loladiro Reviewed By: aprantl Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D36082 llvm-svn: 309928
-
Diana Picus authored
Add support in the instruction selector for G_GLOBAL_VALUE for ELF and MachO for the static relocation model. We don't handle Windows yet because that's Thumb-only, and we don't handle Thumb in general at the moment. Support for PIC, ROPI, RWPI and TLS will be added in subsequent commits. Differential Revision: https://reviews.llvm.org/D35883 llvm-svn: 309927
-
Dinar Temirbulatov authored
Differential Revision: https://reviews.llvm.org/D35965 llvm-svn: 309926
-
Max Kazantsev authored
The patch rL309080 was reverted because it did not clean up the cache on "forgetValue" method call. This patch re-enables this change, adds the missing check and introduces two new unit tests that make sure that the cache is cleaned properly. Differential Revision: https://reviews.llvm.org/D36087 llvm-svn: 309925
-
Daniel Sanders authored
llvm-svn: 309924
-
Roger Ferrer Ibanez authored
This patch: - makes nodes ISD::ADDCARRY and ISD::SUBCARRY legal for i32 - lowering is done by first converting the boolean value into the carry flag using (_, C) <- (ARMISD::ADDC R, -1) and converted back to an integer value using (R, _) <- (ARMISD::ADDE 0, 0, C). An ARMISD::ADDE between the two operations does the actual addition. - for subtraction, given that ISD::SUBCARRY second result is actually a borrow, we need to invert the value of the second operand and result before and after using ARMISD::SUBE. We need to invert the carry result of ARMISD::SUBE to preserve the semantics. - given that the generic combiner may lower ISD::ADDCARRY and ISD::SUBCARRY into ISD::UADDO and ISD::USUBO we need to update their lowering as well otherwise i64 operations now would require branches. This implies updating the corresponding test for unsigned. - add new combiner to remove the redundant conversions from/to carry flags to/from boolean values (ARMISD::ADDC (ARMISD::ADDE 0, 0, C), -1) -> C Differential Revision: https://reviews.llvm.org/D35192 llvm-svn: 309923
-
Daniel Jasper authored
llvm-svn: 309922
-
Rafael Espindola authored
llvm-svn: 309921
-
Tobias Grosser authored
Remove the second part of the TODO comment that highlighted an issue with possibly connecting all nodes to the exit of the CFG. This caused concerns with Jakub Kuderski regarding its feasability, hence we remove it. Such points are better discussed outside of CFG. If connecting all nodes makes sense and what the impact is is currently part of an active review discussion. llvm-svn: 309919
-
Rafael Espindola authored
llvm-svn: 309918
-
Sameer AbuAsal authored
Summary: To delete an instruction the coalescer needs to call eraseFromParent() on the MachineInstr, insert it in the ErasedInstrs list and update the Live Ranges structure. This patch re-factors the code to do all that in one function. This will also fix cases where previous code wasn't inserting deleted instructions in the ErasedList. Reviewers: qcolombet, kparzysz Reviewed By: qcolombet Subscribers: MatzeB, llvm-commits, qcolombet Differential Revision: https://reviews.llvm.org/D36204 llvm-svn: 309915
-
Rafael Espindola authored
IMHO it is an antipattern to have a enum value that is Default. At any given piece of code it is not clear if we have to handle Default or if has already been mapped to a concrete value. In this case in particular, only the target can do the mapping and it is nice to make sure it is always done. This deletes the two default enum values of CodeModel and uses an explicit Optional<CodeModel> when it is possible that it is unspecified. llvm-svn: 309911
-