1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00
llvm-mirror/lib/IR
Roman Lebedev cb062e6baf Revert "[AssumeBundles] Use operand bundles to encode alignment assumptions"
Assume bundle can have more than one entry with the same name,
but at least AlignmentFromAssumptionsPass::extractAlignmentInfo() uses
getOperandBundle("align"), which internally assumes that it isn't the
case, and happily crashes otherwise.

Minimal reduced reproducer: run `opt -alignment-from-assumptions` on

target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%0 = type { i64, %1*, i8*, i64, %2, i32, %3*, i8* }
%1 = type opaque
%2 = type { i8, i8, i16 }
%3 = type { i32, i32, i32, i32 }

; Function Attrs: nounwind
define i32 @f(%0* noalias nocapture readonly %arg, %0* noalias %arg1) local_unnamed_addr #0 {
bb:
  call void @llvm.assume(i1 true) [ "align"(%0* %arg, i64 8), "align"(%0* %arg1, i64 8) ]
  ret i32 0
}

; Function Attrs: nounwind willreturn
declare void @llvm.assume(i1) #1

attributes #0 = { nounwind "reciprocal-estimates"="none" }
attributes #1 = { nounwind willreturn }


This is what we'd have with -mllvm -enable-knowledge-retention

This reverts commit c95ffadb2474a4d8c4f598d94d35a9f31d9606cb.
2020-07-04 23:49:23 +03:00
..
AbstractCallSite.cpp
AsmWriter.cpp Pass MDFieldPrinter::printAPInt APInt arg by reference not value. 2020-06-30 17:18:20 +01:00
AttributeImpl.h [IR] Store attributes that are available "somewhere" (NFC) 2020-06-27 10:44:59 +02:00
Attributes.cpp [IR] Short-circuit comparison with itself for Attributes 2020-07-03 16:07:14 +03:00
AutoUpgrade.cpp [Alignment][NFC] Use proper getter to retrieve alignment from ConstantInt and ConstantSDNode 2020-07-03 08:06:43 +00:00
BasicBlock.cpp
CMakeLists.txt
Comdat.cpp
ConstantFold.cpp [SVE] Make ConstantFoldGetElementPtr work for scalable vectors of indices 2020-06-25 07:28:19 +01:00
ConstantFold.h
ConstantRange.cpp
Constants.cpp [IR] Delete llvm::Constants using the correct type. 2020-06-30 12:37:53 -07:00
ConstantsContext.h [IR] Add classof methods to ConstantExpr subclasses. 2020-07-01 11:56:12 -07:00
Core.cpp
DataLayout.cpp [XCOFF][AIX] Use 'L..' instead of '.L' for getPrivateGlobalPrefix in DataLayout 2020-07-03 18:25:14 +00:00
DebugInfo.cpp Pass stripNonLineTableDebugInfo remapDebugLoc lambda DebugLoc arg by const reference not value. 2020-07-01 12:37:47 +01:00
DebugInfoMetadata.cpp Pass DIEnumerator APInt args by const reference not value. 2020-07-01 13:16:07 +01:00
DebugLoc.cpp Pass DebugLoc::appendInlinedAt DebugLoc arg by const reference not value. 2020-07-01 16:38:51 +01:00
DiagnosticHandler.cpp
DiagnosticInfo.cpp
DiagnosticPrinter.cpp
DIBuilder.cpp
Dominators.cpp
FPEnv.cpp Fix some clang-tidy namespace closing comments warnings. NFC. 2020-06-26 09:58:21 +01:00
Function.cpp Silence unused var warning in NDEBUG build 2020-06-29 11:40:49 -07:00
Globals.cpp
GVMaterializer.cpp
InlineAsm.cpp
Instruction.cpp
Instructions.cpp [Alignment][NFC] Use 5 bits to store Instructions Alignment 2020-07-03 08:54:27 +00:00
IntrinsicInst.cpp
IRBuilder.cpp Revert "[AssumeBundles] Use operand bundles to encode alignment assumptions" 2020-07-04 23:49:23 +03:00
IRPrintingPasses.cpp
LegacyPassManager.cpp Improve LegacyPassManager API to correctly report modified status 2020-06-26 14:21:02 +02:00
LLVMBuild.txt
LLVMContext.cpp
LLVMContextImpl.cpp
LLVMContextImpl.h
LLVMRemarkStreamer.cpp
Mangler.cpp
MDBuilder.cpp
Metadata.cpp
MetadataImpl.h
Module.cpp
ModuleSummaryIndex.cpp Revert "[StackSafety,NFC] Remove unneded constexpr" 2020-07-01 08:41:45 -04:00
Operator.cpp Fix some clang-tidy namespace closing comments warnings. NFC. 2020-06-26 09:58:21 +01:00
OptBisect.cpp
Pass.cpp
PassInstrumentation.cpp
PassManager.cpp Fix some clang-tidy namespace closing comments warnings. NFC. 2020-06-26 09:58:21 +01:00
PassRegistry.cpp
PassTimingInfo.cpp
ProfileSummary.cpp
SafepointIRVerifier.cpp Fix some clang-tidy namespace closing comments warnings. NFC. 2020-06-26 09:58:21 +01:00
Statepoint.cpp
SymbolTableListTraitsImpl.h
Type.cpp [SVE] Reject vector struct indexes for scalable vectors. 2020-06-30 13:52:38 -07:00
TypeFinder.cpp
Use.cpp Fix some clang-tidy namespace closing comments warnings. NFC. 2020-06-26 09:58:21 +01:00
User.cpp Fix some clang-tidy namespace closing comments warnings. NFC. 2020-06-26 09:58:21 +01:00
Value.cpp [IR] Delete llvm::Constants using the correct type. 2020-06-30 12:37:53 -07:00
ValueSymbolTable.cpp
Verifier.cpp Revert "[AssumeBundles] Use operand bundles to encode alignment assumptions" 2020-07-04 23:49:23 +03:00