summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* [X86][SSE] combineX86ShufflesRecursively - at Depth==0, only resolve ↵Simon Pilgrim2019-11-031-6/+31
| | | | | | | | KnownZero if it removes an input. This stops infinite loops where KnownUndef elements are converted to Zeroable, resulting in KnownZero elements which are then simplified (via SimplifyDemandedElts etc.) back to KnownUndef elements........ Prep fix for PR43024 which will allow rL368307 to be re-applied.
* [SIMachineScheduler] Fixed ''then' statement is equivalent to the 'else' ↵Dávid Bolvanský2019-11-031-6/+1
| | | | statement.' warning. NFCI.
* [SILoadStoreOptimizer] Fixed typo. NFCI.Dávid Bolvanský2019-11-031-1/+1
|
* Reland '[InstructionCombining] Fixed null check after dereferencing warning. ↵Dávid Bolvanský2019-11-031-2/+5
| | | | NFCI.'
* Revert "[InstructionCombining] Fixed null check after dereferencing warning. ↵Dávid Bolvanský2019-11-031-1/+0
| | | | | | NFCI." This reverts commit 8308187fd9bfa08ffad0a636d4dd1d25e7de5a76. This exposed a bug.
* [SCEV] Fixed 'Uninitialized variable 'ContainsAddRec' used.' warning. NFCI.Dávid Bolvanský2019-11-031-1/+1
|
* [MemorySSA] Fixed null check after dereferencing warning. NFCI.Dávid Bolvanský2019-11-031-0/+1
|
* Revert "[InstructionCompares] Fixed null check after dereferencing warning. ↵Dávid Bolvanský2019-11-031-1/+0
| | | | | | NFCI." This reverts commit b8685cf3042f6a2e129061922bd6b18e3c42258e.
* [InstructionCompares] Fixed null check after dereferencing warning. NFCI.Dávid Bolvanský2019-11-031-0/+1
|
* [InstructionCombining] Fixed null check after dereferencing warning. NFCI.Dávid Bolvanský2019-11-031-0/+1
|
* [CHR] Fixed null check after dereferencing warning. NFCI.Dávid Bolvanský2019-11-031-1/+1
|
* [LoopUnrollRuntime] Fixed null check after dereferencing warning. NFCI.Dávid Bolvanský2019-11-031-2/+2
|
* [LoopUnrollAndJam] Fixed null check after dereferencing warning. NFCI.Dávid Bolvanský2019-11-031-1/+3
|
* [BitcodeReader] Fixed use after move warnings. NFCI.Dávid Bolvanský2019-11-031-10/+0
|
* [BitcodeReader] Fixed null check after dereferencing warning. NFCI.Dávid Bolvanský2019-11-031-1/+1
|
* [BitcodeReader] Fixed null pointer dereferencing warning. NFCI.Dávid Bolvanský2019-11-031-0/+1
|
* [SelectionDAG] Fixed null check after dereferencing warning. NFCI.Dávid Bolvanský2019-11-031-1/+1
|
* [X86][SSE] combineX86ShufflesRecursively - don't bother merging shuffles ↵Simon Pilgrim2019-11-031-92/+105
| | | | | | with empty roots. NFCI. This doesn't affect actual codegen, but is a minor refactor toward fixing PR43024 where we need to avoid excess changes (folding zeroables etc.) to the shuffle mask at Depth == 0.
* [X86] Convert PICStyles::Style to scoped enum class. NFCI.Simon Pilgrim2019-11-032-11/+11
| | | | Fixes MSVC static analyzer warnings about enum safety, this enum performs no integer math so it'd be better to fix its scope.
* [DebugInfo] Fix for DW_OP_LLVM_fragment in DIExpression::isImplicit()Bjorn Pettersson2019-11-031-9/+16
| | | | | | | | | | | DIExpression::isImplicit() did not handle DW_OP_LLVM_fragment correctly. It was scanning the elements in the expression by iterating from the end. But we do not know the position of ops unless we iterate from the beginning of the expression, since DW_OP:s and their operands are stored flat in the expression list. The old code also assumed that a DW_OP_LLVM_fragment only occupied one element in the expression list, but it actually occupies three elements.
* [BPF] fix a bug in __builtin_preserve_field_info() with FIELD_BYTE_SIZEYonghong Song2019-11-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | During deriving proper bitfield access FIELD_BYTE_SIZE, function Member->getStorageOffsetInBits() is used to get llvm IR type storage offset in bits so that the byte size can permit aligned loads/stores with previously derived FIELD_BYTE_OFFSET. The function should only be used with bitfield members and it will assert if ASSERT is turned on during cmake build. Constant *getStorageOffsetInBits() const { assert(getTag() == dwarf::DW_TAG_member && isBitField()); if (auto *C = cast_or_null<ConstantAsMetadata>(getExtraData())) return C->getValue(); return nullptr; } This patch fixed the issue by using Member->isBitField() directly and a test case is added to cover this missing case. This issue is discovered when running Andrii's linux kernel CO-RE tests. Differential Revision: https://reviews.llvm.org/D69761
* Ensure VPlanPrinter::Depth is initialized to fix static analyzer warning. NFCI.Simon Pilgrim2019-11-031-1/+1
|
* Fix uninitialized variable warning. NFCI.Simon Pilgrim2019-11-031-1/+1
|
* [CodeGen] [ExpandReduction] Fix the bug for ExpandReduction() when vector ↵shkzhang2019-11-021-0/+6
| | | | | | | | | | | | | | | | | | | | size isn't power of 2 Summary: For below test case, we will get assert error except for AArch64 and ARM: declare i8 @llvm.experimental.vector.reduce.and.i8.v3i8(<3 x i8> %a) define i8 @test_v3i8(<3 x i8> %a) nounwind { %b = call i8 @llvm.experimental.vector.reduce.and.i8.v3i8(<3 x i8> %a) ret i8 %b } In the function getShuffleReduction (), we can see it needs the vector size must be power of 2. This patch is fix below error when the number of element is not power of 2 for those llvm.experimental.vector.reduce.* function. Reviewed By: jsji Differential Revision: https://reviews.llvm.org/D68625
* [mips] Remove trailing spaces. NFCSimon Atanasyan2019-11-031-4/+4
|
* [mips] Split long lines in the code. NFCSimon Atanasyan2019-11-0328-143/+216
|
* A15SDOptimizer::getPrefSPRLane - fix null dereference warning. NFCISimon Pilgrim2019-11-021-2/+1
|
* [LV] Generalize conditions for sinking instrs for first order recurrences.Florian Hahn2019-11-021-14/+26
| | | | | | | | | | | | | | | | | | | | | | | | | If the recurrence PHI node has a single user, we can sink any instruction without side effects, given that all users are dominated by the instruction computing the incoming value of the next iteration ('Previous'). We can sink instructions that may cause traps, because that only causes the trap to occur later, but not on any new paths. With the relaxed check, we also have to make sure that we do not have a direct cycle (meaning PHI user == 'Previous), which indicates a reduction relation, which potentially gets missed by ReductionDescriptor. As follow-ups, we can also sink stores, iff they do not alias with other instructions we move them across and we could also support sinking chains of instructions and multiple users of the PHI. Fixes PR43398. Reviewers: hsaito, dcaballe, Ayal, rengolin Reviewed By: Ayal Differential Revision: https://reviews.llvm.org/D69228
* isImmPCRel/isImmSigned - both functions should return bool not unsigned. NFCI.Simon Pilgrim2019-11-021-2/+2
|
* [Attributor][NFCI] Do not track unnecessary dependencesJohannes Doerfert2019-11-021-3/+8
| | | | | If we do not look at assumed information there is no need to track dependences.
* [Attributor][NFCI] Distinguish optional and required dependencesJohannes Doerfert2019-11-021-12/+52
| | | | | | | | | | | | | | | | | | Dependences between two abstract attributes SRC and TRG come naturally in two flavors: Either (1) "some" information of SRC is *required* for TRG to derive information, or (2) SRC is just an *optional* way for TRG to derive information. While it is not strictly necessary to distinguish these types explicitly, it can help us to converge faster, in terms of iterations, and also cut down the number of `AbstractAttribute::update` calls. As far as I can tell, we only use optional dependences for liveness so far but that might change in the future. With this change the Attributor can be informed about the "dependence class" and it will perform appropriate actions when an Attribute is set to an invalid state, thus one that cannot be used by others to derive information from.
* ARMAttributeParser - fix shadow variable name warnings from decodeULEB128 ↵Simon Pilgrim2019-11-021-9/+9
| | | | | | calls. NFCI. Consistently rename the Length attribute to DecodeLength in decodeULEB128 calls.
* [LegacyPassManager] Fixed "null check after derefencing" warningDávid Bolvanský2019-11-021-2/+1
| | | | The 'RequiredPass' pointer was utilized before it was verified against nullptr. Check lines: 1626, 1629.
* X86_MC::createX86MCSubtargetInfo - X86_MC::ParseX86Triple never returns an ↵Simon Pilgrim2019-11-021-6/+3
| | | | | | empty string. NFCI. PVS Studio was complaining that the expression '!ArchFS.empty()' is always true.
* X86Operand::print - fix SymName shadow variable warning. NFCI.Simon Pilgrim2019-11-021-2/+2
|
* NoFree argument attribute.Stefan Stipanovic2019-11-023-16/+155
| | | | | | | | | | | | Summary: Deducing nofree atrribute for function arguments. Reviewers: jdoerfert Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D67886
* FastISel - fix uninitialized variable warnings in constructor. NFCI.Simon Pilgrim2019-11-021-1/+2
|
* X86AsmPrinter - fix uninitialized variable warnings. NFCI.Simon Pilgrim2019-11-021-2/+2
|
* Revert "NoFree argument attribute."Stefan Stipanovic2019-11-023-155/+16
| | | | This reverts commit c12efa2ed0547f7f9f8fba0ad7a76a4cb08bf53a.
* TargetMachine - fix uninitialized variable warning. NFCI.Simon Pilgrim2019-11-021-2/+2
| | | | TargetPassConfig::addCoreISelPasses() always initializes O0WantsFastISel but it appeases static analyzers that complain that O0WantsFastISel isn't initialized in the constructor.
* NoFree argument attribute.Stefan Stipanovic2019-11-023-16/+155
| | | | | | | | | | | | Summary: Deducing nofree atrribute for function arguments. Reviewers: jdoerfert Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D67886
* Fix uninitialized variable warning. NFCI.Simon Pilgrim2019-11-021-1/+1
|
* [X86] Move computeZeroableShuffleElements before ↵Simon Pilgrim2019-11-021-87/+87
| | | | | | getTargetShuffleAndZeroables. NFCI. Prep work toward merging some of the functionality.
* Revert BCmp Loop Idiom recognition transform (PR43870)Roman Lebedev2019-11-021-877/+8
| | | | | | | | | | | | | | | | | As discussed in https://bugs.llvm.org/show_bug.cgi?id=43870, this transform is missing a crucial legality check: the old (non-countable) loop would early-return upon first mismatch, but there is no such guarantee for bcmp/memcmp. We'd need to ensure that [PtrA, PtrA+NBytes) and [PtrB, PtrB+NBytes) are fully dereferenceable memory regions. But that would limit the transform to constant loop trip counts and would further cripple it because dereferenceability analysis is *very* partial. Furthermore, even if all that is done, every single test would need to be rewritten from scratch. So let's just give up.
* [Attributor] Ignore BlockAddress users in call site traversalJohannes Doerfert2019-11-021-0/+4
| | | | | | | BlockAddress users will not "call" the function so they do not qualify as call sites in the first place. When we delete a function with BlockAddress users we need to first remove the body so they are properly discarded.
* [X86] Remove FeatureSSE3 from the implies list of HasFastHorizontalOps.Craig Topper2019-11-011-1/+1
| | | | HasFastHorizontalOps is a tuning flag. It shouldn't imply an ISA flag.
* [Attributor][FIX] Do not try to cast if a cast is not requiredJohannes Doerfert2019-11-021-2/+6
| | | | | | | | | When we replace constant returns at the call site we did issue a cast in the hopes it would be a no-op if the types are equal. Turns out that is not the case and we have to check it ourselves first. Reused an IPConstantProp test for coverage. No functional change to the test wrt. IPConstantProp.
* [Attributor][FIX] Transform invoke of nounwind to call + br %normal_destJohannes Doerfert2019-11-021-5/+22
| | | | | | | | | Even if the invoked function may-return, we can replace it with a call and branch if it is nounwind. We had almost everything in place to do this but did not which actually caused a crash when we removed the landingpad from the actually dead unwind block. Exposed by the IPConstantProp tests.
* [Attributor][FIX] Make "known" and "assumed" liveness explicitJohannes Doerfert2019-11-021-21/+43
| | | | | | | | We did merge "known" and "assumed" liveness information into a single set which caused various kinds of problems, especially because we did not properly record when something was actually known. With this patch we properly track the "known" bit and distinguish dead ends we know from the ones we still need to explore in future updates.
* [Attributor] `willreturn` + `noreturn` = UBJohannes Doerfert2019-11-021-4/+1
| | | | | | | | | | | We gave up on `noreturn` if `willreturn` was known for a while but we now again try to always derive `noreturn`. This is useful because a function that is `noreturn` + `willreturn` is basically dead as executing it would lead to undefined behavior (UB). This came up in the IPConstantProp cases where a function only contained a unreachable but was not marked `noreturn` which caused missed opportunities down the line.
OpenPOWER on IntegriCloud