reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced

Derived Classes

include/llvm/IR/Argument.h
   29 class Argument final : public Value {
include/llvm/IR/BasicBlock.h
   57 class BasicBlock final : public Value, // Basic blocks are data objects also
include/llvm/IR/InlineAsm.h
   30 class InlineAsm final : public Value {
include/llvm/IR/Metadata.h
  173 class MetadataAsValue : public Value {
include/llvm/IR/User.h
   44 class User : public Value {

Declarations

include/llvm/Analysis/AliasAnalysis.h
   63 class Value;
include/llvm/Analysis/AliasSetTracker.h
   46 class Value;
include/llvm/Analysis/AssumptionCache.h
   32 class Value;
include/llvm/Analysis/BasicAliasAnalysis.h
   46 class Value;
include/llvm/Analysis/BranchProbabilityInfo.h
   38 class Value;
include/llvm/Analysis/CaptureTracking.h
   18   class Value;
include/llvm/Analysis/CmpInstAnalysis.h
   21   class Value;
include/llvm/Analysis/CodeMetrics.h
   28 class Value;
include/llvm/Analysis/DivergenceAnalysis.h
   26 class Value;
include/llvm/Analysis/EHPersonalities.h
   20 class Value;
include/llvm/Analysis/GuardUtils.h
   19 class Value;
include/llvm/Analysis/IVUsers.h
   27 class Value;
include/llvm/Analysis/InstructionSimplify.h
   53 class Value;
include/llvm/Analysis/LazyCallGraph.h
   64 class Value;
include/llvm/Analysis/LazyValueInfo.h
   28   class Value;
include/llvm/Analysis/LegacyDivergenceAnalysis.h
   24 class Value;
include/llvm/Analysis/LoopAccessAnalysis.h
   31 class Value;
include/llvm/Analysis/MemoryBuiltins.h
   54 class Value;
include/llvm/Analysis/MemoryDependenceAnalysis.h
   46 class Value;
include/llvm/Analysis/OptimizationRemarkEmitter.h
   29 class Value;
include/llvm/Analysis/PhiValues.h
   33 class Value;
include/llvm/Analysis/ScalarEvolution.h
   71 class Value;
include/llvm/Analysis/TargetTransformInfo.h
   56 class Value;
include/llvm/Analysis/ValueTracking.h
   44 class Value;
include/llvm/Analysis/VectorUtils.h
  143 class Value;
include/llvm/CodeGen/AtomicExpandUtils.h
   19 class Value;
include/llvm/CodeGen/FastISel.h
   61 class Value;
include/llvm/CodeGen/GlobalISel/CallLowering.h
   39 class Value;
include/llvm/CodeGen/GlobalISel/IRTranslator.h
   51 class Value;
include/llvm/CodeGen/GlobalISel/Types.h
   21 class Value;
include/llvm/CodeGen/ScheduleDAGInstrs.h
   49   class Value;
include/llvm/CodeGen/SelectionDAG.h
   82 class Value;
include/llvm/CodeGen/SelectionDAGNodes.h
   68 class Value;
include/llvm/CodeGen/TargetLowering.h
   92 class Value;
include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h
   59 class Value;
include/llvm/ExecutionEngine/Orc/ExecutionUtils.h
   37 class Value;
include/llvm/ExecutionEngine/Orc/IndirectionUtils.h
   45 class Value;
include/llvm/IR/AssemblyAnnotationWriter.h
   24 class Value;
include/llvm/IR/AutoUpgrade.h
   27   class Value;
include/llvm/IR/DIBuilder.h
   39   class Value;
include/llvm/IR/DataLayout.h
   48 class Value;
include/llvm/IR/DerivedTypes.h
   32 class Value;
include/llvm/IR/DiagnosticPrinter.h
   28 class Value;
include/llvm/IR/LegacyPassManagers.h
   97 class Value;
include/llvm/IR/ModuleSlotTracker.h
   19 class Value;
include/llvm/IR/TypeFinder.h
   26 class Value;
include/llvm/IR/Use.h
   36 class Value;
include/llvm/IR/UseListOrder.h
   23 class Value;
include/llvm/LTO/legacy/LTOModule.h
   33   class Value;
include/llvm/Transforms/IPO/DeadArgumentElimination.h
   35 class Value;
include/llvm/Transforms/Scalar/GVN.h
   52 class Value;
include/llvm/Transforms/Scalar/JumpThreading.h
   45 class Value;
include/llvm/Transforms/Scalar/MemCpyOptimizer.h
   37 class Value;
include/llvm/Transforms/Scalar/NaryReassociate.h
  100 class Value;
include/llvm/Transforms/Scalar/Reassociate.h
   40 class Value;
include/llvm/Transforms/Utils/BasicBlockUtils.h
   41 class Value;
include/llvm/Transforms/Utils/BuildLibCalls.h
   21   class Value;
include/llvm/Transforms/Utils/BypassSlowDivision.h
   28 class Value;
include/llvm/Transforms/Utils/CodeExtractor.h
   38 class Value;
include/llvm/Transforms/Utils/FunctionComparator.h
   40 class Value;
include/llvm/Transforms/Utils/GlobalStatus.h
   18 class Value;
include/llvm/Transforms/Utils/LowerMemIntrinsics.h
   25 class Value;
include/llvm/Transforms/Utils/ModuleUtils.h
   29 class Value;
include/llvm/Transforms/Utils/SSAUpdater.h
   30 class Value;
include/llvm/Transforms/Utils/SSAUpdaterBulk.h
   28 class Value;
include/llvm/Transforms/Utils/SimplifyLibCalls.h
   23 class Value;
include/llvm/Transforms/Utils/VNCoercion.h
   31 class Value;
include/llvm/Transforms/Utils/ValueMapper.h
   31 class Value;
include/llvm/Transforms/Vectorize/SLPVectorizer.h
   47 class Value;
lib/AsmParser/LLParser.h
   32   class Value;
lib/Bitcode/Reader/ValueList.h
   26 class Value;
lib/Bitcode/Writer/ValueEnumerator.h
   41 class Value;
lib/CodeGen/AsmPrinter/WinException.h
   24 class Value;
lib/CodeGen/SafeStackLayout.h
   19 class Value;
lib/CodeGen/SelectionDAG/SDNodeDbgValue.h
   25 class Value;
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
   90 class Value;
lib/IR/ConstantFold.h
   25   class Value;
lib/IR/LLVMContextImpl.h
   59 class Value;
lib/Target/AArch64/AArch64TargetTransformInfo.h
   38 class Value;
lib/Target/AMDGPU/AMDGPUTargetTransformInfo.h
   39 class Value;
lib/Target/ARM/ARMCallLowering.h
   29 class Value;
lib/Target/ARM/ARMTargetTransformInfo.h
   39 class Value;
lib/Target/Hexagon/HexagonTargetTransformInfo.h
   31 class Value;
lib/Transforms/ObjCARC/DependencyAnalysis.h
   31   class Value;
lib/Transforms/ObjCARC/ProvenanceAnalysis.h
   38 class Value;
lib/Transforms/ObjCARC/PtrState.h
   29 class Value;
lib/Transforms/Vectorize/VPlan.h
   58 class Value;
tools/bugpoint/BugDriver.h
   28 class Value;
tools/clang/lib/CodeGen/ABIInfo.h
   18   class Value;
tools/clang/lib/CodeGen/CGBlocks.h
   35 class Value;
tools/clang/lib/CodeGen/CGCXXABI.h
   23 class Value;
tools/clang/lib/CodeGen/CGCall.h
   31 class Value;
tools/clang/lib/CodeGen/CGCleanup.h
   24 class Value;
tools/clang/lib/CodeGen/CGObjCRuntime.h
   31   class Value;
tools/clang/lib/CodeGen/CGOpenMPRuntime.h
   35 class Value;
tools/clang/lib/CodeGen/CodeGenFunction.h
   50 class Value;
tools/clang/lib/CodeGen/TargetInfo.h
   29 class Value;
tools/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionVariable.h
   30 class Value;
tools/lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.h
   38 class Value;
tools/llvm-diff/DiffConsumer.h
   26   class Value;
tools/llvm-diff/DiffLog.h
   21   class Value;
tools/llvm-diff/DifferenceEngine.h
   29   class Value;
tools/polly/include/polly/CodeGen/RuntimeDebugBuilder.h
   20 class Value;
tools/polly/include/polly/CodeGen/Utils.h
   19 class Value;
tools/polly/include/polly/ZoneAlgo.h
   23 class Value;

References

examples/BrainF/BrainF.cpp
  103     Value *memset_params[] = {
  174       Value *puts_params[] = {
  213           Value *tape_0 = getchar_call;
  216           Value *tape_1 = builder->
  230           Value *tape_1 = builder->
  234           Value *putchar_params[] = {
  255             Value *test_0 = builder->
  259             Value *test_1 = builder->
  263             Value *test_2 = builder->
  282           Value *tape_1 = builder->
  440       Value *head_0 = phi;
examples/BrainF/BrainF.h
   84     Value *ptr_arr;
   85     Value *ptr_arrmax;
   91     Value *curhead;
examples/BrainF/BrainFDriver.cpp
   85     Value *arg_0 = &*args++;
   87     Value *arg_1 = &*args++;
examples/Fibonacci/fibonacci.cpp
   63   Value *One = ConstantInt::get(Type::getInt32Ty(Context), 1);
   64   Value *Two = ConstantInt::get(Type::getInt32Ty(Context), 2);
   76   Value *CondInst = new ICmpInst(*BB, ICmpInst::ICMP_SLE, ArgX, Two, "cond");
   83   Value *Sub = BinaryOperator::CreateSub(ArgX, One, "arg", RecurseBB);
   93   Value *Sum = BinaryOperator::CreateAdd(CallFibX1, CallFibX2,
examples/HowToUseJIT/HowToUseJIT.cpp
   85   Value *One = builder.getInt32(1);
   93   Value *Add = builder.CreateAdd(One, ArgX);
  113   Value *Ten = builder.getInt32(10);
examples/HowToUseLLJIT/HowToUseLLJIT.cpp
   42   Value *One = builder.getInt32(1);
   50   Value *Add = builder.CreateAdd(One, ArgX);
examples/Kaleidoscope/BuildingAJIT/Chapter1/toy.cpp
  144   virtual Value *codegen() = 0;
  154   Value *codegen() override;
  164   Value *codegen() override;
  177   Value *codegen() override;
  190   Value *codegen() override;
  203   Value *codegen() override;
  215   Value *codegen() override;
  230   Value *codegen() override;
  244   Value *codegen() override;
  707 Value *LogErrorV(const char *Str) {
  736 Value *NumberExprAST::codegen() {
  740 Value *VariableExprAST::codegen() {
  742   Value *V = NamedValues[Name];
  750 Value *UnaryExprAST::codegen() {
  751   Value *OperandV = Operand->codegen();
  762 Value *BinaryExprAST::codegen() {
  773     Value *Val = RHS->codegen();
  778     Value *Variable = NamedValues[LHSE->getName()];
  786   Value *L = LHS->codegen();
  787   Value *R = RHS->codegen();
  811   Value *Ops[] = {L, R};
  815 Value *CallExprAST::codegen() {
  825   std::vector<Value *> ArgsV;
  835 Value *IfExprAST::codegen() {
  836   Value *CondV = Cond->codegen();
  857   Value *ThenV = Then->codegen();
  869   Value *ElseV = Else->codegen();
  906 Value *ForExprAST::codegen() {
  913   Value *StartVal = Start->codegen();
  942   Value *StepVal = nullptr;
  953   Value *EndCond = End->codegen();
  959   Value *CurVar = Builder->CreateLoad(Alloca, VarName.c_str());
  960   Value *NextVar = Builder->CreateFAdd(CurVar, StepVal, "nextvar");
  987 Value *VarExprAST::codegen() {
 1002     Value *InitVal;
 1023   Value *BodyVal = Body->codegen();
 1082   if (Value *RetVal = Body->codegen()) {
examples/Kaleidoscope/BuildingAJIT/Chapter2/toy.cpp
  144   virtual Value *codegen() = 0;
  154   Value *codegen() override;
  164   Value *codegen() override;
  177   Value *codegen() override;
  190   Value *codegen() override;
  203   Value *codegen() override;
  215   Value *codegen() override;
  230   Value *codegen() override;
  244   Value *codegen() override;
  707 Value *LogErrorV(const char *Str) {
  736 Value *NumberExprAST::codegen() {
  740 Value *VariableExprAST::codegen() {
  742   Value *V = NamedValues[Name];
  750 Value *UnaryExprAST::codegen() {
  751   Value *OperandV = Operand->codegen();
  762 Value *BinaryExprAST::codegen() {
  773     Value *Val = RHS->codegen();
  778     Value *Variable = NamedValues[LHSE->getName()];
  786   Value *L = LHS->codegen();
  787   Value *R = RHS->codegen();
  811   Value *Ops[] = {L, R};
  815 Value *CallExprAST::codegen() {
  825   std::vector<Value *> ArgsV;
  835 Value *IfExprAST::codegen() {
  836   Value *CondV = Cond->codegen();
  857   Value *ThenV = Then->codegen();
  869   Value *ElseV = Else->codegen();
  906 Value *ForExprAST::codegen() {
  913   Value *StartVal = Start->codegen();
  942   Value *StepVal = nullptr;
  953   Value *EndCond = End->codegen();
  959   Value *CurVar = Builder->CreateLoad(Alloca, VarName.c_str());
  960   Value *NextVar = Builder->CreateFAdd(CurVar, StepVal, "nextvar");
  987 Value *VarExprAST::codegen() {
 1002     Value *InitVal;
 1023   Value *BodyVal = Body->codegen();
 1082   if (Value *RetVal = Body->codegen()) {
examples/Kaleidoscope/BuildingAJIT/Chapter3/toy.cpp
  144   virtual Value *codegen() = 0;
  154   Value *codegen() override;
  164   Value *codegen() override;
  177   Value *codegen() override;
  190   Value *codegen() override;
  203   Value *codegen() override;
  215   Value *codegen() override;
  230   Value *codegen() override;
  244   Value *codegen() override;
  706 Value *LogErrorV(const char *Str) {
  735 Value *NumberExprAST::codegen() {
  739 Value *VariableExprAST::codegen() {
  741   Value *V = NamedValues[Name];
  749 Value *UnaryExprAST::codegen() {
  750   Value *OperandV = Operand->codegen();
  761 Value *BinaryExprAST::codegen() {
  772     Value *Val = RHS->codegen();
  777     Value *Variable = NamedValues[LHSE->getName()];
  785   Value *L = LHS->codegen();
  786   Value *R = RHS->codegen();
  810   Value *Ops[] = {L, R};
  814 Value *CallExprAST::codegen() {
  824   std::vector<Value *> ArgsV;
  834 Value *IfExprAST::codegen() {
  835   Value *CondV = Cond->codegen();
  856   Value *ThenV = Then->codegen();
  868   Value *ElseV = Else->codegen();
  905 Value *ForExprAST::codegen() {
  912   Value *StartVal = Start->codegen();
  941   Value *StepVal = nullptr;
  952   Value *EndCond = End->codegen();
  958   Value *CurVar = Builder.CreateLoad(Alloca, VarName.c_str());
  959   Value *NextVar = Builder.CreateFAdd(CurVar, StepVal, "nextvar");
  986 Value *VarExprAST::codegen() {
 1001     Value *InitVal;
 1022   Value *BodyVal = Body->codegen();
 1081   if (Value *RetVal = Body->codegen()) {
examples/Kaleidoscope/BuildingAJIT/Chapter4/toy.cpp
  144   virtual Value *codegen() = 0;
  154   Value *codegen() override;
  164   Value *codegen() override;
  177   Value *codegen() override;
  190   Value *codegen() override;
  203   Value *codegen() override;
  215   Value *codegen() override;
  230   Value *codegen() override;
  244   Value *codegen() override;
  692 Value *LogErrorV(const char *Str) {
  721 Value *NumberExprAST::codegen() {
  725 Value *VariableExprAST::codegen() {
  727   Value *V = NamedValues[Name];
  735 Value *UnaryExprAST::codegen() {
  736   Value *OperandV = Operand->codegen();
  747 Value *BinaryExprAST::codegen() {
  758     Value *Val = RHS->codegen();
  763     Value *Variable = NamedValues[LHSE->getName()];
  771   Value *L = LHS->codegen();
  772   Value *R = RHS->codegen();
  796   Value *Ops[] = {L, R};
  800 Value *CallExprAST::codegen() {
  810   std::vector<Value *> ArgsV;
  820 Value *IfExprAST::codegen() {
  821   Value *CondV = Cond->codegen();
  842   Value *ThenV = Then->codegen();
  854   Value *ElseV = Else->codegen();
  891 Value *ForExprAST::codegen() {
  898   Value *StartVal = Start->codegen();
  927   Value *StepVal = nullptr;
  938   Value *EndCond = End->codegen();
  944   Value *CurVar = Builder.CreateLoad(Alloca, VarName.c_str());
  945   Value *NextVar = Builder.CreateFAdd(CurVar, StepVal, "nextvar");
  972 Value *VarExprAST::codegen() {
  987     Value *InitVal;
 1008   Value *BodyVal = Body->codegen();
 1074   if (Value *RetVal = Body->codegen()) {
examples/Kaleidoscope/BuildingAJIT/Chapter5/toy.cpp
  161   virtual Value *codegen() = 0;
  171   Value *codegen() override;
  181   Value *codegen() override;
  194   Value *codegen() override;
  207   Value *codegen() override;
  220   Value *codegen() override;
  232   Value *codegen() override;
  247   Value *codegen() override;
  261   Value *codegen() override;
  716 Value *LogErrorV(const char *Str) {
  745 Value *NumberExprAST::codegen() {
  749 Value *VariableExprAST::codegen() {
  751   Value *V = NamedValues[Name];
  759 Value *UnaryExprAST::codegen() {
  760   Value *OperandV = Operand->codegen();
  771 Value *BinaryExprAST::codegen() {
  782     Value *Val = RHS->codegen();
  787     Value *Variable = NamedValues[LHSE->getName()];
  795   Value *L = LHS->codegen();
  796   Value *R = RHS->codegen();
  820   Value *Ops[] = {L, R};
  824 Value *CallExprAST::codegen() {
  834   std::vector<Value *> ArgsV;
  844 Value *IfExprAST::codegen() {
  845   Value *CondV = Cond->codegen();
  866   Value *ThenV = Then->codegen();
  878   Value *ElseV = Else->codegen();
  915 Value *ForExprAST::codegen() {
  922   Value *StartVal = Start->codegen();
  951   Value *StepVal = nullptr;
  962   Value *EndCond = End->codegen();
  968   Value *CurVar = Builder.CreateLoad(Alloca, VarName.c_str());
  969   Value *NextVar = Builder.CreateFAdd(CurVar, StepVal, "nextvar");
  996 Value *VarExprAST::codegen() {
 1011     Value *InitVal;
 1032   Value *BodyVal = Body->codegen();
 1098   if (Value *RetVal = Body->codegen()) {
examples/Kaleidoscope/Chapter3/toy.cpp
  106   virtual Value *codegen() = 0;
  116   Value *codegen() override;
  126   Value *codegen() override;
  139   Value *codegen() override;
  152   Value *codegen() override;
  405 static std::map<std::string, Value *> NamedValues;
  407 Value *LogErrorV(const char *Str) {
  412 Value *NumberExprAST::codegen() {
  416 Value *VariableExprAST::codegen() {
  418   Value *V = NamedValues[Name];
  424 Value *BinaryExprAST::codegen() {
  425   Value *L = LHS->codegen();
  426   Value *R = RHS->codegen();
  446 Value *CallExprAST::codegen() {
  456   std::vector<Value *> ArgsV;
  502   if (Value *RetVal = Body->codegen()) {
examples/Kaleidoscope/Chapter4/toy.cpp
  116   virtual Value *codegen() = 0;
  126   Value *codegen() override;
  136   Value *codegen() override;
  149   Value *codegen() override;
  162   Value *codegen() override;
  415 static std::map<std::string, Value *> NamedValues;
  420 Value *LogErrorV(const char *Str) {
  440 Value *NumberExprAST::codegen() {
  444 Value *VariableExprAST::codegen() {
  446   Value *V = NamedValues[Name];
  452 Value *BinaryExprAST::codegen() {
  453   Value *L = LHS->codegen();
  454   Value *R = RHS->codegen();
  474 Value *CallExprAST::codegen() {
  484   std::vector<Value *> ArgsV;
  529   if (Value *RetVal = Body->codegen()) {
examples/Kaleidoscope/Chapter5/toy.cpp
  134   virtual Value *codegen() = 0;
  144   Value *codegen() override;
  154   Value *codegen() override;
  167   Value *codegen() override;
  180   Value *codegen() override;
  192   Value *codegen() override;
  207   Value *codegen() override;
  542 static std::map<std::string, Value *> NamedValues;
  547 Value *LogErrorV(const char *Str) {
  567 Value *NumberExprAST::codegen() {
  571 Value *VariableExprAST::codegen() {
  573   Value *V = NamedValues[Name];
  579 Value *BinaryExprAST::codegen() {
  580   Value *L = LHS->codegen();
  581   Value *R = RHS->codegen();
  601 Value *CallExprAST::codegen() {
  611   std::vector<Value *> ArgsV;
  621 Value *IfExprAST::codegen() {
  622   Value *CondV = Cond->codegen();
  643   Value *ThenV = Then->codegen();
  655   Value *ElseV = Else->codegen();
  688 Value *ForExprAST::codegen() {
  690   Value *StartVal = Start->codegen();
  713   Value *OldVal = NamedValues[VarName];
  723   Value *StepVal = nullptr;
  733   Value *NextVar = Builder.CreateFAdd(Variable, StepVal, "nextvar");
  736   Value *EndCond = End->codegen();
  803   if (Value *RetVal = Body->codegen()) {
examples/Kaleidoscope/Chapter6/toy.cpp
  142   virtual Value *codegen() = 0;
  152   Value *codegen() override;
  162   Value *codegen() override;
  174   Value *codegen() override;
  187   Value *codegen() override;
  200   Value *codegen() override;
  212   Value *codegen() override;
  227   Value *codegen() override;
  634 static std::map<std::string, Value *> NamedValues;
  639 Value *LogErrorV(const char *Str) {
  659 Value *NumberExprAST::codegen() {
  663 Value *VariableExprAST::codegen() {
  665   Value *V = NamedValues[Name];
  671 Value *UnaryExprAST::codegen() {
  672   Value *OperandV = Operand->codegen();
  683 Value *BinaryExprAST::codegen() {
  684   Value *L = LHS->codegen();
  685   Value *R = RHS->codegen();
  709   Value *Ops[] = {L, R};
  713 Value *CallExprAST::codegen() {
  723   std::vector<Value *> ArgsV;
  733 Value *IfExprAST::codegen() {
  734   Value *CondV = Cond->codegen();
  755   Value *ThenV = Then->codegen();
  767   Value *ElseV = Else->codegen();
  800 Value *ForExprAST::codegen() {
  802   Value *StartVal = Start->codegen();
  825   Value *OldVal = NamedValues[VarName];
  835   Value *StepVal = nullptr;
  845   Value *NextVar = Builder.CreateFAdd(Variable, StepVal, "nextvar");
  848   Value *EndCond = End->codegen();
  919   if (Value *RetVal = Body->codegen()) {
examples/Kaleidoscope/Chapter7/toy.cpp
  149   virtual Value *codegen() = 0;
  159   Value *codegen() override;
  169   Value *codegen() override;
  182   Value *codegen() override;
  195   Value *codegen() override;
  208   Value *codegen() override;
  220   Value *codegen() override;
  235   Value *codegen() override;
  249   Value *codegen() override;
  712 Value *LogErrorV(const char *Str) {
  741 Value *NumberExprAST::codegen() {
  745 Value *VariableExprAST::codegen() {
  747   Value *V = NamedValues[Name];
  755 Value *UnaryExprAST::codegen() {
  756   Value *OperandV = Operand->codegen();
  767 Value *BinaryExprAST::codegen() {
  778     Value *Val = RHS->codegen();
  783     Value *Variable = NamedValues[LHSE->getName()];
  791   Value *L = LHS->codegen();
  792   Value *R = RHS->codegen();
  816   Value *Ops[] = {L, R};
  820 Value *CallExprAST::codegen() {
  830   std::vector<Value *> ArgsV;
  840 Value *IfExprAST::codegen() {
  841   Value *CondV = Cond->codegen();
  862   Value *ThenV = Then->codegen();
  874   Value *ElseV = Else->codegen();
  911 Value *ForExprAST::codegen() {
  918   Value *StartVal = Start->codegen();
  947   Value *StepVal = nullptr;
  958   Value *EndCond = End->codegen();
  964   Value *CurVar = Builder.CreateLoad(Alloca, VarName.c_str());
  965   Value *NextVar = Builder.CreateFAdd(CurVar, StepVal, "nextvar");
  992 Value *VarExprAST::codegen() {
 1007     Value *InitVal;
 1028   Value *BodyVal = Body->codegen();
 1087   if (Value *RetVal = Body->codegen()) {
examples/Kaleidoscope/Chapter8/toy.cpp
  150   virtual Value *codegen() = 0;
  160   Value *codegen() override;
  170   Value *codegen() override;
  183   Value *codegen() override;
  196   Value *codegen() override;
  209   Value *codegen() override;
  221   Value *codegen() override;
  236   Value *codegen() override;
  250   Value *codegen() override;
  711 Value *LogErrorV(const char *Str) {
  740 Value *NumberExprAST::codegen() {
  744 Value *VariableExprAST::codegen() {
  746   Value *V = NamedValues[Name];
  754 Value *UnaryExprAST::codegen() {
  755   Value *OperandV = Operand->codegen();
  766 Value *BinaryExprAST::codegen() {
  777     Value *Val = RHS->codegen();
  782     Value *Variable = NamedValues[LHSE->getName()];
  790   Value *L = LHS->codegen();
  791   Value *R = RHS->codegen();
  815   Value *Ops[] = {L, R};
  819 Value *CallExprAST::codegen() {
  829   std::vector<Value *> ArgsV;
  839 Value *IfExprAST::codegen() {
  840   Value *CondV = Cond->codegen();
  861   Value *ThenV = Then->codegen();
  873   Value *ElseV = Else->codegen();
  910 Value *ForExprAST::codegen() {
  917   Value *StartVal = Start->codegen();
  946   Value *StepVal = nullptr;
  957   Value *EndCond = End->codegen();
  963   Value *CurVar = Builder.CreateLoad(Alloca, VarName.c_str());
  964   Value *NextVar = Builder.CreateFAdd(CurVar, StepVal, "nextvar");
  991 Value *VarExprAST::codegen() {
 1006     Value *InitVal;
 1027   Value *BodyVal = Body->codegen();
 1086   if (Value *RetVal = Body->codegen()) {
examples/Kaleidoscope/Chapter9/toy.cpp
  207   virtual Value *codegen() = 0;
  224   Value *codegen() override;
  235   Value *codegen() override;
  249   Value *codegen() override;
  266   Value *codegen() override;
  284   Value *codegen() override;
  302   Value *codegen() override;
  323   Value *codegen() override;
  344   Value *codegen() override;
  864 Value *LogErrorV(const char *Str) {
  894 Value *NumberExprAST::codegen() {
  899 Value *VariableExprAST::codegen() {
  901   Value *V = NamedValues[Name];
  910 Value *UnaryExprAST::codegen() {
  911   Value *OperandV = Operand->codegen();
  923 Value *BinaryExprAST::codegen() {
  936     Value *Val = RHS->codegen();
  941     Value *Variable = NamedValues[LHSE->getName()];
  949   Value *L = LHS->codegen();
  950   Value *R = RHS->codegen();
  974   Value *Ops[] = {L, R};
  978 Value *CallExprAST::codegen() {
  990   std::vector<Value *> ArgsV;
 1000 Value *IfExprAST::codegen() {
 1003   Value *CondV = Cond->codegen();
 1024   Value *ThenV = Then->codegen();
 1036   Value *ElseV = Else->codegen();
 1073 Value *ForExprAST::codegen() {
 1082   Value *StartVal = Start->codegen();
 1111   Value *StepVal = nullptr;
 1122   Value *EndCond = End->codegen();
 1128   Value *CurVar = Builder.CreateLoad(Alloca, VarName.c_str());
 1129   Value *NextVar = Builder.CreateFAdd(CurVar, StepVal, "nextvar");
 1156 Value *VarExprAST::codegen() {
 1171     Value *InitVal;
 1194   Value *BodyVal = Body->codegen();
 1285   if (Value *RetVal = Body->codegen()) {
examples/ModuleMaker/ModuleMaker.cpp
   50   Value *Two = ConstantInt::get(Type::getInt32Ty(Context), 2);
   51   Value *Three = ConstantInt::get(Type::getInt32Ty(Context), 3);
examples/ParallelJIT/ParallelJIT.cpp
   63   Value *One = ConstantInt::get(Type::getInt32Ty(Context), 1);
   93   Value *One = ConstantInt::get(Type::getInt32Ty(Context), 1);
   94   Value *Two = ConstantInt::get(Type::getInt32Ty(Context), 2);
  106   Value *CondInst = new ICmpInst(*BB, ICmpInst::ICMP_SLE, ArgX, Two, "cond");
  113   Value *Sub = BinaryOperator::CreateSub(ArgX, One, "arg", RecurseBB);
  114   Value *CallFibX1 = CallInst::Create(FibF, Sub, "fibx1", RecurseBB);
  118   Value *CallFibX2 = CallInst::Create(FibF, Sub, "fibx2", RecurseBB);
  121   Value *Sum =
gen/tools/clang/include/clang/Basic/arm_mve_builtin_cg.inc
   17   Value *Val1 = Builder.CreateLoad(Val0);
   18   Value *Val2 = EmitScalarExpr(E->getArg(1));
   19   Value *Val3 = Builder.CreateCall(CGM.getIntrinsic(Intrinsic::arm_mve_vldr_gather_base_wb, llvm::SmallVector<llvm::Type *, 2> {Param0, llvm::VectorType::get(Int32Ty, 4)}), llvm::SmallVector<Value *, 2> {Val1, Val2});
   20   Value *Val4 = Builder.CreateExtractValue(Val3, 1);
   27   Value *Val1 = Builder.CreateLoad(Val0);
   28   Value *Val2 = EmitScalarExpr(E->getArg(1));
   29   Value *Val3 = EmitScalarExpr(E->getArg(2));
   30   Value *Val4 = Builder.CreateIntCast(Val3, Int32Ty, false);
   31   Value *Val5 = Builder.CreateCall(CGM.getIntrinsic(Intrinsic::arm_mve_pred_i2v, llvm::SmallVector<llvm::Type *, 1> {llvm::VectorType::get(Builder.getInt1Ty(), 4)}), llvm::SmallVector<Value *, 1> {Val4});
   32   Value *Val6 = Builder.CreateCall(CGM.getIntrinsic(Intrinsic::arm_mve_vldr_gather_base_wb_predicated, llvm::SmallVector<llvm::Type *, 3> {llvm::VectorType::get(Int64Ty, 2), llvm::VectorType::get(Int64Ty, 2), llvm::VectorType::get(Builder.getInt1Ty(), 4)}), llvm::SmallVector<Value *, 3> {Val1, Val2, Val5});
   33   Value *Val7 = Builder.CreateExtractValue(Val6, 1);
  159   Value *Val0 = EmitScalarExpr(E->getArg(0));
  160   Value *Val1 = Builder.CreateIntCast(Val0, Int32Ty, false);
  161   Value *Val2 = EmitScalarExpr(E->getArg(1));
  162   Value *Val3 = Builder.CreateCall(CGM.getIntrinsic(Param0, llvm::SmallVector<llvm::Type *, 1> {Param1}), llvm::SmallVector<Value *, 2> {Val1, Val2});
  167   Value *Val0 = EmitScalarExpr(E->getArg(0));
  168   Value *Val1 = EmitScalarExpr(E->getArg(1));
  170   Value *Val3 = Builder.CreateLoad(Val2);
  171   Value *Val4 = llvm::ConstantInt::get(Int32Ty, 29);
  172   Value *Val5 = Builder.CreateShl(Val3, Val4);
  173   Value *Val6 = Builder.CreateCall(CGM.getIntrinsic(Intrinsic::arm_mve_vadc, llvm::SmallVector<llvm::Type *, 1> {llvm::VectorType::get(Int32Ty, 4)}), llvm::SmallVector<Value *, 3> {Val0, Val1, Val5});
  174   Value *Val7 = llvm::ConstantInt::get(Int32Ty, 1);
  175   Value *Val8 = Builder.CreateExtractValue(Val6, 1);
  176   Value *Val9 = llvm::ConstantInt::get(Int32Ty, 29);
  177   Value *Val10 = Builder.CreateLShr(Val8, Val9);
  178   Value *Val11 = Builder.CreateAnd(Val7, Val10);
  206   Value *Val0 = EmitScalarExpr(E->getArg(0));
  207   Value *Val1 = EmitScalarExpr(E->getArg(1));
  208   Value *Val2 = Builder.CreateCall(CGM.getIntrinsic(Param0, llvm::SmallVector<llvm::Type *, 1> {llvm::VectorType::get(Int32Ty, 4)}), llvm::SmallVector<Value *, 2> {Val0, Val1});
  213   Value *Val0 = EmitScalarExpr(E->getArg(0));
  214   Value *Val1 = EmitScalarExpr(E->getArg(1));
  215   Value *Val2 = EmitScalarExpr(E->getArg(2));
  217   Value *Val4 = Builder.CreateLoad(Val3);
  218   Value *Val5 = llvm::ConstantInt::get(Int32Ty, 29);
  219   Value *Val6 = Builder.CreateShl(Val4, Val5);
  220   Value *Val7 = EmitScalarExpr(E->getArg(4));
  221   Value *Val8 = Builder.CreateIntCast(Val7, Int32Ty, false);
  222   Value *Val9 = Builder.CreateCall(CGM.getIntrinsic(Intrinsic::arm_mve_pred_i2v, llvm::SmallVector<llvm::Type *, 1> {llvm::VectorType::get(Builder.getInt1Ty(), 4)}), llvm::SmallVector<Value *, 1> {Val8});
  223   Value *Val10 = Builder.CreateCall(CGM.getIntrinsic(Intrinsic::arm_mve_vadc_predicated, llvm::SmallVector<llvm::Type *, 2> {llvm::VectorType::get(Int32Ty, 4), llvm::VectorType::get(Builder.getInt1Ty(), 4)}), llvm::SmallVector<Value *, 5> {Val0, Val1, Val2, Val6, Val9});
  224   Value *Val11 = llvm::ConstantInt::get(Int32Ty, 1);
  225   Value *Val12 = Builder.CreateExtractValue(Val10, 1);
  226   Value *Val13 = llvm::ConstantInt::get(Int32Ty, 29);
  227   Value *Val14 = Builder.CreateLShr(Val12, Val13);
  228   Value *Val15 = Builder.CreateAnd(Val11, Val14);
  234   Value *Val0 = EmitScalarExpr(E->getArg(0));
  235   Value *Val1 = EmitScalarExpr(E->getArg(1));
  236   Value *Val2 = EmitScalarExpr(E->getArg(2));
  237   Value *Val3 = llvm::ConstantInt::get(Int32Ty, 0);
  238   Value *Val4 = EmitScalarExpr(E->getArg(4));
  239   Value *Val5 = Builder.CreateIntCast(Val4, Int32Ty, false);
  240   Value *Val6 = Builder.CreateCall(CGM.getIntrinsic(Intrinsic::arm_mve_pred_i2v, llvm::SmallVector<llvm::Type *, 1> {llvm::VectorType::get(Builder.getInt1Ty(), 4)}), llvm::SmallVector<Value *, 1> {Val5});
  241   Value *Val7 = Builder.CreateCall(CGM.getIntrinsic(Intrinsic::arm_mve_vadc_predicated, llvm::SmallVector<llvm::Type *, 2> {llvm::VectorType::get(Int32Ty, 4), llvm::VectorType::get(Builder.getInt1Ty(), 4)}), llvm::SmallVector<Value *, 5> {Val0, Val1, Val2, Val3, Val6});
  242   Value *Val8 = llvm::ConstantInt::get(Int32Ty, 1);
  243   Value *Val9 = Builder.CreateExtractValue(Val7, 1);
  244   Value *Val10 = llvm::ConstantInt::get(Int32Ty, 29);
  245   Value *Val11 = Builder.CreateLShr(Val9, Val10);
  246   Value *Val12 = Builder.CreateAnd(Val8, Val11);
  253   Value *Val0 = EmitScalarExpr(E->getArg(0));
  254   Value *Val1 = EmitScalarExpr(E->getArg(1));
  255   Value *Val2 = llvm::ConstantInt::get(Int32Ty, 0);
  256   Value *Val3 = Builder.CreateCall(CGM.getIntrinsic(Intrinsic::arm_mve_vadc, llvm::SmallVector<llvm::Type *, 1> {llvm::VectorType::get(Int32Ty, 4)}), llvm::SmallVector<Value *, 3> {Val0, Val1, Val2});
  257   Value *Val4 = llvm::ConstantInt::get(Int32Ty, 1);
  258   Value *Val5 = Builder.CreateExtractValue(Val3, 1);
  259   Value *Val6 = llvm::ConstantInt::get(Int32Ty, 29);
  260   Value *Val7 = Builder.CreateLShr(Val5, Val6);
  261   Value *Val8 = Builder.CreateAnd(Val4, Val7);
  277   Value *Val0 = EmitScalarExpr(E->getArg(0));
  278   Value *Val1 = EmitScalarExpr(E->getArg(1));
  279   Value *Val2 = llvm::ConstantInt::get(Int32Ty, Param0);
  280   Value *Val3 = EmitScalarExpr(E->getArg(2));
  281   Value *Val4 = Builder.CreateIntCast(Val3, Int32Ty, false);
  282   Value *Val5 = Builder.CreateCall(CGM.getIntrinsic(Intrinsic::arm_mve_pred_i2v, llvm::SmallVector<llvm::Type *, 1> {llvm::VectorType::get(Builder.getInt1Ty(), 4)}), llvm::SmallVector<Value *, 1> {Val4});
  296   Value *Val0 = EmitScalarExpr(E->getArg(0));
  297   Value *Val1 = EmitScalarExpr(E->getArg(1));
  298   Value *Val2 = llvm::ConstantInt::get(Int32Ty, Param0);
  307   Value *Val0 = EmitScalarExpr(E->getArg(0));
  308   Value *Val1 = EmitScalarExpr(E->getArg(1));
  313   Value *Val0 = EmitScalarExpr(E->getArg(0));
  314   Value *Val1 = EmitScalarExpr(E->getArg(1));
  319   Value *Val0 = EmitScalarExpr(E->getArg(0));
  320   Value *Val1 = EmitScalarExpr(E->getArg(1));
  329   Value *Val0 = EmitScalarExpr(E->getArg(0));
  330   Value *Val1 = EmitScalarExpr(E->getArg(1));
  334   Value *Val0 = EmitScalarExpr(E->getArg(0));
  335   Value *Val1 = llvm::ConstantInt::get(Int64Ty, 32);
  336   Value *Val2 = Builder.CreateLShr(Val0, Val1);
  337   Value *Val3 = Builder.CreateIntCast(Val2, Int32Ty, false);
  338   Value *Val4 = Builder.CreateIntCast(Val0, Int32Ty, false);
  339   Value *Val5 = EmitScalarExpr(E->getArg(1));
  340   Value *Val6 = Builder.CreateCall(CGM.getIntrinsic(Intrinsic::arm_mve_urshrl), llvm::SmallVector<Value *, 3> {Val4, Val3, Val5});
  341   Value *Val7 = Builder.CreateExtractValue(Val6, 1);
  342   Value *Val8 = Builder.CreateIntCast(Val7, Int64Ty, false);
  343   Value *Val9 = llvm::ConstantInt::get(Int64Ty, 32);
  344   Value *Val10 = Builder.CreateShl(Val8, Val9);
  345   Value *Val11 = Builder.CreateExtractValue(Val6, 0);
  346   Value *Val12 = Builder.CreateIntCast(Val11, Int64Ty, false);
  450   Value *Val0 = EmitScalarExpr(E->getArg(1));
  451   Value *Val1 = EmitScalarExpr(E->getArg(2));
  452   Value *Val2 = EmitScalarExpr(E->getArg(3));
  453   Value *Val3 = Builder.CreateIntCast(Val2, Int32Ty, false);
  454   Value *Val4 = Builder.CreateCall(CGM.getIntrinsic(Intrinsic::arm_mve_pred_i2v, llvm::SmallVector<llvm::Type *, 1> {Param0}), llvm::SmallVector<Value *, 1> {Val3});
  455   Value *Val5 = EmitScalarExpr(E->getArg(0));
include/llvm/ADT/ArrayRef.h
  108         const ArrayRef<U *> &A,
  110            std::is_convertible<U *const *, T const *>::value>::type * = nullptr)
  118       const SmallVectorTemplateCommon<U *, DummyT> &Vec,
  120           std::is_convertible<U *const *, T const *>::value>::type * = nullptr)
  127     ArrayRef(const std::vector<U *, A> &Vec,
  129                  std::is_convertible<U *const *, T const *>::value>::type* = 0)
include/llvm/ADT/DenseMapInfo.h
   39   static inline T* getEmptyKey() {
   41     Val <<= PointerLikeTypeTraits<T*>::NumLowBitsAvailable;
   45   static inline T* getTombstoneKey() {
   47     Val <<= PointerLikeTypeTraits<T*>::NumLowBitsAvailable;
   51   static unsigned getHashValue(const T *PtrVal) {
   56   static bool isEqual(const T *LHS, const T *RHS) { return LHS == RHS; }
   56   static bool isEqual(const T *LHS, const T *RHS) { return LHS == RHS; }
include/llvm/ADT/SmallSet.h
  249 class SmallSet<PointeeType*, N> : public SmallPtrSet<PointeeType*, N> {};
include/llvm/Analysis/AliasAnalysis.h
  303   using IsCapturedCacheT = SmallDenseMap<const Value *, bool, 8>;
  352   AliasResult alias(const Value *V1, LocationSize V1Size, const Value *V2,
  352   AliasResult alias(const Value *V1, LocationSize V1Size, const Value *V2,
  358   AliasResult alias(const Value *V1, const Value *V2) {
  358   AliasResult alias(const Value *V1, const Value *V2) {
  369   bool isNoAlias(const Value *V1, LocationSize V1Size, const Value *V2,
  369   bool isNoAlias(const Value *V1, LocationSize V1Size, const Value *V2,
  375   bool isNoAlias(const Value *V1, const Value *V2) {
  375   bool isNoAlias(const Value *V1, const Value *V2) {
  386   bool isMustAlias(const Value *V1, const Value *V2) {
  386   bool isMustAlias(const Value *V1, const Value *V2) {
  397   bool pointsToConstantMemory(const Value *P, bool OrLocal = false) {
  527   ModRefInfo getModRefInfo(const CallBase *Call, const Value *P,
  537   ModRefInfo getModRefInfo(const LoadInst *L, const Value *P,
  547   ModRefInfo getModRefInfo(const StoreInst *S, const Value *P,
  557   ModRefInfo getModRefInfo(const FenceInst *S, const Value *P,
  568   ModRefInfo getModRefInfo(const AtomicCmpXchgInst *CX, const Value *P,
  578   ModRefInfo getModRefInfo(const AtomicRMWInst *RMW, const Value *P,
  588   ModRefInfo getModRefInfo(const VAArgInst *I, const Value *P,
  598   ModRefInfo getModRefInfo(const CatchPadInst *I, const Value *P,
  608   ModRefInfo getModRefInfo(const CatchReturnInst *I, const Value *P,
  630   ModRefInfo getModRefInfo(const Instruction *I, const Value *P,
  655   ModRefInfo callCapturesBefore(const Instruction *I, const Value *P,
  671   bool canBasicBlockModify(const BasicBlock &BB, const Value *P,
  687                                  const Value *Ptr, LocationSize Size,
 1066 bool isNoAliasCall(const Value *V);
 1069 bool isNoAliasArgument(const Value *V);
 1078 bool isIdentifiedObject(const Value *V);
 1085 bool isIdentifiedFunctionLocal(const Value *V);
include/llvm/Analysis/AliasSetTracker.h
   52     Value *Val;  // The pointer this record corresponds to.
   64     PointerRec(Value *V)
   67     Value *getValue() const { return Val; }
  257     Value *getPointer() const { return CurNode->getValue(); }
  318   AliasResult aliasesPointer(const Value *Ptr, LocationSize Size,
  335     void allUsesReplacedWith(Value *) override;
  338     ASTCallbackVH(Value *V, AliasSetTracker *AST = nullptr);
  340     ASTCallbackVH &operator=(Value *V);
  344   struct ASTCallbackVHDenseMapInfo : public DenseMapInfo<Value *> {};
  377   void add(Value *Ptr, LocationSize Size, const AAMDNodes &AAInfo); // Add a loc
  407   void deleteValue(Value *PtrVal);
  413   void copyValue(Value *From, Value *To);
  413   void copyValue(Value *From, Value *To);
  441   AliasSet::PointerRec &getEntryFor(Value *V) {
  449   AliasSet *mergeAliasSetsForPointer(const Value *Ptr, LocationSize Size,
include/llvm/Analysis/AssumptionCache.h
   55     void allUsesReplacedWith(Value *) override;
   58     using DMI = DenseMapInfo<Value *>;
   60     AffectedValueCallbackVH(Value *V, AssumptionCache *AC = nullptr)
   77   void transferAffectedValuesInCache(Value *OV, Value *NV);
   77   void transferAffectedValuesInCache(Value *OV, Value *NV);
  138   MutableArrayRef<WeakTrackingVH> assumptionsFor(const Value *V) {
  194     using DMI = DenseMapInfo<Value *>;
  196     FunctionCallbackVH(Value *V, AssumptionCacheTracker *ACT = nullptr)
include/llvm/Analysis/BasicAliasAnalysis.h
  112     const Value *V;
  137     const Value *Base;
  164   SmallPtrSet<const Value *, 16> Visited;
  166   static const Value *
  167   GetLinearExpression(const Value *V, APInt &Scale, APInt &Offset,
  172   static bool DecomposeGEPExpression(const Value *V, DecomposedGEP &Decomposed,
  193   bool isValueEqualInPotentialCycles(const Value *V1, const Value *V2);
  193   bool isValueEqualInPotentialCycles(const Value *V1, const Value *V2);
  199                        const AAMDNodes &V1AAInfo, const Value *V2,
  201                        const Value *UnderlyingV1, const Value *UnderlyingV2,
  201                        const Value *UnderlyingV1, const Value *UnderlyingV2,
  205                        const AAMDNodes &PNAAInfo, const Value *V2,
  207                        const Value *UnderV2, AAQueryInfo &AAQI);
  210                           const AAMDNodes &SIAAInfo, const Value *V2,
  212                           const Value *UnderV2, AAQueryInfo &AAQI);
  214   AliasResult aliasCheck(const Value *V1, LocationSize V1Size,
  215                          AAMDNodes V1AATag, const Value *V2,
  217                          AAQueryInfo &AAQI, const Value *O1 = nullptr,
  218                          const Value *O2 = nullptr);
include/llvm/Analysis/BranchProbabilityInfo.h
  161     BasicBlockCallbackVH(const Value *V, BranchProbabilityInfo *BPI = nullptr)
  165   DenseSet<BasicBlockCallbackVH, DenseMapInfo<Value*>> Handles;
include/llvm/Analysis/CFLAliasAnalysisUtils.h
   31   void allUsesReplacedWith(Value *) override { removeSelfFromCache(); }
   38     auto *Val = getValPtr();
   44 static inline const Function *parentFunctionOfValue(const Value *Val) {
include/llvm/Analysis/CaptureTracking.h
   42   bool PointerMayBeCaptured(const Value *V,
   60   bool PointerMayBeCapturedBefore(const Value *V, bool ReturnCaptures,
   91     virtual bool isDereferenceableOrNull(Value *O, const DataLayout &DL);
   99   void PointerMayBeCaptured(const Value *V, CaptureTracker *Tracker,
include/llvm/Analysis/CmpInstAnalysis.h
   64   bool decomposeBitTestICmp(Value *LHS, Value *RHS, CmpInst::Predicate &Pred,
   64   bool decomposeBitTestICmp(Value *LHS, Value *RHS, CmpInst::Predicate &Pred,
   65                             Value *&X, APInt &Mask,
include/llvm/Analysis/CodeMetrics.h
   80                          const SmallPtrSetImpl<const Value*> &EphValues);
   85                                      SmallPtrSetImpl<const Value *> &EphValues);
   90                                      SmallPtrSetImpl<const Value *> &EphValues);
include/llvm/Analysis/DemandedBits.h
   67     const Value *Val, unsigned OperandNo,
include/llvm/Analysis/DependenceAnalysis.h
  572     bool isKnownNonNegative(const SCEV *S, const Value *Ptr) const;
include/llvm/Analysis/DivergenceAnalysis.h
   60   void addUniformOverride(const Value &UniVal);
   63   void markDivergent(const Value &DivVal);
   74   bool isAlwaysUniform(const Value &Val) const;
   77   bool isDivergent(const Value &Val) const;
  105   void pushUsers(const Value &I);
  120                            const Value &Val) const;
  166   DenseSet<const Value *> UniformOverrides;
  172   DenseSet<const Value *> DivergentValues;
  196   bool isDivergent(const Value &V) const;
  202   bool isUniform(const Value &V) const { return !isDivergent(V); }
include/llvm/Analysis/EHPersonalities.h
   41 EHPersonality classifyEHPersonality(const Value *Pers);
include/llvm/Analysis/GlobalsModRef.h
   48   DenseMap<const Value *, const GlobalValue *> AllocsForIndirectGlobals;
   63     DeletionCallbackHandle(GlobalsAAResult &GAR, Value *V)
  113   bool AnalyzeUsesOfPointer(Value *V,
  120   bool isNonEscapingGlobalNoAlias(const GlobalValue *GV, const Value *V);
include/llvm/Analysis/GuardUtils.h
   38 bool parseWidenableBranch(const User *U, Value *&Condition,
   39                           Value *&WidenableCondition, BasicBlock *&IfTrueBB,
include/llvm/Analysis/IVDescriptors.h
   91   RecurrenceDescriptor(Value *Start, Instruction *Exit, RecurrenceKind K,
  205   TrackingVH<Value> getRecurrenceStartValue() { return StartValue; }
  239   TrackingVH<Value> StartValue;
  280   Value *getStartValue() const { return StartValue; }
  348   InductionDescriptor(Value *Start, InductionKind K, const SCEV *Step,
  353   TrackingVH<Value> StartValue;
include/llvm/Analysis/IVUsers.h
   40   IVStrideUse(IVUsers *P, Instruction* U, Value *O)
   56   Value *getOperandValToReplace() const {
   62   void setOperandValToReplace(Value *Op) {
  107   SmallPtrSet<const Value *, 32> EphValues;
  131   IVStrideUse &AddUser(Instruction *User, Value *Operand);
include/llvm/Analysis/InstructionSimplify.h
  122 Value *SimplifyFNegInst(Value *Op, FastMathFlags FMF,
  122 Value *SimplifyFNegInst(Value *Op, FastMathFlags FMF,
  126 Value *SimplifyAddInst(Value *LHS, Value *RHS, bool isNSW, bool isNUW,
  126 Value *SimplifyAddInst(Value *LHS, Value *RHS, bool isNSW, bool isNUW,
  126 Value *SimplifyAddInst(Value *LHS, Value *RHS, bool isNSW, bool isNUW,
  130 Value *SimplifySubInst(Value *LHS, Value *RHS, bool isNSW, bool isNUW,
  130 Value *SimplifySubInst(Value *LHS, Value *RHS, bool isNSW, bool isNUW,
  130 Value *SimplifySubInst(Value *LHS, Value *RHS, bool isNSW, bool isNUW,
  134 Value *SimplifyFAddInst(Value *LHS, Value *RHS, FastMathFlags FMF,
  134 Value *SimplifyFAddInst(Value *LHS, Value *RHS, FastMathFlags FMF,
  134 Value *SimplifyFAddInst(Value *LHS, Value *RHS, FastMathFlags FMF,
  138 Value *SimplifyFSubInst(Value *LHS, Value *RHS, FastMathFlags FMF,
  138 Value *SimplifyFSubInst(Value *LHS, Value *RHS, FastMathFlags FMF,
  138 Value *SimplifyFSubInst(Value *LHS, Value *RHS, FastMathFlags FMF,
  142 Value *SimplifyFMulInst(Value *LHS, Value *RHS, FastMathFlags FMF,
  142 Value *SimplifyFMulInst(Value *LHS, Value *RHS, FastMathFlags FMF,
  142 Value *SimplifyFMulInst(Value *LHS, Value *RHS, FastMathFlags FMF,
  149 Value *SimplifyFMAFMul(Value *LHS, Value *RHS, FastMathFlags FMF,
  149 Value *SimplifyFMAFMul(Value *LHS, Value *RHS, FastMathFlags FMF,
  149 Value *SimplifyFMAFMul(Value *LHS, Value *RHS, FastMathFlags FMF,
  153 Value *SimplifyMulInst(Value *LHS, Value *RHS, const SimplifyQuery &Q);
  153 Value *SimplifyMulInst(Value *LHS, Value *RHS, const SimplifyQuery &Q);
  153 Value *SimplifyMulInst(Value *LHS, Value *RHS, const SimplifyQuery &Q);
  156 Value *SimplifySDivInst(Value *LHS, Value *RHS, const SimplifyQuery &Q);
  156 Value *SimplifySDivInst(Value *LHS, Value *RHS, const SimplifyQuery &Q);
  156 Value *SimplifySDivInst(Value *LHS, Value *RHS, const SimplifyQuery &Q);
  159 Value *SimplifyUDivInst(Value *LHS, Value *RHS, const SimplifyQuery &Q);
  159 Value *SimplifyUDivInst(Value *LHS, Value *RHS, const SimplifyQuery &Q);
  159 Value *SimplifyUDivInst(Value *LHS, Value *RHS, const SimplifyQuery &Q);
  162 Value *SimplifyFDivInst(Value *LHS, Value *RHS, FastMathFlags FMF,
  162 Value *SimplifyFDivInst(Value *LHS, Value *RHS, FastMathFlags FMF,
  162 Value *SimplifyFDivInst(Value *LHS, Value *RHS, FastMathFlags FMF,
  166 Value *SimplifySRemInst(Value *LHS, Value *RHS, const SimplifyQuery &Q);
  166 Value *SimplifySRemInst(Value *LHS, Value *RHS, const SimplifyQuery &Q);
  166 Value *SimplifySRemInst(Value *LHS, Value *RHS, const SimplifyQuery &Q);
  169 Value *SimplifyURemInst(Value *LHS, Value *RHS, const SimplifyQuery &Q);
  169 Value *SimplifyURemInst(Value *LHS, Value *RHS, const SimplifyQuery &Q);
  169 Value *SimplifyURemInst(Value *LHS, Value *RHS, const SimplifyQuery &Q);
  172 Value *SimplifyFRemInst(Value *LHS, Value *RHS, FastMathFlags FMF,
  172 Value *SimplifyFRemInst(Value *LHS, Value *RHS, FastMathFlags FMF,
  172 Value *SimplifyFRemInst(Value *LHS, Value *RHS, FastMathFlags FMF,
  176 Value *SimplifyShlInst(Value *Op0, Value *Op1, bool isNSW, bool isNUW,
  176 Value *SimplifyShlInst(Value *Op0, Value *Op1, bool isNSW, bool isNUW,
  176 Value *SimplifyShlInst(Value *Op0, Value *Op1, bool isNSW, bool isNUW,
  180 Value *SimplifyLShrInst(Value *Op0, Value *Op1, bool isExact,
  180 Value *SimplifyLShrInst(Value *Op0, Value *Op1, bool isExact,
  180 Value *SimplifyLShrInst(Value *Op0, Value *Op1, bool isExact,
  184 Value *SimplifyAShrInst(Value *Op0, Value *Op1, bool isExact,
  184 Value *SimplifyAShrInst(Value *Op0, Value *Op1, bool isExact,
  184 Value *SimplifyAShrInst(Value *Op0, Value *Op1, bool isExact,
  188 Value *SimplifyAndInst(Value *LHS, Value *RHS, const SimplifyQuery &Q);
  188 Value *SimplifyAndInst(Value *LHS, Value *RHS, const SimplifyQuery &Q);
  188 Value *SimplifyAndInst(Value *LHS, Value *RHS, const SimplifyQuery &Q);
  191 Value *SimplifyOrInst(Value *LHS, Value *RHS, const SimplifyQuery &Q);
  191 Value *SimplifyOrInst(Value *LHS, Value *RHS, const SimplifyQuery &Q);
  191 Value *SimplifyOrInst(Value *LHS, Value *RHS, const SimplifyQuery &Q);
  194 Value *SimplifyXorInst(Value *LHS, Value *RHS, const SimplifyQuery &Q);
  194 Value *SimplifyXorInst(Value *LHS, Value *RHS, const SimplifyQuery &Q);
  194 Value *SimplifyXorInst(Value *LHS, Value *RHS, const SimplifyQuery &Q);
  197 Value *SimplifyICmpInst(unsigned Predicate, Value *LHS, Value *RHS,
  197 Value *SimplifyICmpInst(unsigned Predicate, Value *LHS, Value *RHS,
  197 Value *SimplifyICmpInst(unsigned Predicate, Value *LHS, Value *RHS,
  201 Value *SimplifyFCmpInst(unsigned Predicate, Value *LHS, Value *RHS,
  201 Value *SimplifyFCmpInst(unsigned Predicate, Value *LHS, Value *RHS,
  201 Value *SimplifyFCmpInst(unsigned Predicate, Value *LHS, Value *RHS,
  205 Value *SimplifySelectInst(Value *Cond, Value *TrueVal, Value *FalseVal,
  205 Value *SimplifySelectInst(Value *Cond, Value *TrueVal, Value *FalseVal,
  205 Value *SimplifySelectInst(Value *Cond, Value *TrueVal, Value *FalseVal,
  205 Value *SimplifySelectInst(Value *Cond, Value *TrueVal, Value *FalseVal,
  209 Value *SimplifyGEPInst(Type *SrcTy, ArrayRef<Value *> Ops,
  209 Value *SimplifyGEPInst(Type *SrcTy, ArrayRef<Value *> Ops,
  213 Value *SimplifyInsertValueInst(Value *Agg, Value *Val, ArrayRef<unsigned> Idxs,
  213 Value *SimplifyInsertValueInst(Value *Agg, Value *Val, ArrayRef<unsigned> Idxs,
  213 Value *SimplifyInsertValueInst(Value *Agg, Value *Val, ArrayRef<unsigned> Idxs,
  217 Value *SimplifyInsertElementInst(Value *Vec, Value *Elt, Value *Idx,
  217 Value *SimplifyInsertElementInst(Value *Vec, Value *Elt, Value *Idx,
  217 Value *SimplifyInsertElementInst(Value *Vec, Value *Elt, Value *Idx,
  217 Value *SimplifyInsertElementInst(Value *Vec, Value *Elt, Value *Idx,
  221 Value *SimplifyExtractValueInst(Value *Agg, ArrayRef<unsigned> Idxs,
  221 Value *SimplifyExtractValueInst(Value *Agg, ArrayRef<unsigned> Idxs,
  225 Value *SimplifyExtractElementInst(Value *Vec, Value *Idx,
  225 Value *SimplifyExtractElementInst(Value *Vec, Value *Idx,
  225 Value *SimplifyExtractElementInst(Value *Vec, Value *Idx,
  229 Value *SimplifyCastInst(unsigned CastOpc, Value *Op, Type *Ty,
  229 Value *SimplifyCastInst(unsigned CastOpc, Value *Op, Type *Ty,
  233 Value *SimplifyShuffleVectorInst(Value *Op0, Value *Op1, Constant *Mask,
  233 Value *SimplifyShuffleVectorInst(Value *Op0, Value *Op1, Constant *Mask,
  233 Value *SimplifyShuffleVectorInst(Value *Op0, Value *Op1, Constant *Mask,
  239 Value *SimplifyCmpInst(unsigned Predicate, Value *LHS, Value *RHS,
  239 Value *SimplifyCmpInst(unsigned Predicate, Value *LHS, Value *RHS,
  239 Value *SimplifyCmpInst(unsigned Predicate, Value *LHS, Value *RHS,
  243 Value *SimplifyUnOp(unsigned Opcode, Value *Op, const SimplifyQuery &Q);
  243 Value *SimplifyUnOp(unsigned Opcode, Value *Op, const SimplifyQuery &Q);
  247 Value *SimplifyUnOp(unsigned Opcode, Value *Op, FastMathFlags FMF,
  247 Value *SimplifyUnOp(unsigned Opcode, Value *Op, FastMathFlags FMF,
  251 Value *SimplifyBinOp(unsigned Opcode, Value *LHS, Value *RHS,
  251 Value *SimplifyBinOp(unsigned Opcode, Value *LHS, Value *RHS,
  251 Value *SimplifyBinOp(unsigned Opcode, Value *LHS, Value *RHS,
  256 Value *SimplifyBinOp(unsigned Opcode, Value *LHS, Value *RHS,
  256 Value *SimplifyBinOp(unsigned Opcode, Value *LHS, Value *RHS,
  256 Value *SimplifyBinOp(unsigned Opcode, Value *LHS, Value *RHS,
  260 Value *SimplifyCall(CallBase *Call, const SimplifyQuery &Q);
  264 Value *SimplifyInstruction(Instruction *I, const SimplifyQuery &Q,
  277     Instruction *I, Value *SimpleV, const TargetLibraryInfo *TLI = nullptr,
include/llvm/Analysis/LazyCallGraph.h
 1110       for (Value *Op : C->operand_values())
include/llvm/Analysis/LazyValueInfo.h
   71   Tristate getPredicateOnEdge(unsigned Pred, Value *V, Constant *C,
   78   Tristate getPredicateAt(unsigned Pred, Value *V, Constant *C,
   83   Constant *getConstant(Value *V, BasicBlock *BB, Instruction *CxtI = nullptr);
   88   ConstantRange getConstantRange(Value *V, BasicBlock *BB, Instruction *CxtI = nullptr);
   92   Constant *getConstantOnEdge(Value *V, BasicBlock *FromBB, BasicBlock *ToBB,
   98   ConstantRange getConstantRangeOnEdge(Value *V, BasicBlock *FromBB,
include/llvm/Analysis/LegacyDivergenceAnalysis.h
   42   bool isDivergent(const Value *V) const;
   48   bool isUniform(const Value *V) const { return !isDivergent(V); }
   55   void removeValue(const Value *V) { DivergentValues.erase(V); }
   65   DenseSet<const Value *> DivergentValues;
include/llvm/Analysis/Loads.h
   30 bool isDereferenceablePointer(const Value *V, Type *Ty,
   39 bool isDereferenceableAndAlignedPointer(const Value *V, Type *Ty,
   49 bool isDereferenceableAndAlignedPointer(const Value *V, Align Alignment,
   62 bool isSafeToLoadUnconditionally(Value *V, MaybeAlign Alignment, APInt &Size,
   86 bool isSafeToLoadUnconditionally(Value *V, Type *Ty, MaybeAlign Alignment,
  119 Value *FindAvailableLoadedValue(LoadInst *Load,
  150 Value *FindAvailablePtrLoadStore(Value *Ptr, Type *AccessTy, bool AtLeastAtomic,
  150 Value *FindAvailablePtrLoadStore(Value *Ptr, Type *AccessTy, bool AtLeastAtomic,
include/llvm/Analysis/LoopAccessAnalysis.h
   94   typedef PointerIntPair<Value *, 1, bool> MemAccessInfo;
  185     Value *Ptr = SI->getPointerOperand();
  194     Value *Ptr = LI->getPointerOperand();
  338     TrackingVH<Value> PointerValue;
  355     PointerInfo(Value *PointerValue, const SCEV *Start, const SCEV *End,
  377   void insert(Loop *Lp, Value *Ptr, bool WritePtr, unsigned DepSetId,
  546   bool isUniform(Value *V) const;
  590   bool hasStride(Value *V) const { return StrideSet.count(V); }
  629   void collectStridedAccess(Value *LoadOrStoreInst);
  664   SmallPtrSet<Value *, 8> StrideSet;
  667 Value *stripIntegerCast(Value *V);
  667 Value *stripIntegerCast(Value *V);
  681                                       Value *Ptr, Value *OrigPtr = nullptr);
  681                                       Value *Ptr, Value *OrigPtr = nullptr);
  693 int64_t getPtrStride(PredicatedScalarEvolution &PSE, Value *Ptr, const Loop *Lp,
  707 bool sortPtrAccesses(ArrayRef<Value *> VL, const DataLayout &DL,
  713 bool isConsecutiveAccess(Value *A, Value *B, const DataLayout &DL,
  713 bool isConsecutiveAccess(Value *A, Value *B, const DataLayout &DL,
include/llvm/Analysis/LoopInfo.h
  531   bool isLoopInvariant(const Value *V) const;
  545   bool makeLoopInvariant(Value *V, bool &Changed,
  626     Value &getInitialIVValue() const { return InitialIVValue; }
  633     Value *getStepValue() const { return StepValue; }
  636     Value &getFinalIVValue() const { return FinalIVValue; }
  683     LoopBounds(const Loop &Loop, Value &I, Instruction &SI, Value *SV, Value &F,
  683     LoopBounds(const Loop &Loop, Value &I, Instruction &SI, Value *SV, Value &F,
  683     LoopBounds(const Loop &Loop, Value &I, Instruction &SI, Value *SV, Value &F,
  691     Value &InitialIVValue;
  698     Value *StepValue;
  701     Value &FinalIVValue;
 1070   bool replacementPreservesLCSSAForm(Instruction *From, Value *To) {
include/llvm/Analysis/LoopPass.h
   82   virtual void deleteAnalysisValue(Value *V, Loop *L) {}
  147   void deleteSimpleAnalysisValue(Value *V, Loop *L);
include/llvm/Analysis/LoopUnrollAnalyzer.h
   43     Value *Base = nullptr;
   49                        DenseMap<Value *, Constant *> &SimplifiedValues,
   65   DenseMap<Value *, SimplifiedAddress> SimplifiedAddresses;
   79   DenseMap<Value *, Constant *> &SimplifiedValues;
include/llvm/Analysis/MemoryBuiltins.h
   59 bool isAllocationFn(const Value *V, const TargetLibraryInfo *TLI,
   61 bool isAllocationFn(const Value *V,
   67 bool isNoAliasFn(const Value *V, const TargetLibraryInfo *TLI,
   72 bool isMallocLikeFn(const Value *V, const TargetLibraryInfo *TLI,
   74 bool isMallocLikeFn(const Value *V,
   80 bool isCallocLikeFn(const Value *V, const TargetLibraryInfo *TLI,
   85 bool isMallocOrCallocLikeFn(const Value *V, const TargetLibraryInfo *TLI,
   90 bool isAllocLikeFn(const Value *V, const TargetLibraryInfo *TLI,
   95 bool isReallocLikeFn(const Value *V, const TargetLibraryInfo *TLI,
  104 bool isOpNewLikeFn(const Value *V, const TargetLibraryInfo *TLI,
  109 bool isStrdupLikeFn(const Value *V, const TargetLibraryInfo *TLI,
  120 extractMallocCall(const Value *I,
  123 extractMallocCall(Value *I,
  147 Value *getMallocArraySize(CallInst *CI, const DataLayout &DL,
  157 const CallInst *extractCallocCall(const Value *I, const TargetLibraryInfo *TLI);
  158 inline CallInst *extractCallocCall(Value *I, const TargetLibraryInfo *TLI) {
  171 const CallInst *isFreeCall(const Value *I, const TargetLibraryInfo *TLI);
  173 inline CallInst *isFreeCall(Value *I, const TargetLibraryInfo *TLI) {
  209 bool getObjectSize(const Value *Ptr, uint64_t &Size, const DataLayout &DL,
  216 Value *lowerObjectSizeCall(IntrinsicInst *ObjectSize, const DataLayout &DL,
  244   SizeOffsetType compute(Value *V);
  280 using SizeOffsetEvalType = std::pair<Value *, Value *>;
  280 using SizeOffsetEvalType = std::pair<Value *, Value *>;
  288   using CacheMapTy = DenseMap<const Value *, WeakEvalType>;
  289   using PtrSetTy = SmallPtrSet<const Value *, 8>;
  296   Value *Zero;
  302   SizeOffsetEvalType compute_(Value *V);
  312   SizeOffsetEvalType compute(Value *V);
include/llvm/Analysis/MemoryDependenceAnalysis.h
  237   Value *Address;
  240   NonLocalDepResult(BasicBlock *bb, MemDepResult result, Value *address)
  246   void setResult(const MemDepResult &R, Value *Addr) {
  261   Value *getAddress() const { return Address; }
  287   using ValueIsLoadPair = PointerIntPair<const Value *, 1, bool>;
  317   DenseMap<AssertingVH<const Value>, NonLocalDepResult> NonLocalDefsCache;
  319     DenseMap<Instruction *, SmallPtrSet<const Value*, 4>>;
  429   void invalidateCachedPointerInfo(Value *Ptr);
  478   static unsigned getLoadLoadClobberFullWidthSize(const Value *MemLocBase,
  495                                    DenseMap<BasicBlock *, Value *> &Visited,
include/llvm/Analysis/MemoryLocation.h
  182   const Value *Ptr;
  243   explicit MemoryLocation(const Value *Ptr = nullptr,
  248   MemoryLocation getWithNewPtr(const Value *NewPtr) const {
  289     return MemoryLocation(DenseMapInfo<const Value *>::getEmptyKey(),
  293     return MemoryLocation(DenseMapInfo<const Value *>::getTombstoneKey(),
  297     return DenseMapInfo<const Value *>::getHashValue(Val.Ptr) ^
include/llvm/Analysis/MemorySSA.h
  154   static bool classof(const Value *V) {
  259   static bool classof(const Value *MA) {
  330   static bool classof(const Value *MA) {
  390   static bool classof(const Value *MA) {
  629   static bool classof(const Value *V) {
  725     return cast_or_null<MemoryPhi>(ValueToMemoryAccess.lookup(cast<Value>(BB)));
  876   DenseMap<const Value *, MemoryAccess *> ValueToMemoryAccess;
include/llvm/Analysis/MemorySSAUpdater.h
   64 using ValueToValueMapTy = ValueMap<const Value *, WeakTrackingVH>;
include/llvm/Analysis/ObjCARCAnalysisUtils.h
   77 inline const Value *GetUnderlyingObjCPtr(const Value *V,
   77 inline const Value *GetUnderlyingObjCPtr(const Value *V,
   90 inline const Value *
   91 GetUnderlyingObjCPtrCached(const Value *V, const DataLayout &DL,
   92                            DenseMap<const Value *, WeakTrackingVH> &Cache) {
   96   const Value *Computed = GetUnderlyingObjCPtr(V, DL);
  116 inline const Value *GetRCIdentityRoot(const Value *V) {
  116 inline const Value *GetRCIdentityRoot(const Value *V) {
  130 inline Value *GetRCIdentityRoot(Value *V) {
  130 inline Value *GetRCIdentityRoot(Value *V) {
  137 inline Value *GetArgRCIdentityRoot(Value *Inst) {
  137 inline Value *GetArgRCIdentityRoot(Value *Inst) {
  141 inline bool IsNullOrUndef(const Value *V) {
  152 inline bool IsPotentialRetainableObjPtr(const Value *Op) {
  177 inline bool IsPotentialRetainableObjPtr(const Value *Op,
  212 inline bool IsObjCIdentifiedObject(const Value *V) {
  222     const Value *Pointer =
include/llvm/Analysis/ObjCARCInstKind.h
  106 inline ARCInstKind GetBasicARCInstKind(const Value *V) {
  119 ARCInstKind GetARCInstKind(const Value *V);
include/llvm/Analysis/OptimizationRemarkEmitter.h
  109   Optional<uint64_t> computeHotness(const Value *V);
include/llvm/Analysis/PHITransAddr.h
   37   Value *Addr;
   52   PHITransAddr(Value *addr, const DataLayout &DL, AssumptionCache *AC)
   59   Value *getAddr() const { return Addr; }
   91   Value *PHITranslateWithInsertion(BasicBlock *CurBB, BasicBlock *PredBB,
  103   Value *PHITranslateSubExpr(Value *V, BasicBlock *CurBB, BasicBlock *PredBB,
  103   Value *PHITranslateSubExpr(Value *V, BasicBlock *CurBB, BasicBlock *PredBB,
  111   Value *InsertPHITranslatedSubExpr(Value *InVal, BasicBlock *CurBB,
  111   Value *InsertPHITranslatedSubExpr(Value *InVal, BasicBlock *CurBB,
  116   Value *AddAsInput(Value *V) {
  116   Value *AddAsInput(Value *V) {
include/llvm/Analysis/PhiValues.h
   44   using ValueSet = SmallPtrSet<Value *, 4>;
   61   void invalidateValue(const Value *V);
   75   using ConstValueSet = SmallPtrSet<const Value *, 4>;
   96     void allUsesReplacedWith(Value *New) override;
   99     PhiValuesCallbackVH(Value *V, PhiValues *PV = nullptr)
  104   DenseSet<PhiValuesCallbackVH, DenseMapInfo<Value *>> TrackedValues;
include/llvm/Analysis/ScalarEvolution.h
  504   void eraseValueFromMap(Value *V);
  508   const SCEV *getSCEV(Value *V);
  584   const SCEV *getUnknown(Value *V);
  671   const SCEV *getSCEVAtScope(Value *V, const Loop *L);
  800   void forgetValue(Value *V);
 1097     void allUsesReplacedWith(Value *New) override;
 1100     SCEVCallbackVH(Value *V, ScalarEvolution *SE = nullptr);
 1137   using ValueOffsetPair = std::pair<Value *, ConstantInt *>;
 1164       DenseMap<SCEVCallbackVH, const SCEV *, DenseMapInfo<Value *>>;
 1170   SmallPtrSet<Value *, 6> PendingLoopPredicates;
 1459   const SCEV *createSCEV(Value *V);
 1468   const SCEV *createSimpleAffineAddRec(PHINode *PN, Value *BEValueV,
 1469                                             Value *StartValueV);
 1478   const SCEV *createNodeForSelectOrPHI(Instruction *I, Value *Cond,
 1479                                        Value *TrueVal, Value *FalseVal);
 1479                                        Value *TrueVal, Value *FalseVal);
 1525   ExitLimit computeExitLimitFromCond(const Loop *L, Value *ExitCond,
 1538     SmallDenseMap<PointerIntPair<Value *, 1>, ExitLimit> TripCountMap;
 1548     Optional<ExitLimit> find(const Loop *L, Value *ExitCond, bool ExitIfTrue,
 1551     void insert(const Loop *L, Value *ExitCond, bool ExitIfTrue,
 1558                                            const Loop *L, Value *ExitCond,
 1563                                          Value *ExitCond, bool ExitIfTrue,
 1598   ExitLimit computeShiftCompareExitLimit(Value *LHS, Value *RHS, const Loop *L,
 1598   ExitLimit computeShiftCompareExitLimit(Value *LHS, Value *RHS, const Loop *L,
 1606   const SCEV *computeExitCountExhaustively(const Loop *L, Value *Cond,
 1650                      Value *FoundCondValue, bool Inverse);
 1764   const SCEV *getExistingSCEV(Value *V);
 1788   SCEV::NoWrapFlags getNoWrapFlagsFromUB(const Value *V);
 1977   const SCEV *getSCEV(Value *V);
 1989   const SCEVAddRecExpr *getAsAddRec(Value *V);
 1992   void setNoOverflow(Value *V, SCEVWrapPredicate::IncrementWrapFlags Flags);
 1996   bool hasNoOverflow(Value *V, SCEVWrapPredicate::IncrementWrapFlags Flags);
 2030   ValueMap<Value *, SCEVWrapPredicate::IncrementWrapFlags> FlagsMap;
include/llvm/Analysis/ScalarEvolutionAliasAnalysis.h
   37   Value *GetBaseValue(const SCEV *S);
include/llvm/Analysis/ScalarEvolutionExpander.h
   45   class SCEVExpander : public SCEVVisitor<SCEVExpander, Value*> {
   53     DenseMap<std::pair<const SCEV *, Instruction *>, TrackingVH<Value>>
   57     DenseSet<AssertingVH<Value>> InsertedValues;
   58     DenseSet<AssertingVH<Value>> InsertedPostIncValues;
  207     Value *expandCodeFor(const SCEV *SH, Type *Ty, Instruction *I);
  213     Value *expandCodeFor(const SCEV *SH, Type *Ty = nullptr);
  219     Value *expandCodeForPredicate(const SCEVPredicate *Pred, Instruction *Loc);
  223     Value *expandEqualPredicate(const SCEVEqualPredicate *Pred,
  227     Value *generateOverflowCheck(const SCEVAddRecExpr *AR, Instruction *Loc,
  232     Value *expandWrapPredicate(const SCEVWrapPredicate *P, Instruction *Loc);
  236     Value *expandUnionPredicate(const SCEVUnionPredicate *Pred,
  303     Value *getExactExistingExpansion(const SCEV *S, const Instruction *At,
  332     Value *InsertBinop(Instruction::BinaryOps Opcode, Value *LHS, Value *RHS,
  332     Value *InsertBinop(Instruction::BinaryOps Opcode, Value *LHS, Value *RHS,
  332     Value *InsertBinop(Instruction::BinaryOps Opcode, Value *LHS, Value *RHS,
  338     Value *ReuseOrCreateCast(Value *V, Type *Ty,
  338     Value *ReuseOrCreateCast(Value *V, Type *Ty,
  344     Value *InsertNoopCastOfTo(Value *V, Type *Ty);
  344     Value *InsertNoopCastOfTo(Value *V, Type *Ty);
  348     Value *expandAddToGEP(const SCEV *const *op_begin,
  350                           PointerType *PTy, Type *Ty, Value *V);
  351     Value *expandAddToGEP(const SCEV *Op, PointerType *PTy, Type *Ty, Value *V);
  351     Value *expandAddToGEP(const SCEV *Op, PointerType *PTy, Type *Ty, Value *V);
  357     Value *expand(const SCEV *S);
  362     Value *visitConstant(const SCEVConstant *S) {
  366     Value *visitTruncateExpr(const SCEVTruncateExpr *S);
  368     Value *visitZeroExtendExpr(const SCEVZeroExtendExpr *S);
  370     Value *visitSignExtendExpr(const SCEVSignExtendExpr *S);
  372     Value *visitAddExpr(const SCEVAddExpr *S);
  374     Value *visitMulExpr(const SCEVMulExpr *S);
  376     Value *visitUDivExpr(const SCEVUDivExpr *S);
  378     Value *visitAddRecExpr(const SCEVAddRecExpr *S);
  380     Value *visitSMaxExpr(const SCEVSMaxExpr *S);
  382     Value *visitUMaxExpr(const SCEVUMaxExpr *S);
  384     Value *visitSMinExpr(const SCEVSMinExpr *S);
  386     Value *visitUMinExpr(const SCEVUMinExpr *S);
  388     Value *visitUnknown(const SCEVUnknown *S) {
  392     void rememberInstruction(Value *I);
  398     Value *expandAddRecExprLiterally(const SCEVAddRecExpr *);
  405     Value *expandIVInc(PHINode *PN, Value *StepV, const Loop *L,
  405     Value *expandIVInc(PHINode *PN, Value *StepV, const Loop *L,
include/llvm/Analysis/ScalarEvolutionExpressions.h
  478     SCEVUnknown(const FoldingSetNodeIDRef ID, Value *V,
  484     void allUsesReplacedWith(Value *New) override;
  487     Value *getValue() const { return getValPtr(); }
  785   using ValueToValueMap = DenseMap<const Value *, Value *>;
  785   using ValueToValueMap = DenseMap<const Value *, Value *>;
  802       Value *V = Expr->getValue();
  804         Value *NV = Map[V];
include/llvm/Analysis/SparsePropagation.h
  103   virtual Value *GetValueFromLatticeVal(LatticeVal LV, Type *Ty = nullptr) {
  124   SmallVector<Value *, 64> ValueWorkList;
  253   if (Value *V = KeyInfo::getValueFromLatticeKey(Key))
  473       Value *V = ValueWorkList.back();
include/llvm/Analysis/TargetFolder.h
  146                                 ArrayRef<Value *> IdxList) const {
  162                                         ArrayRef<Value *> IdxList) const {
include/llvm/Analysis/TargetTransformInfo.h
   64   Value *PtrVal = nullptr;
   91   Value *LoopDecrement = nullptr; // Decrement the loop counter by this
  223   int getGEPCost(Type *PointeeType, const Value *Ptr,
  224                  ArrayRef<const Value *> Operands) const;
  231   int getExtCost(const Instruction *I, const Value *Src) const;
  255   int getCallCost(const Function *F, ArrayRef<const Value *> Arguments,
  289                        ArrayRef<const Value *> Arguments,
  323   int getUserCost(const User *U, ArrayRef<const Value *> Operands) const;
  328     SmallVector<const Value *, 4> Operands(U->value_op_begin(),
  346   bool isSourceOfDivergence(const Value *V) const;
  351   bool isAlwaysUniform(const Value *V) const;
  383                                         Value *OldV, Value *NewV) const;
  383                                         Value *OldV, Value *NewV) const;
  658   unsigned getOperandsScalarizationOverhead(ArrayRef<const Value *> Args,
  875   static OperandValueKind getOperandInfo(Value *V,
  897       ArrayRef<const Value *> Args = ArrayRef<const Value *>()) const;
  948   int getGatherScatterOpCost(unsigned Opcode, Type *DataTy, Value *Ptr,
  989                             ArrayRef<Value *> Args, FastMathFlags FMF,
 1037   Value *getOrCreateResultFromMemIntrinsic(IntrinsicInst *Inst,
 1041   Type *getMemcpyLoopLoweringType(LLVMContext &Context, Value *Length,
 1164   virtual int getGEPCost(Type *PointeeType, const Value *Ptr,
 1165                          ArrayRef<const Value *> Operands) = 0;
 1166   virtual int getExtCost(const Instruction *I, const Value *Src) = 0;
 1170                           ArrayRef<const Value *> Arguments, const User *U) = 0;
 1176                                ArrayRef<const Value *> Arguments,
 1182   getUserCost(const User *U, ArrayRef<const Value *> Operands) = 0;
 1184   virtual bool isSourceOfDivergence(const Value *V) = 0;
 1185   virtual bool isAlwaysUniform(const Value *V) = 0;
 1190     IntrinsicInst *II, Value *OldV, Value *NewV) const = 0;
 1190     IntrinsicInst *II, Value *OldV, Value *NewV) const = 0;
 1237   virtual unsigned getOperandsScalarizationOverhead(ArrayRef<const Value *> Args,
 1297                          ArrayRef<const Value *> Args) = 0;
 1315                                      Value *Ptr, bool VariableMask,
 1332          ArrayRef<Value *> Args, FastMathFlags FMF, unsigned VF) = 0;
 1342   virtual Value *getOrCreateResultFromMemIntrinsic(IntrinsicInst *Inst,
 1344   virtual Type *getMemcpyLoopLoweringType(LLVMContext &Context, Value *Length,
 1394   int getGEPCost(Type *PointeeType, const Value *Ptr,
 1395                  ArrayRef<const Value *> Operands) override {
 1398   int getExtCost(const Instruction *I, const Value *Src) override {
 1408                   ArrayRef<const Value *> Arguments, const User *U) override {
 1422                        ArrayRef<const Value *> Arguments,
 1429   int getUserCost(const User *U, ArrayRef<const Value *> Operands) override {
 1433   bool isSourceOfDivergence(const Value *V) override {
 1437   bool isAlwaysUniform(const Value *V) override {
 1451     IntrinsicInst *II, Value *OldV, Value *NewV) const override {
 1451     IntrinsicInst *II, Value *OldV, Value *NewV) const override {
 1564   unsigned getOperandsScalarizationOverhead(ArrayRef<const Value *> Args,
 1689                          ArrayRef<const Value *> Args) override {
 1724                              Value *Ptr, bool VariableMask,
 1751        ArrayRef<Value *> Args, FastMathFlags FMF, unsigned VF) override {
 1775   Value *getOrCreateResultFromMemIntrinsic(IntrinsicInst *Inst,
 1779   Type *getMemcpyLoopLoweringType(LLVMContext &Context, Value *Length,
include/llvm/Analysis/TargetTransformInfoImpl.h
  105   int getGEPCost(Type *PointeeType, const Value *Ptr,
  106                  ArrayRef<const Value *> Operands) {
  122   int getExtCost(const Instruction *I, const Value *Src) {
  151   bool isSourceOfDivergence(const Value *V) { return false; }
  153   bool isAlwaysUniform(const Value *V) { return false; }
  165                                         Value *OldV, Value *NewV) const {
  165                                         Value *OldV, Value *NewV) const {
  306   unsigned getOperandsScalarizationOverhead(ArrayRef<const Value *> Args,
  422                                   ArrayRef<const Value *> Args) {
  460   unsigned getGatherScatterOpCost(unsigned Opcode, Type *DataTy, Value *Ptr,
  481             ArrayRef<Value *> Args, FastMathFlags FMF, unsigned VF) {
  515   Value *getOrCreateResultFromMemIntrinsic(IntrinsicInst *Inst,
  520   Type *getMemcpyLoopLoweringType(LLVMContext &Context, Value *Length,
  606   unsigned minRequiredElementSize(const Value* Val, bool &isSigned) {
  721   unsigned getCallCost(const Function *F, ArrayRef<const Value *> Arguments,
  731   int getGEPCost(Type *PointeeType, const Value *Ptr,
  732                  ArrayRef<const Value *> Operands) {
  834                             ArrayRef<const Value *> Arguments, const User *U) {
  845   unsigned getUserCost(const User *U, ArrayRef<const Value *> Operands) {
  872       SmallVector<const Value *, 8> Arguments(CS.arg_begin(), CS.arg_end());
  888     SmallVector<const Value *, 4> Operands(I->value_op_begin(),
include/llvm/Analysis/Utils/Local.h
   28 Value *EmitGEPOffset(IRBuilderTy *Builder, const DataLayout &DL, User *GEP,
   32   Value *Result = Constant::getNullValue(IntPtrTy);
   46     Value *Op = *i;
include/llvm/Analysis/ValueTracking.h
   54   void computeKnownBits(const Value *V, KnownBits &Known,
   63   KnownBits computeKnownBits(const Value *V, const DataLayout &DL,
   77   bool haveNoCommonBitsSet(const Value *LHS, const Value *RHS,
   77   bool haveNoCommonBitsSet(const Value *LHS, const Value *RHS,
   89   bool isKnownToBeAPowerOfTwo(const Value *V, const DataLayout &DL,
  104   bool isKnownNonZero(const Value *V, const DataLayout &DL, unsigned Depth = 0,
  114   bool isKnownNegation(const Value *X, const Value *Y, bool NeedNSW = false);
  114   bool isKnownNegation(const Value *X, const Value *Y, bool NeedNSW = false);
  117   bool isKnownNonNegative(const Value *V, const DataLayout &DL,
  126   bool isKnownPositive(const Value *V, const DataLayout &DL, unsigned Depth = 0,
  134   bool isKnownNegative(const Value *V, const DataLayout &DL, unsigned Depth = 0,
  142   bool isKnownNonEqual(const Value *V1, const Value *V2, const DataLayout &DL,
  142   bool isKnownNonEqual(const Value *V1, const Value *V2, const DataLayout &DL,
  157   bool MaskedValueIsZero(const Value *V, const APInt &Mask,
  171   unsigned ComputeNumSignBits(const Value *Op, const DataLayout &DL,
  182   bool ComputeMultiple(Value *V, unsigned Base, Value *&Multiple,
  182   bool ComputeMultiple(Value *V, unsigned Base, Value *&Multiple,
  193   bool CannotBeNegativeZero(const Value *V, const TargetLibraryInfo *TLI,
  204   bool CannotBeOrderedLessThanZero(const Value *V, const TargetLibraryInfo *TLI);
  209   bool isKnownNeverNaN(const Value *V, const TargetLibraryInfo *TLI,
  219   bool SignBitMustBeZero(const Value *V, const TargetLibraryInfo *TLI);
  227   Value *isBytewiseValue(Value *V, const DataLayout &DL);
  227   Value *isBytewiseValue(Value *V, const DataLayout &DL);
  235   Value *FindInsertedValue(Value *V,
  235   Value *FindInsertedValue(Value *V,
  244   inline Value *GetPointerBaseWithConstantOffset(Value *Ptr, int64_t &Offset,
  244   inline Value *GetPointerBaseWithConstantOffset(Value *Ptr, int64_t &Offset,
  248     Value *Base =
  254   inline const Value *
  255   GetPointerBaseWithConstantOffset(const Value *Ptr, int64_t &Offset,
  295   bool getConstantDataArrayInfo(const Value *V, ConstantDataArraySlice &Slice,
  304   bool getConstantStringInfo(const Value *V, StringRef &Str,
  309   uint64_t GetStringLength(const Value *V, unsigned CharSize = 8);
  315   const Value *getArgumentAliasingToReturnedPointer(const CallBase *Call,
  317   inline Value *
  338   Value *GetUnderlyingObject(Value *V, const DataLayout &DL,
  338   Value *GetUnderlyingObject(Value *V, const DataLayout &DL,
  340   inline const Value *GetUnderlyingObject(const Value *V, const DataLayout &DL,
  340   inline const Value *GetUnderlyingObject(const Value *V, const DataLayout &DL,
  373   void GetUnderlyingObjects(const Value *V,
  374                             SmallVectorImpl<const Value *> &Objects,
  380   bool getUnderlyingObjectsForCodeGen(const Value *V,
  381                             SmallVectorImpl<Value *> &Objects,
  385   bool onlyUsedByLifetimeMarkers(const Value *V);
  417   bool isSafeToSpeculativelyExecute(const Value *V,
  452   OverflowResult computeOverflowForUnsignedMul(const Value *LHS,
  453                                                const Value *RHS,
  459   OverflowResult computeOverflowForSignedMul(const Value *LHS, const Value *RHS,
  459   OverflowResult computeOverflowForSignedMul(const Value *LHS, const Value *RHS,
  465   OverflowResult computeOverflowForUnsignedAdd(const Value *LHS,
  466                                                const Value *RHS,
  472   OverflowResult computeOverflowForSignedAdd(const Value *LHS, const Value *RHS,
  472   OverflowResult computeOverflowForSignedAdd(const Value *LHS, const Value *RHS,
  483   OverflowResult computeOverflowForUnsignedSub(const Value *LHS, const Value *RHS,
  483   OverflowResult computeOverflowForUnsignedSub(const Value *LHS, const Value *RHS,
  488   OverflowResult computeOverflowForSignedSub(const Value *LHS, const Value *RHS,
  488   OverflowResult computeOverflowForSignedSub(const Value *LHS, const Value *RHS,
  503   ConstantRange computeConstantRange(const Value *V, bool UseInstrInfo = true);
  548   const Value *getGuaranteedNonFullPoisonOp(const Instruction *I);
  554                      const SmallSet<const Value *, 16>& KnownPoison);
  620   SelectPatternResult matchSelectPattern(Value *V, Value *&LHS, Value *&RHS,
  620   SelectPatternResult matchSelectPattern(Value *V, Value *&LHS, Value *&RHS,
  620   SelectPatternResult matchSelectPattern(Value *V, Value *&LHS, Value *&RHS,
  625   matchSelectPattern(const Value *V, const Value *&LHS, const Value *&RHS) {
  625   matchSelectPattern(const Value *V, const Value *&LHS, const Value *&RHS) {
  625   matchSelectPattern(const Value *V, const Value *&LHS, const Value *&RHS) {
  626     Value *L = const_cast<Value *>(LHS);
  627     Value *R = const_cast<Value *>(RHS);
  637       CmpInst *CmpI, Value *TrueVal, Value *FalseVal, Value *&LHS, Value *&RHS,
  637       CmpInst *CmpI, Value *TrueVal, Value *FalseVal, Value *&LHS, Value *&RHS,
  637       CmpInst *CmpI, Value *TrueVal, Value *FalseVal, Value *&LHS, Value *&RHS,
  637       CmpInst *CmpI, Value *TrueVal, Value *FalseVal, Value *&LHS, Value *&RHS,
  663   Optional<bool> isImpliedCondition(const Value *LHS, const Value *RHS,
  663   Optional<bool> isImpliedCondition(const Value *LHS, const Value *RHS,
  669   Optional<bool> isImpliedByDomCondition(const Value *Cond,
  676   Optional<int64_t> isPointerOffset(const Value *Ptr1, const Value *Ptr2,
  676   Optional<int64_t> isPointerOffset(const Value *Ptr1, const Value *Ptr2,
include/llvm/Analysis/VectorUtils.h
  172 Value *stripGetElementPtr(Value *Ptr, ScalarEvolution *SE, Loop *Lp);
  172 Value *stripGetElementPtr(Value *Ptr, ScalarEvolution *SE, Loop *Lp);
  175 Value *getUniqueCastUse(Value *Ptr, Loop *Lp, Type *Ty);
  175 Value *getUniqueCastUse(Value *Ptr, Loop *Lp, Type *Ty);
  179 Value *getStrideFromPointer(Value *Ptr, ScalarEvolution *SE, Loop *Lp);
  179 Value *getStrideFromPointer(Value *Ptr, ScalarEvolution *SE, Loop *Lp);
  184 Value *findScalarElement(Value *V, unsigned EltNo);
  184 Value *findScalarElement(Value *V, unsigned EltNo);
  189 const Value *getSplatValue(const Value *V);
  189 const Value *getSplatValue(const Value *V);
  195 bool isSplatValue(const Value *V, unsigned Depth = 0);
  259 Instruction *propagateMetadata(Instruction *I, ArrayRef<Value *> VL);
  340 Value *concatenateVectors(IRBuilder<> &Builder, ArrayRef<Value *> Vecs);
  340 Value *concatenateVectors(IRBuilder<> &Builder, ArrayRef<Value *> Vecs);
  345 bool maskIsAllZeroOrUndef(Value *Mask);
  350 bool maskIsAllOneOrUndef(Value *Mask);
  354 APInt possiblyDemandedEltsInMask(Value *Mask);
include/llvm/CodeGen/Analysis.h
   97 GlobalValue *ExtractTypeInfo(Value *V);
include/llvm/CodeGen/AtomicExpandUtils.h
   25     function_ref<void(IRBuilder<> &, Value *, Value *, Value *, AtomicOrdering,
   25     function_ref<void(IRBuilder<> &, Value *, Value *, Value *, AtomicOrdering,
   25     function_ref<void(IRBuilder<> &, Value *, Value *, Value *, AtomicOrdering,
   26                       Value *&, Value *&)>;
   26                       Value *&, Value *&)>;
include/llvm/CodeGen/BasicTTIImpl.h
  210   bool isSourceOfDivergence(const Value *V) { return false; }
  212   bool isAlwaysUniform(const Value *V) { return false; }
  225                                         Value *OldV, Value *NewV) const {
  225                                         Value *OldV, Value *NewV) const {
  289   int getGEPCost(Type *PointeeType, const Value *Ptr,
  290                  ArrayRef<const Value *> Operands) {
  294   int getExtCost(const Instruction *I, const Value *Src) {
  307                             ArrayRef<const Value *> Arguments, const User *U) {
  579   unsigned getOperandsScalarizationOverhead(ArrayRef<const Value *> Args,
  582     SmallPtrSet<const Value*, 4> UniqueOperands;
  583     for (const Value *A : Args) {
  602   unsigned getScalarizationOverhead(Type *VecTy, ArrayRef<const Value *> Args) {
  627       ArrayRef<const Value *> Args = ArrayRef<const Value *>()) {
 1061                                  ArrayRef<Value *> Args, FastMathFlags FMF,
 1071       for (Value *Op : Args) {
 1096       Value *Mask = Args[3];
 1104       Value *Mask = Args[2];
 1126       Value *X = Args[0];
 1127       Value *Y = Args[1];
 1128       Value *Z = Args[2];
include/llvm/CodeGen/FastISel.h
   86     const Value *Callee = nullptr;
   94     SmallVector<Value *, 16> OutVals;
  105                                 const Value *Target, ArgListTy &&ArgsList,
  151                                 const Value *Target, ArgListTy &&ArgsList,
  202   DenseMap<const Value *, unsigned> LocalValueMap;
  273   unsigned getRegForValue(const Value *V);
  278   unsigned lookUpRegForValue(const Value *V);
  282   std::pair<unsigned, bool> getRegForGEPIndex(const Value *Idx);
  469   void updateValueMap(const Value *I, unsigned Reg, unsigned NumRegs = 1);
  499   bool canFoldAddIntoGEP(const User *GEP, const Value *Add);
  502   bool hasTrivialKill(const Value *V);
  530   bool selectFNeg(const User *I, const Value *In);
  555   unsigned materializeConstant(const Value *V, MVT VT);
  560   unsigned materializeRegForValue(const Value *V, MVT VT);
  592                          const Value *Callee, bool ForceRetVoidTy,
include/llvm/CodeGen/FunctionLoweringInfo.h
   78   DenseMap<const Value *, unsigned> ValueMap;
   85   DenseMap<unsigned, const Value*> VirtReg2Value;
   89   const Value * getValueFromVirtualReg(unsigned Vreg);
   92   DenseMap<const Value *, unsigned> CatchPadExceptionPointers;
  101     using SlotMapTy = DenseMap<const Value *, Optional<int>>;
  109     DenseMap<const Value *, const Value *> DuplicateMap;
  109     DenseMap<const Value *, const Value *> DuplicateMap;
  111     SlotMapTy::const_iterator find(const Value *V) const {
  168   DenseMap<const Value *, ISD::NodeType> PreferredExtendType;
  198   bool isExportedInst(const Value *V) {
  204   unsigned CreateRegs(const Value *V);
  208   unsigned InitializeRegForValue(const Value *V) {
  260     DenseMap<const Value*, unsigned>::const_iterator It = ValueMap.find(PN);
  279   unsigned getCatchPadExceptionPointerVReg(const Value *CPI,
include/llvm/CodeGen/GlobalISel/CallLowering.h
  264   virtual bool lowerReturn(MachineIRBuilder &MIRBuilder, const Value *Val,
  276   virtual bool lowerReturn(MachineIRBuilder &MIRBuilder, const Value *Val,
include/llvm/CodeGen/GlobalISel/IRTranslator.h
   78         DenseMap<const Value *, VRegListT *>::const_iterator;
   80         DenseMap<const Value *, OffsetListT *>::const_iterator;
   84     VRegListT *getVRegs(const Value &V) {
   92     OffsetListT *getOffsets(const Value &V) {
  104     bool contains(const Value &V) const {
  116     VRegListT *insertVRegs(const Value &V) {
  126     OffsetListT *insertOffsets(const Value &V) {
  139     DenseMap<const Value *, VRegListT*> ValToVRegs;
  243   bool valueIsSplit(const Value &V,
  315                                 Value *Cond,
  323   bool lowerSwitchWorkItem(SwitchCG::SwitchWorkListItem W, Value *Cond,
  560   ArrayRef<Register> getOrCreateVRegs(const Value &Val);
  562   Register getOrCreateVReg(const Value &Val) {
  573   ValueToVRegInfo::VRegListT &allocateVRegs(const Value &Val);
include/llvm/CodeGen/GlobalISel/Types.h
   29 using ValueToVReg = DenseMap<const Value *, unsigned>;
include/llvm/CodeGen/MachineMemOperand.h
   40   PointerUnion<const Value *, const PseudoSourceValue *> V;
   49   explicit MachinePointerInfo(const Value *v, int64_t offset = 0,
   66     PointerUnion<const Value *, const PseudoSourceValue *> v,
   71       if (const auto *ValPtr = V.dyn_cast<const Value*>())
   71       if (const auto *ValPtr = V.dyn_cast<const Value*>())
   81     if (V.is<const Value*>())
   82       return MachinePointerInfo(V.get<const Value*>(), Offset+O, StackID);
  200   const Value *getValue() const { return PtrInfo.V.dyn_cast<const Value*>(); }
  200   const Value *getValue() const { return PtrInfo.V.dyn_cast<const Value*>(); }
  286   void setValue(const Value *NewSV) { PtrInfo.V = NewSV; }
include/llvm/CodeGen/ScheduleDAGInstrs.h
  106   using ValueType = PointerUnion<const Value *, const PseudoSourceValue *>;
include/llvm/CodeGen/SelectionDAG.h
 1154   SDValue getSrcValue(const Value *v);
 1299                                   const Value *C, const DebugLoc &DL,
include/llvm/CodeGen/SelectionDAGNodes.h
 2017   const Value *V;
 2020   explicit SrcValueSDNode(const Value *v)
 2025   const Value *getValue() const { return V; }
include/llvm/CodeGen/SwiftErrorValueTracking.h
   45   DenseMap<std::pair<const MachineBasicBlock *, const Value *>, Register>
   51   DenseMap<std::pair<const MachineBasicBlock *, const Value *>, Register>
   60   const Value *SwiftErrorArg;
   62   using SwiftErrorValues = SmallVector<const Value*, 1>;
   74   const Value *getFunctionArg() const {
   80   Register getOrCreateVReg(const MachineBasicBlock *, const Value *);
   84   void setCurrentVReg(const MachineBasicBlock *MBB, const Value *, Register);
   89                                 const Value *);
   94                                 const Value *);
include/llvm/CodeGen/SwitchLoweringUtils.h
  121   const Value *CmpLHS, *CmpMHS, *CmpRHS;
  138   CaseBlock(ISD::CondCode cc, const Value *cmplhs, const Value *cmprhs,
  138   CaseBlock(ISD::CondCode cc, const Value *cmplhs, const Value *cmprhs,
  139             const Value *cmpmiddle, MachineBasicBlock *truebb,
  148   CaseBlock(CmpInst::Predicate pred, bool nocmp, const Value *cmplhs,
  149             const Value *cmprhs, const Value *cmpmiddle,
  149             const Value *cmprhs, const Value *cmpmiddle,
  177   const Value *SValue;
  182   JumpTableHeader(APInt F, APInt L, const Value *SV, MachineBasicBlock *H,
  205   const Value *SValue;
  217   BitTestBlock(APInt F, APInt R, const Value *SV, unsigned Rg, MVT RgVT, bool E,
include/llvm/CodeGen/TargetLowering.h
  178     Value *Val = nullptr;
  632   virtual bool canCombineStoreAndExtract(Type *VectorTy, Value *Idx,
  708                                        const Value *) const {
  838     PointerUnion<const Value *, const PseudoSourceValue *> ptrVal;
 1630   virtual Value *getIRStackGuard(IRBuilder<> &IRB) const;
 1639   virtual Value *getSDagStackGuard(const Module &M) const;
 1654   Value *getDefaultSafeStackPointerLocation(IRBuilder<> &IRB,
 1659   virtual Value *getSafeStackPointerLocation(IRBuilder<> &IRB) const;
 1736   virtual Value *emitLoadLinked(IRBuilder<> &Builder, Value *Addr,
 1736   virtual Value *emitLoadLinked(IRBuilder<> &Builder, Value *Addr,
 1743   virtual Value *emitStoreConditional(IRBuilder<> &Builder, Value *Val,
 1743   virtual Value *emitStoreConditional(IRBuilder<> &Builder, Value *Val,
 1744                                       Value *Addr, AtomicOrdering Ord) const {
 1751   virtual Value *emitMaskedAtomicRMWIntrinsic(IRBuilder<> &Builder,
 1753                                               Value *AlignedAddr, Value *Incr,
 1753                                               Value *AlignedAddr, Value *Incr,
 1754                                               Value *Mask, Value *ShiftAmt,
 1754                                               Value *Mask, Value *ShiftAmt,
 1762   virtual Value *emitMaskedAtomicCmpXchgIntrinsic(
 1763       IRBuilder<> &Builder, AtomicCmpXchgInst *CI, Value *AlignedAddr,
 1764       Value *CmpVal, Value *NewVal, Value *Mask, AtomicOrdering Ord) const {
 1764       Value *CmpVal, Value *NewVal, Value *Mask, AtomicOrdering Ord) const {
 1764       Value *CmpVal, Value *NewVal, Value *Mask, AtomicOrdering Ord) const {
 2178                                     SmallVectorImpl<Value*> &/*Ops*/,
 3881     Value *CallOperandVal = nullptr;
include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h
  154     Value *materialize(Value *V) final { return M(V); }
  154     Value *materialize(Value *V) final { return M(V); }
  508       Value *Init = MapValue(A.getAliasee(), VMap, RF_None, nullptr,
include/llvm/ExecutionEngine/Orc/ExecutionUtils.h
   55     Element(unsigned Priority, Function *Func, Value *Data)
   60     Value *Data;
include/llvm/ExecutionEngine/Orc/IndirectionUtils.h
  422 void makeStub(Function &F, Value &ImplPointer);
include/llvm/FuzzMutate/IRMutator.h
   77   Optional<fuzzerop::OpDescriptor> chooseOperation(Value *Src,
include/llvm/FuzzMutate/OpDescriptor.h
   47   using PredT = std::function<bool(ArrayRef<Value *> Cur, const Value *New)>;
   47   using PredT = std::function<bool(ArrayRef<Value *> Cur, const Value *New)>;
   52       ArrayRef<Value *> Cur, ArrayRef<Type *> BaseTypes)>;
   77   bool matches(ArrayRef<Value *> Cur, const Value *New) {
   77   bool matches(ArrayRef<Value *> Cur, const Value *New) {
   82   std::vector<Constant *> generate(ArrayRef<Value *> Cur,
   92   std::function<Value *(ArrayRef<Value *>, Instruction *)> BuilderFunc;
   92   std::function<Value *(ArrayRef<Value *>, Instruction *)> BuilderFunc;
include/llvm/FuzzMutate/RandomIRBuilder.h
   37   Value *findOrCreateSource(BasicBlock &BB, ArrayRef<Instruction *> Insts);
   43   Value *findOrCreateSource(BasicBlock &BB, ArrayRef<Instruction *> Insts,
   44                             ArrayRef<Value *> Srcs, fuzzerop::SourcePred Pred);
   46   Value *newSource(BasicBlock &BB, ArrayRef<Instruction *> Insts,
   47                    ArrayRef<Value *> Srcs, fuzzerop::SourcePred Pred);
   50   void connectToSink(BasicBlock &BB, ArrayRef<Instruction *> Insts, Value *V);
   52   void newSink(BasicBlock &BB, ArrayRef<Instruction *> Insts, Value *V);
   53   Value *findPointer(BasicBlock &BB, ArrayRef<Instruction *> Insts,
   54                      ArrayRef<Value *> Srcs, fuzzerop::SourcePred Pred);
   55   Type *chooseType(LLVMContext &Context, ArrayRef<Value *> Srcs,
include/llvm/IR/Argument.h
   29 class Argument final : public Value {
  130   static bool classof(const Value *V) {
include/llvm/IR/AssemblyAnnotationWriter.h
   56   virtual void printInfoComment(const Value &, formatted_raw_ostream &) {}
include/llvm/IR/AutoUpgrade.h
   70   Instruction *UpgradeBitCastInst(unsigned Opc, Value *V, Type *DestTy,
   76   Value *UpgradeBitCastExpr(unsigned Opc, Constant *C, Type *DestTy);
include/llvm/IR/BasicBlock.h
   57 class BasicBlock final : public Value, // Basic blocks are data objects also
  350   static bool classof(const Value *V) {
  351     return V->getValueID() == Value::BasicBlockVal;
include/llvm/IR/CFG.h
  102 using pred_iterator = PredIterator<BasicBlock, Value::user_iterator>;
  104     PredIterator<const BasicBlock, Value::const_user_iterator>;
include/llvm/IR/CallSite.h
   66   explicit CallSiteBase(ValTy *II) { *this = get(II); }
   73   static CallSiteBase get(ValTy *V) {
  104   ValTy *getCalledValue() const {
  117     const Value *V = getCalledValue();
  130   void setCalledFunction(Value *V) {
  150   bool isCallee(Value::const_user_iterator UI) const {
  158   bool isArgOperand(Value::const_user_iterator UI) const {
  169   bool isBundleOperand(Value::const_user_iterator UI) const {
  184   bool isDataOperand(Value::const_user_iterator UI) const {
  193   ValTy *getArgument(unsigned ArgNo) const {
  198   void setArgument(unsigned ArgNo, Value* newVal) {
  206   unsigned getArgumentNo(Value::const_user_iterator I) const {
  230   unsigned getDataOperandNo(Value::const_user_iterator UI) const {
  307   ValTy *getArgOperand(unsigned i) const {
  311   ValTy *getReturnedArgOperand() const {
  658   bool hasArgument(const Value *Arg) const {
  672 class CallSite : public CallSiteBase<Function, BasicBlock, Value, User, Use,
  682   explicit CallSite(Value *V) : CallSiteBase(V) {}
  795   bool isCallee(Value::const_user_iterator UI) const {
  834   Value *getCallArgOperand(Argument &Arg) const {
  840   Value *getCallArgOperand(unsigned ArgNo) const {
  867   Value *getCalledValue() const {
  876     Value *V = getCalledValue();
  913   explicit ImmutableCallSite(const Value *V) : CallSiteBase(V) {}
include/llvm/IR/Constant.h
   93   bool isElementWiseEqual(Value *Y) const;
  149   static bool classof(const Value *V) {
  164   void handleOperandChange(Value *, Value *);
  164   void handleOperandChange(Value *, Value *);
include/llvm/IR/ConstantFolder.h
  158                                 ArrayRef<Value *> IdxList) const {
  176                                         ArrayRef<Value *> IdxList) const {
include/llvm/IR/Constants.h
   60   Value *handleOperandChangeImpl(Value *From, Value *To) {
   60   Value *handleOperandChangeImpl(Value *From, Value *To) {
   60   Value *handleOperandChangeImpl(Value *From, Value *To) {
   73   static bool classof(const Value *V) {
  255   static bool classof(const Value *V) {
  332   static bool classof(const Value *V) {
  373   static bool classof(const Value *V) {
  398   static bool classof(const Value *V) {
  420   Value *handleOperandChangeImpl(Value *From, Value *To);
  420   Value *handleOperandChangeImpl(Value *From, Value *To);
  420   Value *handleOperandChangeImpl(Value *From, Value *To);
  437   static bool classof(const Value *V) {
  452   Value *handleOperandChangeImpl(Value *From, Value *To);
  452   Value *handleOperandChangeImpl(Value *From, Value *To);
  452   Value *handleOperandChangeImpl(Value *From, Value *To);
  491   static bool classof(const Value *V) {
  506   Value *handleOperandChangeImpl(Value *From, Value *To);
  506   Value *handleOperandChangeImpl(Value *From, Value *To);
  506   Value *handleOperandChangeImpl(Value *From, Value *To);
  530   static bool classof(const Value *V) {
  542       : ConstantData(T, Value::ConstantPointerNullVal) {}
  559   static bool classof(const Value *V) {
  674   static bool classof(const Value *V) {
  750   static bool classof(const Value *V) {
  809   static bool classof(const Value *V) {
  832   static bool classof(const Value *V) {
  847   Value *handleOperandChangeImpl(Value *From, Value *To);
  847   Value *handleOperandChangeImpl(Value *From, Value *To);
  847   Value *handleOperandChangeImpl(Value *From, Value *To);
  869   static bool classof(const Value *V) {
  893   Value *handleOperandChangeImpl(Value *From, Value *To);
  893   Value *handleOperandChangeImpl(Value *From, Value *To);
  893   Value *handleOperandChangeImpl(Value *From, Value *To);
 1169     return getGetElementPtr(Ty, C, cast<Value>(Idx), InBounds, InRangeIndex,
 1173                                     ArrayRef<Value *> IdxList,
 1192                                             ArrayRef<Value *> IdxList) {
 1256   static bool classof(const Value *V) {
 1317   static bool classof(const Value *V) {
include/llvm/IR/DIBuilder.h
   81     Instruction *insertDeclare(llvm::Value *Storage, DILocalVariable *VarInfo,
   91     insertDbgValueIntrinsic(llvm::Value *Val, DILocalVariable *VarInfo,
  800     Instruction *insertDeclare(llvm::Value *Storage, DILocalVariable *VarInfo,
  810     Instruction *insertDeclare(llvm::Value *Storage, DILocalVariable *VarInfo,
  834     Instruction *insertDbgValueIntrinsic(llvm::Value *Val,
  846     Instruction *insertDbgValueIntrinsic(llvm::Value *Val,
include/llvm/IR/DataLayout.h
  555   int64_t getIndexedOffsetInType(Type *ElemTy, ArrayRef<Value *> Indices) const;
include/llvm/IR/DerivedTypes.h
  178   FunctionCallee(FunctionType *FnTy, Value *Callee)
  189   Value *getCallee() { return Callee; }
  195   Value *Callee = nullptr;
  205   Type *getTypeAtIndex(const Value *V) const;
  207   bool indexValid(const Value *V) const;
include/llvm/IR/DiagnosticInfo.h
  425     Argument(StringRef Key, const Value *V);
  621                                const Value *CodeRegion = nullptr)
  659   const Value *getCodeRegion() const { return CodeRegion; }
  668   const Value *CodeRegion = nullptr;
  681                      const DiagnosticLocation &Loc, const Value *CodeRegion);
  727                            const Value *CodeRegion);
  768                              const Value *CodeRegion);
  806                              const Value *CodeRegion);
  839                                       const Value *CodeRegion)
  880                                      const Value *CodeRegion)
  969                                     const Value *CodeRegion);
include/llvm/IR/DiagnosticPrinter.h
   53   virtual DiagnosticPrinter &operator<<(const Value &V) = 0;
   86   DiagnosticPrinter &operator<<(const Value &V) override;
include/llvm/IR/Function.h
  785   static bool classof(const Value *V) {
  786     return V->getValueID() == Value::FunctionVal;
include/llvm/IR/GetElementPtrTypeIterator.h
   74     Value *getOperand() const { return const_cast<Value *>(&**OpIt); }
include/llvm/IR/GlobalAlias.h
   86   static bool classof(const Value *V) {
   87     return V->getValueID() == Value::GlobalAliasVal;
include/llvm/IR/GlobalIFunc.h
   68   static bool classof(const Value *V) {
   69     return V->getValueID() == Value::GlobalIFuncVal;
include/llvm/IR/GlobalIndirectSymbol.h
   79   static bool classof(const Value *V) {
   80     return V->getValueID() == Value::GlobalAliasVal ||
   81            V->getValueID() == Value::GlobalIFuncVal;
include/llvm/IR/GlobalObject.h
  189   static bool classof(const Value *V) {
  190     return V->getValueID() == Value::FunctionVal ||
  191            V->getValueID() == Value::GlobalVariableVal;
include/llvm/IR/GlobalValue.h
  123   Value *handleOperandChangeImpl(Value *From, Value *To);
  123   Value *handleOperandChangeImpl(Value *From, Value *To);
  123   Value *handleOperandChangeImpl(Value *From, Value *To);
  579   static bool classof(const Value *V) {
  580     return V->getValueID() == Value::FunctionVal ||
  581            V->getValueID() == Value::GlobalVariableVal ||
  582            V->getValueID() == Value::GlobalAliasVal ||
  583            V->getValueID() == Value::GlobalIFuncVal;
include/llvm/IR/GlobalVariable.h
  251   static bool classof(const Value *V) {
  252     return V->getValueID() == Value::GlobalVariableVal;
include/llvm/IR/IRBuilder.h
  455   CallInst *CreateMemSet(Value *Ptr, Value *Val, uint64_t Size, unsigned Align,
  455   CallInst *CreateMemSet(Value *Ptr, Value *Val, uint64_t Size, unsigned Align,
  463   CallInst *CreateMemSet(Value *Ptr, Value *Val, Value *Size, unsigned Align,
  463   CallInst *CreateMemSet(Value *Ptr, Value *Val, Value *Size, unsigned Align,
  463   CallInst *CreateMemSet(Value *Ptr, Value *Val, Value *Size, unsigned Align,
  474   CallInst *CreateElementUnorderedAtomicMemSet(Value *Ptr, Value *Val,
  474   CallInst *CreateElementUnorderedAtomicMemSet(Value *Ptr, Value *Val,
  485   CallInst *CreateElementUnorderedAtomicMemSet(Value *Ptr, Value *Val,
  485   CallInst *CreateElementUnorderedAtomicMemSet(Value *Ptr, Value *Val,
  486                                                Value *Size, unsigned Align,
  497   CallInst *CreateMemCpy(Value *Dst, unsigned DstAlign, Value *Src,
  497   CallInst *CreateMemCpy(Value *Dst, unsigned DstAlign, Value *Src,
  508   CallInst *CreateMemCpy(Value *Dst, unsigned DstAlign, Value *Src,
  508   CallInst *CreateMemCpy(Value *Dst, unsigned DstAlign, Value *Src,
  509                          unsigned SrcAlign, Value *Size,
  524       Value *Dst, unsigned DstAlign, Value *Src, unsigned SrcAlign,
  524       Value *Dst, unsigned DstAlign, Value *Src, unsigned SrcAlign,
  534       Value *Dst, unsigned DstAlign, Value *Src, unsigned SrcAlign, Value *Size,
  534       Value *Dst, unsigned DstAlign, Value *Src, unsigned SrcAlign, Value *Size,
  534       Value *Dst, unsigned DstAlign, Value *Src, unsigned SrcAlign, Value *Size,
  545   CallInst *CreateMemMove(Value *Dst, unsigned DstAlign, Value *Src, unsigned SrcAlign,
  545   CallInst *CreateMemMove(Value *Dst, unsigned DstAlign, Value *Src, unsigned SrcAlign,
  553   CallInst *CreateMemMove(Value *Dst, unsigned DstAlign, Value *Src, unsigned SrcAlign,
  553   CallInst *CreateMemMove(Value *Dst, unsigned DstAlign, Value *Src, unsigned SrcAlign,
  554                           Value *Size, bool isVolatile = false, MDNode *TBAATag = nullptr,
  568       Value *Dst, unsigned DstAlign, Value *Src, unsigned SrcAlign,
  568       Value *Dst, unsigned DstAlign, Value *Src, unsigned SrcAlign,
  578       Value *Dst, unsigned DstAlign, Value *Src, unsigned SrcAlign, Value *Size,
  578       Value *Dst, unsigned DstAlign, Value *Src, unsigned SrcAlign, Value *Size,
  578       Value *Dst, unsigned DstAlign, Value *Src, unsigned SrcAlign, Value *Size,
  585   CallInst *CreateFAddReduce(Value *Acc, Value *Src);
  585   CallInst *CreateFAddReduce(Value *Acc, Value *Src);
  589   CallInst *CreateFMulReduce(Value *Acc, Value *Src);
  589   CallInst *CreateFMulReduce(Value *Acc, Value *Src);
  592   CallInst *CreateAddReduce(Value *Src);
  595   CallInst *CreateMulReduce(Value *Src);
  598   CallInst *CreateAndReduce(Value *Src);
  601   CallInst *CreateOrReduce(Value *Src);
  604   CallInst *CreateXorReduce(Value *Src);
  608   CallInst *CreateIntMaxReduce(Value *Src, bool IsSigned = false);
  612   CallInst *CreateIntMinReduce(Value *Src, bool IsSigned = false);
  616   CallInst *CreateFPMaxReduce(Value *Src, bool NoNaN = false);
  620   CallInst *CreateFPMinReduce(Value *Src, bool NoNaN = false);
  625   CallInst *CreateLifetimeStart(Value *Ptr, ConstantInt *Size = nullptr);
  630   CallInst *CreateLifetimeEnd(Value *Ptr, ConstantInt *Size = nullptr);
  635   CallInst *CreateInvariantStart(Value *Ptr, ConstantInt *Size = nullptr);
  638   CallInst *CreateMaskedLoad(Value *Ptr, unsigned Align, Value *Mask,
  638   CallInst *CreateMaskedLoad(Value *Ptr, unsigned Align, Value *Mask,
  639                              Value *PassThru = nullptr, const Twine &Name = "");
  642   CallInst *CreateMaskedStore(Value *Val, Value *Ptr, unsigned Align,
  642   CallInst *CreateMaskedStore(Value *Val, Value *Ptr, unsigned Align,
  643                               Value *Mask);
  646   CallInst *CreateMaskedGather(Value *Ptrs, unsigned Align,
  647                                Value *Mask = nullptr,
  648                                Value *PassThru = nullptr,
  652   CallInst *CreateMaskedScatter(Value *Val, Value *Ptrs, unsigned Align,
  652   CallInst *CreateMaskedScatter(Value *Val, Value *Ptrs, unsigned Align,
  653                                 Value *Mask = nullptr);
  657   CallInst *CreateAssumption(Value *Cond);
  662                                    Value *ActualCallee,
  663                                    ArrayRef<Value *> CallArgs,
  664                                    ArrayRef<Value *> DeoptArgs,
  665                                    ArrayRef<Value *> GCArgs,
  671                                    Value *ActualCallee, uint32_t Flags,
  675                                    ArrayRef<Value *> GCArgs,
  682                                    Value *ActualCallee, ArrayRef<Use> CallArgs,
  683                                    ArrayRef<Value *> DeoptArgs,
  684                                    ArrayRef<Value *> GCArgs,
  691                            Value *ActualInvokee, BasicBlock *NormalDest,
  692                            BasicBlock *UnwindDest, ArrayRef<Value *> InvokeArgs,
  693                            ArrayRef<Value *> DeoptArgs,
  694                            ArrayRef<Value *> GCArgs, const Twine &Name = "");
  699       uint64_t ID, uint32_t NumPatchBytes, Value *ActualInvokee,
  702       ArrayRef<Use> DeoptArgs, ArrayRef<Value *> GCArgs,
  710                            Value *ActualInvokee, BasicBlock *NormalDest,
  712                            ArrayRef<Value *> DeoptArgs,
  713                            ArrayRef<Value *> GCArgs, const Twine &Name = "");
  731   CallInst *CreateUnaryIntrinsic(Intrinsic::ID ID, Value *V,
  737   CallInst *CreateBinaryIntrinsic(Intrinsic::ID ID, Value *LHS, Value *RHS,
  737   CallInst *CreateBinaryIntrinsic(Intrinsic::ID ID, Value *LHS, Value *RHS,
  745                             ArrayRef<Value *> Args,
  750   CallInst *CreateMinNum(Value *LHS, Value *RHS, const Twine &Name = "") {
  750   CallInst *CreateMinNum(Value *LHS, Value *RHS, const Twine &Name = "") {
  755   CallInst *CreateMaxNum(Value *LHS, Value *RHS, const Twine &Name = "") {
  755   CallInst *CreateMaxNum(Value *LHS, Value *RHS, const Twine &Name = "") {
  760   CallInst *CreateMinimum(Value *LHS, Value *RHS, const Twine &Name = "") {
  760   CallInst *CreateMinimum(Value *LHS, Value *RHS, const Twine &Name = "") {
  765   CallInst *CreateMaximum(Value *LHS, Value *RHS, const Twine &Name = "") {
  765   CallInst *CreateMaximum(Value *LHS, Value *RHS, const Twine &Name = "") {
  771   CallInst *CreateMaskedIntrinsic(Intrinsic::ID Id, ArrayRef<Value *> Ops,
  775   Value *getCastedInt8PtrValue(Value *Ptr);
  775   Value *getCastedInt8PtrValue(Value *Ptr);
  880   ReturnInst *CreateRet(Value *V) {
  891   ReturnInst *CreateAggregateRet(Value *const *retVals, unsigned N) {
  892     Value *V = UndefValue::get(getCurrentFunctionReturnType());
  905   BranchInst *CreateCondBr(Value *Cond, BasicBlock *True, BasicBlock *False,
  914   BranchInst *CreateCondBr(Value *Cond, BasicBlock *True, BasicBlock *False,
  928   SwitchInst *CreateSwitch(Value *V, BasicBlock *Dest, unsigned NumCases = 10,
  938   IndirectBrInst *CreateIndirectBr(Value *Addr, unsigned NumDests = 10) {
  943   InvokeInst *CreateInvoke(FunctionType *Ty, Value *Callee,
  945                            ArrayRef<Value *> Args,
  952   InvokeInst *CreateInvoke(FunctionType *Ty, Value *Callee,
  954                            ArrayRef<Value *> Args = None,
  961                            BasicBlock *UnwindDest, ArrayRef<Value *> Args,
  970                            ArrayRef<Value *> Args = None,
  977   InvokeInst *CreateInvoke(Value *Callee, BasicBlock *NormalDest,
  978                            BasicBlock *UnwindDest, ArrayRef<Value *> Args,
  988   InvokeInst *CreateInvoke(Value *Callee, BasicBlock *NormalDest,
  990                            ArrayRef<Value *> Args = None,
  999   CallBrInst *CreateCallBr(FunctionType *Ty, Value *Callee,
 1002                            ArrayRef<Value *> Args = None,
 1007   CallBrInst *CreateCallBr(FunctionType *Ty, Value *Callee,
 1010                            ArrayRef<Value *> Args,
 1020                            ArrayRef<Value *> Args = None,
 1027                            ArrayRef<Value *> Args,
 1034   ResumeInst *CreateResume(Value *Exn) {
 1043   CatchSwitchInst *CreateCatchSwitch(Value *ParentPad, BasicBlock *UnwindBB,
 1050   CatchPadInst *CreateCatchPad(Value *ParentPad, ArrayRef<Value *> Args,
 1050   CatchPadInst *CreateCatchPad(Value *ParentPad, ArrayRef<Value *> Args,
 1055   CleanupPadInst *CreateCleanupPad(Value *ParentPad,
 1056                                    ArrayRef<Value *> Args = None,
 1074                                           Value *LHS, Value *RHS,
 1074                                           Value *LHS, Value *RHS,
 1093   Value *foldConstant(Instruction::BinaryOps Opc, Value *L,
 1093   Value *foldConstant(Instruction::BinaryOps Opc, Value *L,
 1094                       Value *R, const Twine &Name) const {
 1100   Value *getConstrainedFPRounding(
 1116   Value *getConstrainedFPExcept(
 1133   Value *CreateAdd(Value *LHS, Value *RHS, const Twine &Name = "",
 1133   Value *CreateAdd(Value *LHS, Value *RHS, const Twine &Name = "",
 1133   Value *CreateAdd(Value *LHS, Value *RHS, const Twine &Name = "",
 1142   Value *CreateNSWAdd(Value *LHS, Value *RHS, const Twine &Name = "") {
 1142   Value *CreateNSWAdd(Value *LHS, Value *RHS, const Twine &Name = "") {
 1142   Value *CreateNSWAdd(Value *LHS, Value *RHS, const Twine &Name = "") {
 1146   Value *CreateNUWAdd(Value *LHS, Value *RHS, const Twine &Name = "") {
 1146   Value *CreateNUWAdd(Value *LHS, Value *RHS, const Twine &Name = "") {
 1146   Value *CreateNUWAdd(Value *LHS, Value *RHS, const Twine &Name = "") {
 1150   Value *CreateSub(Value *LHS, Value *RHS, const Twine &Name = "",
 1150   Value *CreateSub(Value *LHS, Value *RHS, const Twine &Name = "",
 1150   Value *CreateSub(Value *LHS, Value *RHS, const Twine &Name = "",
 1159   Value *CreateNSWSub(Value *LHS, Value *RHS, const Twine &Name = "") {
 1159   Value *CreateNSWSub(Value *LHS, Value *RHS, const Twine &Name = "") {
 1159   Value *CreateNSWSub(Value *LHS, Value *RHS, const Twine &Name = "") {
 1163   Value *CreateNUWSub(Value *LHS, Value *RHS, const Twine &Name = "") {
 1163   Value *CreateNUWSub(Value *LHS, Value *RHS, const Twine &Name = "") {
 1163   Value *CreateNUWSub(Value *LHS, Value *RHS, const Twine &Name = "") {
 1167   Value *CreateMul(Value *LHS, Value *RHS, const Twine &Name = "",
 1167   Value *CreateMul(Value *LHS, Value *RHS, const Twine &Name = "",
 1167   Value *CreateMul(Value *LHS, Value *RHS, const Twine &Name = "",
 1176   Value *CreateNSWMul(Value *LHS, Value *RHS, const Twine &Name = "") {
 1176   Value *CreateNSWMul(Value *LHS, Value *RHS, const Twine &Name = "") {
 1176   Value *CreateNSWMul(Value *LHS, Value *RHS, const Twine &Name = "") {
 1180   Value *CreateNUWMul(Value *LHS, Value *RHS, const Twine &Name = "") {
 1180   Value *CreateNUWMul(Value *LHS, Value *RHS, const Twine &Name = "") {
 1180   Value *CreateNUWMul(Value *LHS, Value *RHS, const Twine &Name = "") {
 1184   Value *CreateUDiv(Value *LHS, Value *RHS, const Twine &Name = "",
 1184   Value *CreateUDiv(Value *LHS, Value *RHS, const Twine &Name = "",
 1184   Value *CreateUDiv(Value *LHS, Value *RHS, const Twine &Name = "",
 1194   Value *CreateExactUDiv(Value *LHS, Value *RHS, const Twine &Name = "") {
 1194   Value *CreateExactUDiv(Value *LHS, Value *RHS, const Twine &Name = "") {
 1194   Value *CreateExactUDiv(Value *LHS, Value *RHS, const Twine &Name = "") {
 1198   Value *CreateSDiv(Value *LHS, Value *RHS, const Twine &Name = "",
 1198   Value *CreateSDiv(Value *LHS, Value *RHS, const Twine &Name = "",
 1198   Value *CreateSDiv(Value *LHS, Value *RHS, const Twine &Name = "",
 1208   Value *CreateExactSDiv(Value *LHS, Value *RHS, const Twine &Name = "") {
 1208   Value *CreateExactSDiv(Value *LHS, Value *RHS, const Twine &Name = "") {
 1208   Value *CreateExactSDiv(Value *LHS, Value *RHS, const Twine &Name = "") {
 1212   Value *CreateURem(Value *LHS, Value *RHS, const Twine &Name = "") {
 1212   Value *CreateURem(Value *LHS, Value *RHS, const Twine &Name = "") {
 1212   Value *CreateURem(Value *LHS, Value *RHS, const Twine &Name = "") {
 1213     if (Value *V = foldConstant(Instruction::URem, LHS, RHS, Name)) return V;
 1217   Value *CreateSRem(Value *LHS, Value *RHS, const Twine &Name = "") {
 1217   Value *CreateSRem(Value *LHS, Value *RHS, const Twine &Name = "") {
 1217   Value *CreateSRem(Value *LHS, Value *RHS, const Twine &Name = "") {
 1218     if (Value *V = foldConstant(Instruction::SRem, LHS, RHS, Name)) return V;
 1222   Value *CreateShl(Value *LHS, Value *RHS, const Twine &Name = "",
 1222   Value *CreateShl(Value *LHS, Value *RHS, const Twine &Name = "",
 1222   Value *CreateShl(Value *LHS, Value *RHS, const Twine &Name = "",
 1231   Value *CreateShl(Value *LHS, const APInt &RHS, const Twine &Name = "",
 1231   Value *CreateShl(Value *LHS, const APInt &RHS, const Twine &Name = "",
 1237   Value *CreateShl(Value *LHS, uint64_t RHS, const Twine &Name = "",
 1237   Value *CreateShl(Value *LHS, uint64_t RHS, const Twine &Name = "",
 1243   Value *CreateLShr(Value *LHS, Value *RHS, const Twine &Name = "",
 1243   Value *CreateLShr(Value *LHS, Value *RHS, const Twine &Name = "",
 1243   Value *CreateLShr(Value *LHS, Value *RHS, const Twine &Name = "",
 1253   Value *CreateLShr(Value *LHS, const APInt &RHS, const Twine &Name = "",
 1253   Value *CreateLShr(Value *LHS, const APInt &RHS, const Twine &Name = "",
 1258   Value *CreateLShr(Value *LHS, uint64_t RHS, const Twine &Name = "",
 1258   Value *CreateLShr(Value *LHS, uint64_t RHS, const Twine &Name = "",
 1263   Value *CreateAShr(Value *LHS, Value *RHS, const Twine &Name = "",
 1263   Value *CreateAShr(Value *LHS, Value *RHS, const Twine &Name = "",
 1263   Value *CreateAShr(Value *LHS, Value *RHS, const Twine &Name = "",
 1273   Value *CreateAShr(Value *LHS, const APInt &RHS, const Twine &Name = "",
 1273   Value *CreateAShr(Value *LHS, const APInt &RHS, const Twine &Name = "",
 1278   Value *CreateAShr(Value *LHS, uint64_t RHS, const Twine &Name = "",
 1278   Value *CreateAShr(Value *LHS, uint64_t RHS, const Twine &Name = "",
 1283   Value *CreateAnd(Value *LHS, Value *RHS, const Twine &Name = "") {
 1283   Value *CreateAnd(Value *LHS, Value *RHS, const Twine &Name = "") {
 1283   Value *CreateAnd(Value *LHS, Value *RHS, const Twine &Name = "") {
 1293   Value *CreateAnd(Value *LHS, const APInt &RHS, const Twine &Name = "") {
 1293   Value *CreateAnd(Value *LHS, const APInt &RHS, const Twine &Name = "") {
 1297   Value *CreateAnd(Value *LHS, uint64_t RHS, const Twine &Name = "") {
 1297   Value *CreateAnd(Value *LHS, uint64_t RHS, const Twine &Name = "") {
 1301   Value *CreateAnd(ArrayRef<Value*> Ops) {
 1301   Value *CreateAnd(ArrayRef<Value*> Ops) {
 1303     Value *Accum = Ops[0];
 1309   Value *CreateOr(Value *LHS, Value *RHS, const Twine &Name = "") {
 1309   Value *CreateOr(Value *LHS, Value *RHS, const Twine &Name = "") {
 1309   Value *CreateOr(Value *LHS, Value *RHS, const Twine &Name = "") {
 1319   Value *CreateOr(Value *LHS, const APInt &RHS, const Twine &Name = "") {
 1319   Value *CreateOr(Value *LHS, const APInt &RHS, const Twine &Name = "") {
 1323   Value *CreateOr(Value *LHS, uint64_t RHS, const Twine &Name = "") {
 1323   Value *CreateOr(Value *LHS, uint64_t RHS, const Twine &Name = "") {
 1327   Value *CreateOr(ArrayRef<Value*> Ops) {
 1327   Value *CreateOr(ArrayRef<Value*> Ops) {
 1329     Value *Accum = Ops[0];
 1335   Value *CreateXor(Value *LHS, Value *RHS, const Twine &Name = "") {
 1335   Value *CreateXor(Value *LHS, Value *RHS, const Twine &Name = "") {
 1335   Value *CreateXor(Value *LHS, Value *RHS, const Twine &Name = "") {
 1336     if (Value *V = foldConstant(Instruction::Xor, LHS, RHS, Name)) return V;
 1340   Value *CreateXor(Value *LHS, const APInt &RHS, const Twine &Name = "") {
 1340   Value *CreateXor(Value *LHS, const APInt &RHS, const Twine &Name = "") {
 1344   Value *CreateXor(Value *LHS, uint64_t RHS, const Twine &Name = "") {
 1344   Value *CreateXor(Value *LHS, uint64_t RHS, const Twine &Name = "") {
 1348   Value *CreateFAdd(Value *L, Value *R, const Twine &Name = "",
 1348   Value *CreateFAdd(Value *L, Value *R, const Twine &Name = "",
 1348   Value *CreateFAdd(Value *L, Value *R, const Twine &Name = "",
 1354     if (Value *V = foldConstant(Instruction::FAdd, L, R, Name)) return V;
 1361   Value *CreateFAddFMF(Value *L, Value *R, Instruction *FMFSource,
 1361   Value *CreateFAddFMF(Value *L, Value *R, Instruction *FMFSource,
 1361   Value *CreateFAddFMF(Value *L, Value *R, Instruction *FMFSource,
 1367     if (Value *V = foldConstant(Instruction::FAdd, L, R, Name)) return V;
 1373   Value *CreateFSub(Value *L, Value *R, const Twine &Name = "",
 1373   Value *CreateFSub(Value *L, Value *R, const Twine &Name = "",
 1373   Value *CreateFSub(Value *L, Value *R, const Twine &Name = "",
 1379     if (Value *V = foldConstant(Instruction::FSub, L, R, Name)) return V;
 1386   Value *CreateFSubFMF(Value *L, Value *R, Instruction *FMFSource,
 1386   Value *CreateFSubFMF(Value *L, Value *R, Instruction *FMFSource,
 1386   Value *CreateFSubFMF(Value *L, Value *R, Instruction *FMFSource,
 1392     if (Value *V = foldConstant(Instruction::FSub, L, R, Name)) return V;
 1398   Value *CreateFMul(Value *L, Value *R, const Twine &Name = "",
 1398   Value *CreateFMul(Value *L, Value *R, const Twine &Name = "",
 1398   Value *CreateFMul(Value *L, Value *R, const Twine &Name = "",
 1404     if (Value *V = foldConstant(Instruction::FMul, L, R, Name)) return V;
 1411   Value *CreateFMulFMF(Value *L, Value *R, Instruction *FMFSource,
 1411   Value *CreateFMulFMF(Value *L, Value *R, Instruction *FMFSource,
 1411   Value *CreateFMulFMF(Value *L, Value *R, Instruction *FMFSource,
 1417     if (Value *V = foldConstant(Instruction::FMul, L, R, Name)) return V;
 1423   Value *CreateFDiv(Value *L, Value *R, const Twine &Name = "",
 1423   Value *CreateFDiv(Value *L, Value *R, const Twine &Name = "",
 1423   Value *CreateFDiv(Value *L, Value *R, const Twine &Name = "",
 1429     if (Value *V = foldConstant(Instruction::FDiv, L, R, Name)) return V;
 1436   Value *CreateFDivFMF(Value *L, Value *R, Instruction *FMFSource,
 1436   Value *CreateFDivFMF(Value *L, Value *R, Instruction *FMFSource,
 1436   Value *CreateFDivFMF(Value *L, Value *R, Instruction *FMFSource,
 1442     if (Value *V = foldConstant(Instruction::FDiv, L, R, Name)) return V;
 1448   Value *CreateFRem(Value *L, Value *R, const Twine &Name = "",
 1448   Value *CreateFRem(Value *L, Value *R, const Twine &Name = "",
 1448   Value *CreateFRem(Value *L, Value *R, const Twine &Name = "",
 1454     if (Value *V = foldConstant(Instruction::FRem, L, R, Name)) return V;
 1461   Value *CreateFRemFMF(Value *L, Value *R, Instruction *FMFSource,
 1461   Value *CreateFRemFMF(Value *L, Value *R, Instruction *FMFSource,
 1461   Value *CreateFRemFMF(Value *L, Value *R, Instruction *FMFSource,
 1467     if (Value *V = foldConstant(Instruction::FRem, L, R, Name)) return V;
 1473   Value *CreateBinOp(Instruction::BinaryOps Opc,
 1474                      Value *LHS, Value *RHS, const Twine &Name = "",
 1474                      Value *LHS, Value *RHS, const Twine &Name = "",
 1476     if (Value *V = foldConstant(Opc, LHS, RHS, Name)) return V;
 1484       Intrinsic::ID ID, Value *L, Value *R, Instruction *FMFSource = nullptr,
 1484       Intrinsic::ID ID, Value *L, Value *R, Instruction *FMFSource = nullptr,
 1488     Value *RoundingV = getConstrainedFPRounding(Rounding);
 1489     Value *ExceptV = getConstrainedFPExcept(Except);
 1502   Value *CreateNeg(Value *V, const Twine &Name = "",
 1502   Value *CreateNeg(Value *V, const Twine &Name = "",
 1512   Value *CreateNSWNeg(Value *V, const Twine &Name = "") {
 1512   Value *CreateNSWNeg(Value *V, const Twine &Name = "") {
 1516   Value *CreateNUWNeg(Value *V, const Twine &Name = "") {
 1516   Value *CreateNUWNeg(Value *V, const Twine &Name = "") {
 1520   Value *CreateFNeg(Value *V, const Twine &Name = "",
 1520   Value *CreateFNeg(Value *V, const Twine &Name = "",
 1530   Value *CreateFNegFMF(Value *V, Instruction *FMFSource,
 1530   Value *CreateFNegFMF(Value *V, Instruction *FMFSource,
 1539   Value *CreateNot(Value *V, const Twine &Name = "") {
 1539   Value *CreateNot(Value *V, const Twine &Name = "") {
 1545   Value *CreateUnOp(Instruction::UnaryOps Opc,
 1546                     Value *V, const Twine &Name = "",
 1558   Value *CreateNAryOp(unsigned Opc, ArrayRef<Value *> Ops,
 1558   Value *CreateNAryOp(unsigned Opc, ArrayRef<Value *> Ops,
 1579                            Value *ArraySize = nullptr, const Twine &Name = "") {
 1583   AllocaInst *CreateAlloca(Type *Ty, Value *ArraySize = nullptr,
 1591   LoadInst *CreateLoad(Type *Ty, Value *Ptr, const char *Name) {
 1595   LoadInst *CreateLoad(Type *Ty, Value *Ptr, const Twine &Name = "") {
 1599   LoadInst *CreateLoad(Type *Ty, Value *Ptr, bool isVolatile,
 1605   LoadInst *CreateLoad(Value *Ptr, const char *Name) {
 1610   LoadInst *CreateLoad(Value *Ptr, const Twine &Name = "") {
 1615   LoadInst *CreateLoad(Value *Ptr, bool isVolatile, const Twine &Name = "") {
 1620   StoreInst *CreateStore(Value *Val, Value *Ptr, bool isVolatile = false) {
 1620   StoreInst *CreateStore(Value *Val, Value *Ptr, bool isVolatile = false) {
 1627   LoadInst *CreateAlignedLoad(Type *Ty, Value *Ptr, unsigned Align,
 1633   LoadInst *CreateAlignedLoad(Type *Ty, Value *Ptr, unsigned Align,
 1639   LoadInst *CreateAlignedLoad(Type *Ty, Value *Ptr, unsigned Align,
 1647   LoadInst *CreateAlignedLoad(Value *Ptr, unsigned Align, const char *Name) {
 1652   LoadInst *CreateAlignedLoad(Value *Ptr, unsigned Align,
 1658   LoadInst *CreateAlignedLoad(Value *Ptr, unsigned Align, bool isVolatile,
 1664   StoreInst *CreateAlignedStore(Value *Val, Value *Ptr, unsigned Align,
 1664   StoreInst *CreateAlignedStore(Value *Val, Value *Ptr, unsigned Align,
 1678   CreateAtomicCmpXchg(Value *Ptr, Value *Cmp, Value *New,
 1678   CreateAtomicCmpXchg(Value *Ptr, Value *Cmp, Value *New,
 1678   CreateAtomicCmpXchg(Value *Ptr, Value *Cmp, Value *New,
 1686   AtomicRMWInst *CreateAtomicRMW(AtomicRMWInst::BinOp Op, Value *Ptr, Value *Val,
 1686   AtomicRMWInst *CreateAtomicRMW(AtomicRMWInst::BinOp Op, Value *Ptr, Value *Val,
 1692   Value *CreateGEP(Value *Ptr, ArrayRef<Value *> IdxList,
 1692   Value *CreateGEP(Value *Ptr, ArrayRef<Value *> IdxList,
 1692   Value *CreateGEP(Value *Ptr, ArrayRef<Value *> IdxList,
 1697   Value *CreateGEP(Type *Ty, Value *Ptr, ArrayRef<Value *> IdxList,
 1697   Value *CreateGEP(Type *Ty, Value *Ptr, ArrayRef<Value *> IdxList,
 1697   Value *CreateGEP(Type *Ty, Value *Ptr, ArrayRef<Value *> IdxList,
 1711   Value *CreateInBoundsGEP(Value *Ptr, ArrayRef<Value *> IdxList,
 1711   Value *CreateInBoundsGEP(Value *Ptr, ArrayRef<Value *> IdxList,
 1711   Value *CreateInBoundsGEP(Value *Ptr, ArrayRef<Value *> IdxList,
 1716   Value *CreateInBoundsGEP(Type *Ty, Value *Ptr, ArrayRef<Value *> IdxList,
 1716   Value *CreateInBoundsGEP(Type *Ty, Value *Ptr, ArrayRef<Value *> IdxList,
 1716   Value *CreateInBoundsGEP(Type *Ty, Value *Ptr, ArrayRef<Value *> IdxList,
 1731   Value *CreateGEP(Value *Ptr, Value *Idx, const Twine &Name = "") {
 1731   Value *CreateGEP(Value *Ptr, Value *Idx, const Twine &Name = "") {
 1731   Value *CreateGEP(Value *Ptr, Value *Idx, const Twine &Name = "") {
 1735   Value *CreateGEP(Type *Ty, Value *Ptr, Value *Idx, const Twine &Name = "") {
 1735   Value *CreateGEP(Type *Ty, Value *Ptr, Value *Idx, const Twine &Name = "") {
 1735   Value *CreateGEP(Type *Ty, Value *Ptr, Value *Idx, const Twine &Name = "") {
 1742   Value *CreateInBoundsGEP(Type *Ty, Value *Ptr, Value *Idx,
 1742   Value *CreateInBoundsGEP(Type *Ty, Value *Ptr, Value *Idx,
 1742   Value *CreateInBoundsGEP(Type *Ty, Value *Ptr, Value *Idx,
 1750   Value *CreateConstGEP1_32(Value *Ptr, unsigned Idx0, const Twine &Name = "") {
 1750   Value *CreateConstGEP1_32(Value *Ptr, unsigned Idx0, const Twine &Name = "") {
 1754   Value *CreateConstGEP1_32(Type *Ty, Value *Ptr, unsigned Idx0,
 1754   Value *CreateConstGEP1_32(Type *Ty, Value *Ptr, unsigned Idx0,
 1756     Value *Idx = ConstantInt::get(Type::getInt32Ty(Context), Idx0);
 1764   Value *CreateConstInBoundsGEP1_32(Type *Ty, Value *Ptr, unsigned Idx0,
 1764   Value *CreateConstInBoundsGEP1_32(Type *Ty, Value *Ptr, unsigned Idx0,
 1766     Value *Idx = ConstantInt::get(Type::getInt32Ty(Context), Idx0);
 1774   Value *CreateConstGEP2_32(Type *Ty, Value *Ptr, unsigned Idx0, unsigned Idx1,
 1774   Value *CreateConstGEP2_32(Type *Ty, Value *Ptr, unsigned Idx0, unsigned Idx1,
 1776     Value *Idxs[] = {
 1787   Value *CreateConstInBoundsGEP2_32(Type *Ty, Value *Ptr, unsigned Idx0,
 1787   Value *CreateConstInBoundsGEP2_32(Type *Ty, Value *Ptr, unsigned Idx0,
 1789     Value *Idxs[] = {
 1800   Value *CreateConstGEP1_64(Type *Ty, Value *Ptr, uint64_t Idx0,
 1800   Value *CreateConstGEP1_64(Type *Ty, Value *Ptr, uint64_t Idx0,
 1802     Value *Idx = ConstantInt::get(Type::getInt64Ty(Context), Idx0);
 1810   Value *CreateConstGEP1_64(Value *Ptr, uint64_t Idx0, const Twine &Name = "") {
 1810   Value *CreateConstGEP1_64(Value *Ptr, uint64_t Idx0, const Twine &Name = "") {
 1814   Value *CreateConstInBoundsGEP1_64(Type *Ty, Value *Ptr, uint64_t Idx0,
 1814   Value *CreateConstInBoundsGEP1_64(Type *Ty, Value *Ptr, uint64_t Idx0,
 1816     Value *Idx = ConstantInt::get(Type::getInt64Ty(Context), Idx0);
 1824   Value *CreateConstInBoundsGEP1_64(Value *Ptr, uint64_t Idx0,
 1824   Value *CreateConstInBoundsGEP1_64(Value *Ptr, uint64_t Idx0,
 1829   Value *CreateConstGEP2_64(Type *Ty, Value *Ptr, uint64_t Idx0, uint64_t Idx1,
 1829   Value *CreateConstGEP2_64(Type *Ty, Value *Ptr, uint64_t Idx0, uint64_t Idx1,
 1831     Value *Idxs[] = {
 1842   Value *CreateConstGEP2_64(Value *Ptr, uint64_t Idx0, uint64_t Idx1,
 1842   Value *CreateConstGEP2_64(Value *Ptr, uint64_t Idx0, uint64_t Idx1,
 1847   Value *CreateConstInBoundsGEP2_64(Type *Ty, Value *Ptr, uint64_t Idx0,
 1847   Value *CreateConstInBoundsGEP2_64(Type *Ty, Value *Ptr, uint64_t Idx0,
 1849     Value *Idxs[] = {
 1860   Value *CreateConstInBoundsGEP2_64(Value *Ptr, uint64_t Idx0, uint64_t Idx1,
 1860   Value *CreateConstInBoundsGEP2_64(Value *Ptr, uint64_t Idx0, uint64_t Idx1,
 1865   Value *CreateStructGEP(Type *Ty, Value *Ptr, unsigned Idx,
 1865   Value *CreateStructGEP(Type *Ty, Value *Ptr, unsigned Idx,
 1870   Value *CreateStructGEP(Value *Ptr, unsigned Idx, const Twine &Name = "") {
 1870   Value *CreateStructGEP(Value *Ptr, unsigned Idx, const Twine &Name = "") {
 1889   Value *CreateTrunc(Value *V, Type *DestTy, const Twine &Name = "") {
 1889   Value *CreateTrunc(Value *V, Type *DestTy, const Twine &Name = "") {
 1893   Value *CreateZExt(Value *V, Type *DestTy, const Twine &Name = "") {
 1893   Value *CreateZExt(Value *V, Type *DestTy, const Twine &Name = "") {
 1897   Value *CreateSExt(Value *V, Type *DestTy, const Twine &Name = "") {
 1897   Value *CreateSExt(Value *V, Type *DestTy, const Twine &Name = "") {
 1903   Value *CreateZExtOrTrunc(Value *V, Type *DestTy,
 1903   Value *CreateZExtOrTrunc(Value *V, Type *DestTy,
 1918   Value *CreateSExtOrTrunc(Value *V, Type *DestTy,
 1918   Value *CreateSExtOrTrunc(Value *V, Type *DestTy,
 1931   Value *CreateFPToUI(Value *V, Type *DestTy, const Twine &Name = "") {
 1931   Value *CreateFPToUI(Value *V, Type *DestTy, const Twine &Name = "") {
 1938   Value *CreateFPToSI(Value *V, Type *DestTy, const Twine &Name = "") {
 1938   Value *CreateFPToSI(Value *V, Type *DestTy, const Twine &Name = "") {
 1945   Value *CreateUIToFP(Value *V, Type *DestTy, const Twine &Name = ""){
 1945   Value *CreateUIToFP(Value *V, Type *DestTy, const Twine &Name = ""){
 1949   Value *CreateSIToFP(Value *V, Type *DestTy, const Twine &Name = ""){
 1949   Value *CreateSIToFP(Value *V, Type *DestTy, const Twine &Name = ""){
 1953   Value *CreateFPTrunc(Value *V, Type *DestTy,
 1953   Value *CreateFPTrunc(Value *V, Type *DestTy,
 1962   Value *CreateFPExt(Value *V, Type *DestTy, const Twine &Name = "") {
 1962   Value *CreateFPExt(Value *V, Type *DestTy, const Twine &Name = "") {
 1969   Value *CreatePtrToInt(Value *V, Type *DestTy,
 1969   Value *CreatePtrToInt(Value *V, Type *DestTy,
 1974   Value *CreateIntToPtr(Value *V, Type *DestTy,
 1974   Value *CreateIntToPtr(Value *V, Type *DestTy,
 1979   Value *CreateBitCast(Value *V, Type *DestTy,
 1979   Value *CreateBitCast(Value *V, Type *DestTy,
 1984   Value *CreateAddrSpaceCast(Value *V, Type *DestTy,
 1984   Value *CreateAddrSpaceCast(Value *V, Type *DestTy,
 1989   Value *CreateZExtOrBitCast(Value *V, Type *DestTy,
 1989   Value *CreateZExtOrBitCast(Value *V, Type *DestTy,
 1998   Value *CreateSExtOrBitCast(Value *V, Type *DestTy,
 1998   Value *CreateSExtOrBitCast(Value *V, Type *DestTy,
 2007   Value *CreateTruncOrBitCast(Value *V, Type *DestTy,
 2007   Value *CreateTruncOrBitCast(Value *V, Type *DestTy,
 2016   Value *CreateCast(Instruction::CastOps Op, Value *V, Type *DestTy,
 2016   Value *CreateCast(Instruction::CastOps Op, Value *V, Type *DestTy,
 2025   Value *CreatePointerCast(Value *V, Type *DestTy,
 2025   Value *CreatePointerCast(Value *V, Type *DestTy,
 2034   Value *CreatePointerBitCastOrAddrSpaceCast(Value *V, Type *DestTy,
 2034   Value *CreatePointerBitCastOrAddrSpaceCast(Value *V, Type *DestTy,
 2048   Value *CreateIntCast(Value *V, Type *DestTy, bool isSigned,
 2048   Value *CreateIntCast(Value *V, Type *DestTy, bool isSigned,
 2057   Value *CreateBitOrPointerCast(Value *V, Type *DestTy,
 2057   Value *CreateBitOrPointerCast(Value *V, Type *DestTy,
 2069   Value *CreateFPCast(Value *V, Type *DestTy, const Twine &Name = "") {
 2069   Value *CreateFPCast(Value *V, Type *DestTy, const Twine &Name = "") {
 2078       Intrinsic::ID ID, Value *V, Type *DestTy,
 2083     Value *ExceptV = getConstrainedFPExcept(Except);
 2092       Value *RoundingV = getConstrainedFPRounding(Rounding);
 2113   Value *CreateIntCast(Value *, Type *, const char *) = delete;
 2113   Value *CreateIntCast(Value *, Type *, const char *) = delete;
 2119   Value *CreateICmpEQ(Value *LHS, Value *RHS, const Twine &Name = "") {
 2119   Value *CreateICmpEQ(Value *LHS, Value *RHS, const Twine &Name = "") {
 2119   Value *CreateICmpEQ(Value *LHS, Value *RHS, const Twine &Name = "") {
 2123   Value *CreateICmpNE(Value *LHS, Value *RHS, const Twine &Name = "") {
 2123   Value *CreateICmpNE(Value *LHS, Value *RHS, const Twine &Name = "") {
 2123   Value *CreateICmpNE(Value *LHS, Value *RHS, const Twine &Name = "") {
 2127   Value *CreateICmpUGT(Value *LHS, Value *RHS, const Twine &Name = "") {
 2127   Value *CreateICmpUGT(Value *LHS, Value *RHS, const Twine &Name = "") {
 2127   Value *CreateICmpUGT(Value *LHS, Value *RHS, const Twine &Name = "") {
 2131   Value *CreateICmpUGE(Value *LHS, Value *RHS, const Twine &Name = "") {
 2131   Value *CreateICmpUGE(Value *LHS, Value *RHS, const Twine &Name = "") {
 2131   Value *CreateICmpUGE(Value *LHS, Value *RHS, const Twine &Name = "") {
 2135   Value *CreateICmpULT(Value *LHS, Value *RHS, const Twine &Name = "") {
 2135   Value *CreateICmpULT(Value *LHS, Value *RHS, const Twine &Name = "") {
 2135   Value *CreateICmpULT(Value *LHS, Value *RHS, const Twine &Name = "") {
 2139   Value *CreateICmpULE(Value *LHS, Value *RHS, const Twine &Name = "") {
 2139   Value *CreateICmpULE(Value *LHS, Value *RHS, const Twine &Name = "") {
 2139   Value *CreateICmpULE(Value *LHS, Value *RHS, const Twine &Name = "") {
 2143   Value *CreateICmpSGT(Value *LHS, Value *RHS, const Twine &Name = "") {
 2143   Value *CreateICmpSGT(Value *LHS, Value *RHS, const Twine &Name = "") {
 2143   Value *CreateICmpSGT(Value *LHS, Value *RHS, const Twine &Name = "") {
 2147   Value *CreateICmpSGE(Value *LHS, Value *RHS, const Twine &Name = "") {
 2147   Value *CreateICmpSGE(Value *LHS, Value *RHS, const Twine &Name = "") {
 2147   Value *CreateICmpSGE(Value *LHS, Value *RHS, const Twine &Name = "") {
 2151   Value *CreateICmpSLT(Value *LHS, Value *RHS, const Twine &Name = "") {
 2151   Value *CreateICmpSLT(Value *LHS, Value *RHS, const Twine &Name = "") {
 2151   Value *CreateICmpSLT(Value *LHS, Value *RHS, const Twine &Name = "") {
 2155   Value *CreateICmpSLE(Value *LHS, Value *RHS, const Twine &Name = "") {
 2155   Value *CreateICmpSLE(Value *LHS, Value *RHS, const Twine &Name = "") {
 2155   Value *CreateICmpSLE(Value *LHS, Value *RHS, const Twine &Name = "") {
 2159   Value *CreateFCmpOEQ(Value *LHS, Value *RHS, const Twine &Name = "",
 2159   Value *CreateFCmpOEQ(Value *LHS, Value *RHS, const Twine &Name = "",
 2159   Value *CreateFCmpOEQ(Value *LHS, Value *RHS, const Twine &Name = "",
 2164   Value *CreateFCmpOGT(Value *LHS, Value *RHS, const Twine &Name = "",
 2164   Value *CreateFCmpOGT(Value *LHS, Value *RHS, const Twine &Name = "",
 2164   Value *CreateFCmpOGT(Value *LHS, Value *RHS, const Twine &Name = "",
 2169   Value *CreateFCmpOGE(Value *LHS, Value *RHS, const Twine &Name = "",
 2169   Value *CreateFCmpOGE(Value *LHS, Value *RHS, const Twine &Name = "",
 2169   Value *CreateFCmpOGE(Value *LHS, Value *RHS, const Twine &Name = "",
 2174   Value *CreateFCmpOLT(Value *LHS, Value *RHS, const Twine &Name = "",
 2174   Value *CreateFCmpOLT(Value *LHS, Value *RHS, const Twine &Name = "",
 2174   Value *CreateFCmpOLT(Value *LHS, Value *RHS, const Twine &Name = "",
 2179   Value *CreateFCmpOLE(Value *LHS, Value *RHS, const Twine &Name = "",
 2179   Value *CreateFCmpOLE(Value *LHS, Value *RHS, const Twine &Name = "",
 2179   Value *CreateFCmpOLE(Value *LHS, Value *RHS, const Twine &Name = "",
 2184   Value *CreateFCmpONE(Value *LHS, Value *RHS, const Twine &Name = "",
 2184   Value *CreateFCmpONE(Value *LHS, Value *RHS, const Twine &Name = "",
 2184   Value *CreateFCmpONE(Value *LHS, Value *RHS, const Twine &Name = "",
 2189   Value *CreateFCmpORD(Value *LHS, Value *RHS, const Twine &Name = "",
 2189   Value *CreateFCmpORD(Value *LHS, Value *RHS, const Twine &Name = "",
 2189   Value *CreateFCmpORD(Value *LHS, Value *RHS, const Twine &Name = "",
 2194   Value *CreateFCmpUNO(Value *LHS, Value *RHS, const Twine &Name = "",
 2194   Value *CreateFCmpUNO(Value *LHS, Value *RHS, const Twine &Name = "",
 2194   Value *CreateFCmpUNO(Value *LHS, Value *RHS, const Twine &Name = "",
 2199   Value *CreateFCmpUEQ(Value *LHS, Value *RHS, const Twine &Name = "",
 2199   Value *CreateFCmpUEQ(Value *LHS, Value *RHS, const Twine &Name = "",
 2199   Value *CreateFCmpUEQ(Value *LHS, Value *RHS, const Twine &Name = "",
 2204   Value *CreateFCmpUGT(Value *LHS, Value *RHS, const Twine &Name = "",
 2204   Value *CreateFCmpUGT(Value *LHS, Value *RHS, const Twine &Name = "",
 2204   Value *CreateFCmpUGT(Value *LHS, Value *RHS, const Twine &Name = "",
 2209   Value *CreateFCmpUGE(Value *LHS, Value *RHS, const Twine &Name = "",
 2209   Value *CreateFCmpUGE(Value *LHS, Value *RHS, const Twine &Name = "",
 2209   Value *CreateFCmpUGE(Value *LHS, Value *RHS, const Twine &Name = "",
 2214   Value *CreateFCmpULT(Value *LHS, Value *RHS, const Twine &Name = "",
 2214   Value *CreateFCmpULT(Value *LHS, Value *RHS, const Twine &Name = "",
 2214   Value *CreateFCmpULT(Value *LHS, Value *RHS, const Twine &Name = "",
 2219   Value *CreateFCmpULE(Value *LHS, Value *RHS, const Twine &Name = "",
 2219   Value *CreateFCmpULE(Value *LHS, Value *RHS, const Twine &Name = "",
 2219   Value *CreateFCmpULE(Value *LHS, Value *RHS, const Twine &Name = "",
 2224   Value *CreateFCmpUNE(Value *LHS, Value *RHS, const Twine &Name = "",
 2224   Value *CreateFCmpUNE(Value *LHS, Value *RHS, const Twine &Name = "",
 2224   Value *CreateFCmpUNE(Value *LHS, Value *RHS, const Twine &Name = "",
 2229   Value *CreateICmp(CmpInst::Predicate P, Value *LHS, Value *RHS,
 2229   Value *CreateICmp(CmpInst::Predicate P, Value *LHS, Value *RHS,
 2229   Value *CreateICmp(CmpInst::Predicate P, Value *LHS, Value *RHS,
 2237   Value *CreateFCmp(CmpInst::Predicate P, Value *LHS, Value *RHS,
 2237   Value *CreateFCmp(CmpInst::Predicate P, Value *LHS, Value *RHS,
 2237   Value *CreateFCmp(CmpInst::Predicate P, Value *LHS, Value *RHS,
 2257   CallInst *CreateCall(FunctionType *FTy, Value *Callee,
 2258                        ArrayRef<Value *> Args = None, const Twine &Name = "",
 2268   CallInst *CreateCall(FunctionType *FTy, Value *Callee, ArrayRef<Value *> Args,
 2268   CallInst *CreateCall(FunctionType *FTy, Value *Callee, ArrayRef<Value *> Args,
 2279   CallInst *CreateCall(FunctionCallee Callee, ArrayRef<Value *> Args = None,
 2285   CallInst *CreateCall(FunctionCallee Callee, ArrayRef<Value *> Args,
 2293   CallInst *CreateCall(Value *Callee, ArrayRef<Value *> Args = None,
 2293   CallInst *CreateCall(Value *Callee, ArrayRef<Value *> Args = None,
 2301   CallInst *CreateCall(Value *Callee, ArrayRef<Value *> Args,
 2301   CallInst *CreateCall(Value *Callee, ArrayRef<Value *> Args,
 2309   Value *CreateSelect(Value *C, Value *True, Value *False,
 2309   Value *CreateSelect(Value *C, Value *True, Value *False,
 2309   Value *CreateSelect(Value *C, Value *True, Value *False,
 2309   Value *CreateSelect(Value *C, Value *True, Value *False,
 2327   VAArgInst *CreateVAArg(Value *List, Type *Ty, const Twine &Name = "") {
 2331   Value *CreateExtractElement(Value *Vec, Value *Idx,
 2331   Value *CreateExtractElement(Value *Vec, Value *Idx,
 2331   Value *CreateExtractElement(Value *Vec, Value *Idx,
 2339   Value *CreateExtractElement(Value *Vec, uint64_t Idx,
 2339   Value *CreateExtractElement(Value *Vec, uint64_t Idx,
 2344   Value *CreateInsertElement(Value *Vec, Value *NewElt, Value *Idx,
 2344   Value *CreateInsertElement(Value *Vec, Value *NewElt, Value *Idx,
 2344   Value *CreateInsertElement(Value *Vec, Value *NewElt, Value *Idx,
 2344   Value *CreateInsertElement(Value *Vec, Value *NewElt, Value *Idx,
 2353   Value *CreateInsertElement(Value *Vec, Value *NewElt, uint64_t Idx,
 2353   Value *CreateInsertElement(Value *Vec, Value *NewElt, uint64_t Idx,
 2353   Value *CreateInsertElement(Value *Vec, Value *NewElt, uint64_t Idx,
 2358   Value *CreateShuffleVector(Value *V1, Value *V2, Value *Mask,
 2358   Value *CreateShuffleVector(Value *V1, Value *V2, Value *Mask,
 2358   Value *CreateShuffleVector(Value *V1, Value *V2, Value *Mask,
 2358   Value *CreateShuffleVector(Value *V1, Value *V2, Value *Mask,
 2367   Value *CreateShuffleVector(Value *V1, Value *V2, ArrayRef<uint32_t> IntMask,
 2367   Value *CreateShuffleVector(Value *V1, Value *V2, ArrayRef<uint32_t> IntMask,
 2367   Value *CreateShuffleVector(Value *V1, Value *V2, ArrayRef<uint32_t> IntMask,
 2369     Value *Mask = ConstantDataVector::get(Context, IntMask);
 2373   Value *CreateExtractValue(Value *Agg,
 2373   Value *CreateExtractValue(Value *Agg,
 2381   Value *CreateInsertValue(Value *Agg, Value *Val,
 2381   Value *CreateInsertValue(Value *Agg, Value *Val,
 2381   Value *CreateInsertValue(Value *Agg, Value *Val,
 2400   Value *CreateIsNull(Value *Arg, const Twine &Name = "") {
 2400   Value *CreateIsNull(Value *Arg, const Twine &Name = "") {
 2406   Value *CreateIsNotNull(Value *Arg, const Twine &Name = "") {
 2406   Value *CreateIsNotNull(Value *Arg, const Twine &Name = "") {
 2417   Value *CreatePtrDiff(Value *LHS, Value *RHS, const Twine &Name = "") {
 2417   Value *CreatePtrDiff(Value *LHS, Value *RHS, const Twine &Name = "") {
 2417   Value *CreatePtrDiff(Value *LHS, Value *RHS, const Twine &Name = "") {
 2421     Value *LHS_int = CreatePtrToInt(LHS, Type::getInt64Ty(Context));
 2422     Value *RHS_int = CreatePtrToInt(RHS, Type::getInt64Ty(Context));
 2423     Value *Difference = CreateSub(LHS_int, RHS_int);
 2432   Value *CreateLaunderInvariantGroup(Value *Ptr) {
 2432   Value *CreateLaunderInvariantGroup(Value *Ptr) {
 2459   Value *CreateStripInvariantGroup(Value *Ptr) {
 2459   Value *CreateStripInvariantGroup(Value *Ptr) {
 2486   Value *CreateVectorSplat(unsigned NumElts, Value *V, const Twine &Name = "") {
 2486   Value *CreateVectorSplat(unsigned NumElts, Value *V, const Twine &Name = "") {
 2491     Value *Undef = UndefValue::get(VectorType::get(V->getType(), NumElts));
 2496     Value *Zeros = ConstantAggregateZero::get(VectorType::get(I32Ty, NumElts));
 2501   Value *CreateExtractInteger(const DataLayout &DL, Value *From,
 2501   Value *CreateExtractInteger(const DataLayout &DL, Value *From,
 2509     Value *V = From;
 2524   Value *CreatePreserveArrayAccessIndex(Value *Base, unsigned Dimension,
 2524   Value *CreatePreserveArrayAccessIndex(Value *Base, unsigned Dimension,
 2530     Value *LastIndexV = getInt32(LastIndex);
 2532     SmallVector<Value *, 4> IdxList;
 2544     Value *DimV = getInt32(Dimension);
 2553   Value *CreatePreserveUnionAccessIndex(Value *Base, unsigned FieldIndex,
 2553   Value *CreatePreserveUnionAccessIndex(Value *Base, unsigned FieldIndex,
 2563     Value *DIIndex = getInt32(FieldIndex);
 2572   Value *CreatePreserveStructAccessIndex(Value *Base, unsigned Index,
 2572   Value *CreatePreserveStructAccessIndex(Value *Base, unsigned Index,
 2578     Value *GEPIndex = getInt32(Index);
 2587     Value *DIIndex = getInt32(FieldIndex);
 2602                                             Value *PtrValue, Value *Mask,
 2602                                             Value *PtrValue, Value *Mask,
 2603                                             Type *IntPtrTy, Value *OffsetValue,
 2604                                             Value **TheCheck) {
 2605     Value *PtrIntValue = CreatePtrToInt(PtrValue, IntPtrTy, "ptrint");
 2620     Value *Zero = ConstantInt::get(IntPtrTy, 0);
 2621     Value *MaskedPtr = CreateAnd(PtrIntValue, Mask, "maskedptr");
 2622     Value *InvCond = CreateICmpEQ(MaskedPtr, Zero, "maskcond");
 2639   CallInst *CreateAlignmentAssumption(const DataLayout &DL, Value *PtrValue,
 2641                                       Value *OffsetValue = nullptr,
 2642                                       Value **TheCheck = nullptr) {
 2649     Value *Mask = ConstantInt::get(IntPtrTy, Alignment - 1);
 2666   CallInst *CreateAlignmentAssumption(const DataLayout &DL, Value *PtrValue,
 2667                                       Value *Alignment,
 2668                                       Value *OffsetValue = nullptr,
 2669                                       Value **TheCheck = nullptr) {
 2679     Value *Mask = CreateSub(Alignment, ConstantInt::get(IntPtrTy, 1), "mask");
include/llvm/IR/InlineAsm.h
   30 class InlineAsm final : public Value {
  185   static bool classof(const Value *V) {
  186     return V->getValueID() == Value::InlineAsmVal;
include/llvm/IR/InstrTypes.h
   59   UnaryInstruction(Type *Ty, unsigned iType, Value *V,
   64   UnaryInstruction(Type *Ty, unsigned iType, Value *V, BasicBlock *IAE)
   87   static bool classof(const Value *V) {
  107   UnaryOperator(UnaryOps iType, Value *S, Type *Ty,
  109   UnaryOperator(UnaryOps iType, Value *S, Type *Ty,
  124   static UnaryOperator *Create(UnaryOps Op, Value *S,
  132   static UnaryOperator *Create(UnaryOps Op, Value *S,
  158                                               Value *V,
  166   static UnaryOperator *CreateFNegFMF(Value *Op, Instruction *FMFSource,
  179   static bool classof(const Value *V) {
  192   BinaryOperator(BinaryOps iType, Value *S1, Value *S2, Type *Ty,
  192   BinaryOperator(BinaryOps iType, Value *S1, Value *S2, Type *Ty,
  194   BinaryOperator(BinaryOps iType, Value *S1, Value *S2, Type *Ty,
  194   BinaryOperator(BinaryOps iType, Value *S1, Value *S2, Type *Ty,
  216   static BinaryOperator *Create(BinaryOps Op, Value *S1, Value *S2,
  216   static BinaryOperator *Create(BinaryOps Op, Value *S1, Value *S2,
  224   static BinaryOperator *Create(BinaryOps Op, Value *S1, Value *S2,
  224   static BinaryOperator *Create(BinaryOps Op, Value *S1, Value *S2,
  250                                                Value *V1, Value *V2,
  250                                                Value *V1, Value *V2,
  258   static BinaryOperator *CreateFAddFMF(Value *V1, Value *V2,
  258   static BinaryOperator *CreateFAddFMF(Value *V1, Value *V2,
  263   static BinaryOperator *CreateFSubFMF(Value *V1, Value *V2,
  263   static BinaryOperator *CreateFSubFMF(Value *V1, Value *V2,
  268   static BinaryOperator *CreateFMulFMF(Value *V1, Value *V2,
  268   static BinaryOperator *CreateFMulFMF(Value *V1, Value *V2,
  273   static BinaryOperator *CreateFDivFMF(Value *V1, Value *V2,
  273   static BinaryOperator *CreateFDivFMF(Value *V1, Value *V2,
  278   static BinaryOperator *CreateFRemFMF(Value *V1, Value *V2,
  278   static BinaryOperator *CreateFRemFMF(Value *V1, Value *V2,
  283   static BinaryOperator *CreateFNegFMF(Value *Op, Instruction *FMFSource,
  285     Value *Zero = ConstantFP::getNegativeZero(Op->getType());
  289   static BinaryOperator *CreateNSW(BinaryOps Opc, Value *V1, Value *V2,
  289   static BinaryOperator *CreateNSW(BinaryOps Opc, Value *V1, Value *V2,
  295   static BinaryOperator *CreateNSW(BinaryOps Opc, Value *V1, Value *V2,
  295   static BinaryOperator *CreateNSW(BinaryOps Opc, Value *V1, Value *V2,
  301   static BinaryOperator *CreateNSW(BinaryOps Opc, Value *V1, Value *V2,
  301   static BinaryOperator *CreateNSW(BinaryOps Opc, Value *V1, Value *V2,
  308   static BinaryOperator *CreateNUW(BinaryOps Opc, Value *V1, Value *V2,
  308   static BinaryOperator *CreateNUW(BinaryOps Opc, Value *V1, Value *V2,
  314   static BinaryOperator *CreateNUW(BinaryOps Opc, Value *V1, Value *V2,
  314   static BinaryOperator *CreateNUW(BinaryOps Opc, Value *V1, Value *V2,
  320   static BinaryOperator *CreateNUW(BinaryOps Opc, Value *V1, Value *V2,
  320   static BinaryOperator *CreateNUW(BinaryOps Opc, Value *V1, Value *V2,
  327   static BinaryOperator *CreateExact(BinaryOps Opc, Value *V1, Value *V2,
  327   static BinaryOperator *CreateExact(BinaryOps Opc, Value *V1, Value *V2,
  333   static BinaryOperator *CreateExact(BinaryOps Opc, Value *V1, Value *V2,
  333   static BinaryOperator *CreateExact(BinaryOps Opc, Value *V1, Value *V2,
  339   static BinaryOperator *CreateExact(BinaryOps Opc, Value *V1, Value *V2,
  339   static BinaryOperator *CreateExact(BinaryOps Opc, Value *V1, Value *V2,
  381   static BinaryOperator *CreateNeg(Value *Op, const Twine &Name = "",
  383   static BinaryOperator *CreateNeg(Value *Op, const Twine &Name,
  385   static BinaryOperator *CreateNSWNeg(Value *Op, const Twine &Name = "",
  387   static BinaryOperator *CreateNSWNeg(Value *Op, const Twine &Name,
  389   static BinaryOperator *CreateNUWNeg(Value *Op, const Twine &Name = "",
  391   static BinaryOperator *CreateNUWNeg(Value *Op, const Twine &Name,
  393   static BinaryOperator *CreateFNeg(Value *Op, const Twine &Name = "",
  395   static BinaryOperator *CreateFNeg(Value *Op, const Twine &Name,
  397   static BinaryOperator *CreateNot(Value *Op, const Twine &Name = "",
  399   static BinaryOperator *CreateNot(Value *Op, const Twine &Name,
  417   static bool classof(const Value *V) {
  442   CastInst(Type *Ty, unsigned iType, Value *S,
  448   CastInst(Type *Ty, unsigned iType, Value *S,
  463     Value *S,                ///< The value to be casted (operand 0)
  476     Value *S,                ///< The value to be casted (operand 0)
  484     Value *S,                ///< The value to be casted (operand 0)
  492     Value *S,                ///< The value to be casted (operand 0)
  500     Value *S,                ///< The value to be casted (operand 0)
  508     Value *S,                ///< The value to be casted (operand 0)
  516     Value *S,                ///< The pointer value to be casted (operand 0)
  524     Value *S,                ///< The pointer value to be casted (operand 0)
  532     Value *S,                ///< The pointer value to be casted (operand 0)
  540     Value *S,                ///< The pointer value to be casted (operand 0)
  553     Value *S,                ///< The pointer value to be casted (operand 0)
  561     Value *S,                ///< The pointer value to be casted (operand 0)
  570     Value *S,                ///< The integer value to be casted (operand 0)
  579     Value *S,                ///< The floating point value to be casted
  587     Value *S,                ///< The floating point value to be casted
  595     Value *S,                ///< The value to be casted (operand 0)
  603     Value *S,                ///< The value to be casted (operand 0)
  635     const Value *Val, ///< The value to cast
  705   static bool castIsValid(Instruction::CastOps op, Value *S, Type *DstTy);
  711   static bool classof(const Value *V) {
  770           Value *LHS, Value *RHS, const Twine &Name = "",
  770           Value *LHS, Value *RHS, const Twine &Name = "",
  775           Value *LHS, Value *RHS, const Twine &Name,
  775           Value *LHS, Value *RHS, const Twine &Name,
  790                          Predicate predicate, Value *S1,
  791                          Value *S2, const Twine &Name = "",
  798   static CmpInst *Create(OtherOps Op, Predicate predicate, Value *S1,
  799                          Value *S2, const Twine &Name, BasicBlock *InsertAtEnd);
  970   static bool classof(const Value *V) {
 1084 using OperandBundleDef = OperandBundleDefT<Value *>;
 1085 using ConstOperandBundleDef = OperandBundleDefT<const Value *>;
 1145   static bool classof(const Value *V) {
 1193   bool isDataOperand(Value::const_user_iterator UI) const {
 1199   unsigned getDataOperandNo(Value::const_user_iterator UI) const {
 1246   Value *getArgOperand(unsigned i) const {
 1251   void setArgOperand(unsigned i, Value *v) {
 1271   bool isArgOperand(Value::const_user_iterator UI) const {
 1277   bool hasArgument(const Value *V) const {
 1281   Value *getCalledOperand() const { return Op<CalledOperandOpEndIdx>(); }
 1285   Value *getCalledValue() const { return getCalledOperand(); }
 1300   bool isCallee(Value::const_user_iterator UI) const {
 1325   void setCalledOperand(Value *V) { Op<CalledOperandOpEndIdx>() = V; }
 1339   void setCalledFunction(FunctionType *FTy, Value *Fn) {
 1618   Value *getReturnedArgOperand() const;
 1770   bool isBundleOperand(Value::const_user_iterator UI) const {
 2138   explicit FuncletPadInst(Instruction::FuncletPadOps Op, Value *ParentPad,
 2139                           ArrayRef<Value *> Args, unsigned Values,
 2141   explicit FuncletPadInst(Instruction::FuncletPadOps Op, Value *ParentPad,
 2142                           ArrayRef<Value *> Args, unsigned Values,
 2145   void init(Value *ParentPad, ArrayRef<Value *> Args, const Twine &NameStr);
 2145   void init(Value *ParentPad, ArrayRef<Value *> Args, const Twine &NameStr);
 2169   Value *getParentPad() const { return Op<-1>(); }
 2170   void setParentPad(Value *ParentPad) {
 2177   Value *getArgOperand(unsigned i) const { return getOperand(i); }
 2178   void setArgOperand(unsigned i, Value *v) { setOperand(i, v); }
 2190   static bool classof(const Value *V) {
include/llvm/IR/Instruction.h
  437   void copyIRFlags(const Value *V, bool IncludeWrapFlags = true);
  441   void andIRFlags(const Value *V);
  683   static bool classof(const Value *V) {
  684     return V->getValueID() >= Value::InstructionVal;
include/llvm/IR/Instructions.h
   70                       Value *ArraySize = nullptr,
   73   AllocaInst(Type *Ty, unsigned AddrSpace, Value *ArraySize,
   81   AllocaInst(Type *Ty, unsigned AddrSpace, Value *ArraySize, MaybeAlign Align,
   83   AllocaInst(Type *Ty, unsigned AddrSpace, Value *ArraySize, MaybeAlign Align,
   92   const Value *getArraySize() const { return getOperand(0); }
   93   Value *getArraySize() { return getOperand(0); }
  151   static bool classof(const Value *V) {
  179   LoadInst(Type *Ty, Value *Ptr, const Twine &NameStr = "",
  181   LoadInst(Type *Ty, Value *Ptr, const Twine &NameStr, BasicBlock *InsertAtEnd);
  182   LoadInst(Type *Ty, Value *Ptr, const Twine &NameStr, bool isVolatile,
  184   LoadInst(Type *Ty, Value *Ptr, const Twine &NameStr, bool isVolatile,
  186   LoadInst(Type *Ty, Value *Ptr, const Twine &NameStr, bool isVolatile,
  188   LoadInst(Type *Ty, Value *Ptr, const Twine &NameStr, bool isVolatile,
  190   LoadInst(Type *Ty, Value *Ptr, const Twine &NameStr, bool isVolatile,
  194   LoadInst(Type *Ty, Value *Ptr, const Twine &NameStr, bool isVolatile,
  199   explicit LoadInst(Value *Ptr, const Twine &NameStr = "",
  203   LoadInst(Value *Ptr, const Twine &NameStr, BasicBlock *InsertAtEnd)
  206   LoadInst(Value *Ptr, const Twine &NameStr, bool isVolatile,
  210   LoadInst(Value *Ptr, const Twine &NameStr, bool isVolatile,
  214   LoadInst(Value *Ptr, const Twine &NameStr, bool isVolatile, MaybeAlign Align,
  218   LoadInst(Value *Ptr, const Twine &NameStr, bool isVolatile, MaybeAlign Align,
  222   LoadInst(Value *Ptr, const Twine &NameStr, bool isVolatile, MaybeAlign Align,
  227   LoadInst(Value *Ptr, const Twine &NameStr, bool isVolatile, MaybeAlign Align,
  289   Value *getPointerOperand() { return getOperand(0); }
  290   const Value *getPointerOperand() const { return getOperand(0); }
  303   static bool classof(const Value *V) {
  335   StoreInst(Value *Val, Value *Ptr, Instruction *InsertBefore);
  335   StoreInst(Value *Val, Value *Ptr, Instruction *InsertBefore);
  336   StoreInst(Value *Val, Value *Ptr, BasicBlock *InsertAtEnd);
  336   StoreInst(Value *Val, Value *Ptr, BasicBlock *InsertAtEnd);
  337   StoreInst(Value *Val, Value *Ptr, bool isVolatile = false,
  337   StoreInst(Value *Val, Value *Ptr, bool isVolatile = false,
  339   StoreInst(Value *Val, Value *Ptr, bool isVolatile, BasicBlock *InsertAtEnd);
  339   StoreInst(Value *Val, Value *Ptr, bool isVolatile, BasicBlock *InsertAtEnd);
  340   StoreInst(Value *Val, Value *Ptr, bool isVolatile, MaybeAlign Align,
  340   StoreInst(Value *Val, Value *Ptr, bool isVolatile, MaybeAlign Align,
  342   StoreInst(Value *Val, Value *Ptr, bool isVolatile, MaybeAlign Align,
  342   StoreInst(Value *Val, Value *Ptr, bool isVolatile, MaybeAlign Align,
  344   StoreInst(Value *Val, Value *Ptr, bool isVolatile, MaybeAlign Align,
  344   StoreInst(Value *Val, Value *Ptr, bool isVolatile, MaybeAlign Align,
  347   StoreInst(Value *Val, Value *Ptr, bool isVolatile, MaybeAlign Align,
  347   StoreInst(Value *Val, Value *Ptr, bool isVolatile, MaybeAlign Align,
  415   Value *getValueOperand() { return getOperand(0); }
  416   const Value *getValueOperand() const { return getOperand(0); }
  418   Value *getPointerOperand() { return getOperand(1); }
  419   const Value *getPointerOperand() const { return getOperand(1); }
  432   static bool classof(const Value *V) {
  509   static bool classof(const Value *V) {
  537   void Init(Value *Ptr, Value *Cmp, Value *NewVal,
  537   void Init(Value *Ptr, Value *Cmp, Value *NewVal,
  537   void Init(Value *Ptr, Value *Cmp, Value *NewVal,
  548   AtomicCmpXchgInst(Value *Ptr, Value *Cmp, Value *NewVal,
  548   AtomicCmpXchgInst(Value *Ptr, Value *Cmp, Value *NewVal,
  548   AtomicCmpXchgInst(Value *Ptr, Value *Cmp, Value *NewVal,
  552   AtomicCmpXchgInst(Value *Ptr, Value *Cmp, Value *NewVal,
  552   AtomicCmpXchgInst(Value *Ptr, Value *Cmp, Value *NewVal,
  552   AtomicCmpXchgInst(Value *Ptr, Value *Cmp, Value *NewVal,
  625   Value *getPointerOperand() { return getOperand(0); }
  626   const Value *getPointerOperand() const { return getOperand(0); }
  629   Value *getCompareOperand() { return getOperand(1); }
  630   const Value *getCompareOperand() const { return getOperand(1); }
  632   Value *getNewValOperand() { return getOperand(2); }
  633   const Value *getNewValOperand() const { return getOperand(2); }
  667   static bool classof(const Value *V) {
  746   AtomicRMWInst(BinOp Operation, Value *Ptr, Value *Val,
  746   AtomicRMWInst(BinOp Operation, Value *Ptr, Value *Val,
  749   AtomicRMWInst(BinOp Operation, Value *Ptr, Value *Val,
  749   AtomicRMWInst(BinOp Operation, Value *Ptr, Value *Val,
  819   Value *getPointerOperand() { return getOperand(0); }
  820   const Value *getPointerOperand() const { return getOperand(0); }
  823   Value *getValOperand() { return getOperand(1); }
  824   const Value *getValOperand() const { return getOperand(1); }
  839   static bool classof(const Value *V) {
  844   void Init(BinOp Operation, Value *Ptr, Value *Val,
  844   void Init(BinOp Operation, Value *Ptr, Value *Val,
  891   inline GetElementPtrInst(Type *PointeeType, Value *Ptr,
  892                            ArrayRef<Value *> IdxList, unsigned Values,
  894   inline GetElementPtrInst(Type *PointeeType, Value *Ptr,
  895                            ArrayRef<Value *> IdxList, unsigned Values,
  898   void init(Value *Ptr, ArrayRef<Value *> IdxList, const Twine &NameStr);
  898   void init(Value *Ptr, ArrayRef<Value *> IdxList, const Twine &NameStr);
  907   static GetElementPtrInst *Create(Type *PointeeType, Value *Ptr,
  908                                    ArrayRef<Value *> IdxList,
  923   static GetElementPtrInst *Create(Type *PointeeType, Value *Ptr,
  924                                    ArrayRef<Value *> IdxList,
  941   static GetElementPtrInst *CreateInBounds(Value *Ptr,
  942                                            ArrayRef<Value *> IdxList,
  949   CreateInBounds(Type *PointeeType, Value *Ptr, ArrayRef<Value *> IdxList,
  949   CreateInBounds(Type *PointeeType, Value *Ptr, ArrayRef<Value *> IdxList,
  958   static GetElementPtrInst *CreateInBounds(Value *Ptr,
  959                                            ArrayRef<Value *> IdxList,
  965   static GetElementPtrInst *CreateInBounds(Type *PointeeType, Value *Ptr,
  966                                            ArrayRef<Value *> IdxList,
 1002   static Type *getIndexedType(Type *Ty, ArrayRef<Value *> IdxList);
 1019   Value *getPointerOperand() {
 1022   const Value *getPointerOperand() const {
 1042   static Type *getGEPReturnType(Value *Ptr, ArrayRef<Value *> IdxList) {
 1042   static Type *getGEPReturnType(Value *Ptr, ArrayRef<Value *> IdxList) {
 1047   static Type *getGEPReturnType(Type *ElTy, Value *Ptr,
 1048                                 ArrayRef<Value *> IdxList) {
 1056     for (Value *Index : IdxList)
 1104   static bool classof(const Value *V) {
 1114 GetElementPtrInst::GetElementPtrInst(Type *PointeeType, Value *Ptr,
 1115                                      ArrayRef<Value *> IdxList, unsigned Values,
 1128 GetElementPtrInst::GetElementPtrInst(Type *PointeeType, Value *Ptr,
 1129                                      ArrayRef<Value *> IdxList, unsigned Values,
 1176     Value *LHS,      ///< The left-hand-side of the expression
 1177     Value *RHS,      ///< The right-hand-side of the expression
 1191     Value *LHS,      ///< The left-hand-side of the expression
 1192     Value *RHS,      ///< The right-hand-side of the expression
 1205     Value *LHS,     ///< The left-hand-side of the expression
 1206     Value *RHS,     ///< The right-hand-side of the expression
 1281   static bool classof(const Value *V) {
 1316     Value *LHS,      ///< The left-hand-side of the expression
 1317     Value *RHS,      ///< The right-hand-side of the expression
 1329     Value *LHS,      ///< The left-hand-side of the expression
 1330     Value *RHS,      ///< The right-hand-side of the expression
 1341     Value *LHS,     ///< The left-hand-side of the expression
 1342     Value *RHS,     ///< The right-hand-side of the expression
 1389   static bool classof(const Value *V) {
 1405   inline CallInst(FunctionType *Ty, Value *Func, ArrayRef<Value *> Args,
 1405   inline CallInst(FunctionType *Ty, Value *Func, ArrayRef<Value *> Args,
 1409   inline CallInst(FunctionType *Ty, Value *Func, ArrayRef<Value *> Args,
 1409   inline CallInst(FunctionType *Ty, Value *Func, ArrayRef<Value *> Args,
 1415   inline CallInst(FunctionType *Ty, Value *Func, ArrayRef<Value *> Args,
 1415   inline CallInst(FunctionType *Ty, Value *Func, ArrayRef<Value *> Args,
 1419   explicit CallInst(FunctionType *Ty, Value *F, const Twine &NameStr,
 1422   CallInst(FunctionType *ty, Value *F, const Twine &NameStr,
 1425   void init(FunctionType *FTy, Value *Func, ArrayRef<Value *> Args,
 1425   void init(FunctionType *FTy, Value *Func, ArrayRef<Value *> Args,
 1427   void init(FunctionType *FTy, Value *Func, const Twine &NameStr);
 1443   static CallInst *Create(FunctionType *Ty, Value *F, const Twine &NameStr = "",
 1448   static CallInst *Create(FunctionType *Ty, Value *Func, ArrayRef<Value *> Args,
 1448   static CallInst *Create(FunctionType *Ty, Value *Func, ArrayRef<Value *> Args,
 1455   static CallInst *Create(FunctionType *Ty, Value *Func, ArrayRef<Value *> Args,
 1455   static CallInst *Create(FunctionType *Ty, Value *Func, ArrayRef<Value *> Args,
 1467   static CallInst *Create(FunctionType *Ty, Value *F, const Twine &NameStr,
 1472   static CallInst *Create(FunctionType *Ty, Value *Func, ArrayRef<Value *> Args,
 1472   static CallInst *Create(FunctionType *Ty, Value *Func, ArrayRef<Value *> Args,
 1478   static CallInst *Create(FunctionType *Ty, Value *Func, ArrayRef<Value *> Args,
 1478   static CallInst *Create(FunctionType *Ty, Value *Func, ArrayRef<Value *> Args,
 1495   static CallInst *Create(FunctionCallee Func, ArrayRef<Value *> Args,
 1503   static CallInst *Create(FunctionCallee Func, ArrayRef<Value *> Args,
 1516   static CallInst *Create(FunctionCallee Func, ArrayRef<Value *> Args,
 1522   static CallInst *Create(FunctionCallee Func, ArrayRef<Value *> Args,
 1530   static CallInst *Create(Value *Func, const Twine &NameStr = "",
 1538   static CallInst *Create(Value *Func, ArrayRef<Value *> Args,
 1538   static CallInst *Create(Value *Func, ArrayRef<Value *> Args,
 1547   static CallInst *Create(Value *Func, ArrayRef<Value *> Args,
 1547   static CallInst *Create(Value *Func, ArrayRef<Value *> Args,
 1557   static CallInst *Create(Value *Func, const Twine &NameStr,
 1565   static CallInst *Create(Value *Func, ArrayRef<Value *> Args,
 1565   static CallInst *Create(Value *Func, ArrayRef<Value *> Args,
 1573   static CallInst *Create(Value *Func, ArrayRef<Value *> Args,
 1573   static CallInst *Create(Value *Func, ArrayRef<Value *> Args,
 1597                                    Type *AllocTy, Value *AllocSize,
 1598                                    Value *ArraySize = nullptr,
 1602                                    Type *AllocTy, Value *AllocSize,
 1603                                    Value *ArraySize = nullptr,
 1607                                    Type *AllocTy, Value *AllocSize,
 1608                                    Value *ArraySize = nullptr,
 1613                                    Type *AllocTy, Value *AllocSize,
 1614                                    Value *ArraySize = nullptr,
 1619   static Instruction *CreateFree(Value *Source, Instruction *InsertBefore);
 1620   static Instruction *CreateFree(Value *Source, BasicBlock *InsertAtEnd);
 1621   static Instruction *CreateFree(Value *Source,
 1624   static Instruction *CreateFree(Value *Source,
 1672   static bool classof(const Value *V) {
 1687 CallInst::CallInst(FunctionType *Ty, Value *Func, ArrayRef<Value *> Args,
 1687 CallInst::CallInst(FunctionType *Ty, Value *Func, ArrayRef<Value *> Args,
 1698 CallInst::CallInst(FunctionType *Ty, Value *Func, ArrayRef<Value *> Args,
 1698 CallInst::CallInst(FunctionType *Ty, Value *Func, ArrayRef<Value *> Args,
 1716   SelectInst(Value *C, Value *S1, Value *S2, const Twine &NameStr,
 1716   SelectInst(Value *C, Value *S1, Value *S2, const Twine &NameStr,
 1716   SelectInst(Value *C, Value *S1, Value *S2, const Twine &NameStr,
 1724   SelectInst(Value *C, Value *S1, Value *S2, const Twine &NameStr,
 1724   SelectInst(Value *C, Value *S1, Value *S2, const Twine &NameStr,
 1724   SelectInst(Value *C, Value *S1, Value *S2, const Twine &NameStr,
 1732   void init(Value *C, Value *S1, Value *S2) {
 1732   void init(Value *C, Value *S1, Value *S2) {
 1732   void init(Value *C, Value *S1, Value *S2) {
 1746   static SelectInst *Create(Value *C, Value *S1, Value *S2,
 1746   static SelectInst *Create(Value *C, Value *S1, Value *S2,
 1746   static SelectInst *Create(Value *C, Value *S1, Value *S2,
 1756   static SelectInst *Create(Value *C, Value *S1, Value *S2,
 1756   static SelectInst *Create(Value *C, Value *S1, Value *S2,
 1756   static SelectInst *Create(Value *C, Value *S1, Value *S2,
 1762   const Value *getCondition() const { return Op<0>(); }
 1763   const Value *getTrueValue() const { return Op<1>(); }
 1764   const Value *getFalseValue() const { return Op<2>(); }
 1765   Value *getCondition() { return Op<0>(); }
 1766   Value *getTrueValue() { return Op<1>(); }
 1767   Value *getFalseValue() { return Op<2>(); }
 1769   void setCondition(Value *V) { Op<0>() = V; }
 1770   void setTrueValue(Value *V) { Op<1>() = V; }
 1771   void setFalseValue(Value *V) { Op<2>() = V; }
 1779   static const char *areInvalidOperands(Value *Cond, Value *True, Value *False);
 1779   static const char *areInvalidOperands(Value *Cond, Value *True, Value *False);
 1779   static const char *areInvalidOperands(Value *Cond, Value *True, Value *False);
 1792   static bool classof(const Value *V) {
 1818   VAArgInst(Value *List, Type *Ty, const Twine &NameStr = "",
 1824   VAArgInst(Value *List, Type *Ty, const Twine &NameStr,
 1830   Value *getPointerOperand() { return getOperand(0); }
 1831   const Value *getPointerOperand() const { return getOperand(0); }
 1838   static bool classof(const Value *V) {
 1851   ExtractElementInst(Value *Vec, Value *Idx, const Twine &NameStr = "",
 1851   ExtractElementInst(Value *Vec, Value *Idx, const Twine &NameStr = "",
 1853   ExtractElementInst(Value *Vec, Value *Idx, const Twine &NameStr,
 1853   ExtractElementInst(Value *Vec, Value *Idx, const Twine &NameStr,
 1863   static ExtractElementInst *Create(Value *Vec, Value *Idx,
 1863   static ExtractElementInst *Create(Value *Vec, Value *Idx,
 1869   static ExtractElementInst *Create(Value *Vec, Value *Idx,
 1869   static ExtractElementInst *Create(Value *Vec, Value *Idx,
 1877   static bool isValidOperands(const Value *Vec, const Value *Idx);
 1877   static bool isValidOperands(const Value *Vec, const Value *Idx);
 1879   Value *getVectorOperand() { return Op<0>(); }
 1880   Value *getIndexOperand() { return Op<1>(); }
 1881   const Value *getVectorOperand() const { return Op<0>(); }
 1882   const Value *getIndexOperand() const { return Op<1>(); }
 1895   static bool classof(const Value *V) {
 1915   InsertElementInst(Value *Vec, Value *NewElt, Value *Idx,
 1915   InsertElementInst(Value *Vec, Value *NewElt, Value *Idx,
 1915   InsertElementInst(Value *Vec, Value *NewElt, Value *Idx,
 1918   InsertElementInst(Value *Vec, Value *NewElt, Value *Idx, const Twine &NameStr,
 1918   InsertElementInst(Value *Vec, Value *NewElt, Value *Idx, const Twine &NameStr,
 1918   InsertElementInst(Value *Vec, Value *NewElt, Value *Idx, const Twine &NameStr,
 1928   static InsertElementInst *Create(Value *Vec, Value *NewElt, Value *Idx,
 1928   static InsertElementInst *Create(Value *Vec, Value *NewElt, Value *Idx,
 1928   static InsertElementInst *Create(Value *Vec, Value *NewElt, Value *Idx,
 1934   static InsertElementInst *Create(Value *Vec, Value *NewElt, Value *Idx,
 1934   static InsertElementInst *Create(Value *Vec, Value *NewElt, Value *Idx,
 1934   static InsertElementInst *Create(Value *Vec, Value *NewElt, Value *Idx,
 1942   static bool isValidOperands(const Value *Vec, const Value *NewElt,
 1942   static bool isValidOperands(const Value *Vec, const Value *NewElt,
 1943                               const Value *Idx);
 1958   static bool classof(const Value *V) {
 1985   ShuffleVectorInst(Value *V1, Value *V2, Value *Mask,
 1985   ShuffleVectorInst(Value *V1, Value *V2, Value *Mask,
 1985   ShuffleVectorInst(Value *V1, Value *V2, Value *Mask,
 1988   ShuffleVectorInst(Value *V1, Value *V2, Value *Mask,
 1988   ShuffleVectorInst(Value *V1, Value *V2, Value *Mask,
 1988   ShuffleVectorInst(Value *V1, Value *V2, Value *Mask,
 2002   static bool isValidOperands(const Value *V1, const Value *V2,
 2002   static bool isValidOperands(const Value *V1, const Value *V2,
 2003                               const Value *Mask);
 2273   static bool classof(const Value *V) {
 2301   inline ExtractValueInst(Value *Agg,
 2305   inline ExtractValueInst(Value *Agg,
 2318   static ExtractValueInst *Create(Value *Agg,
 2326   static ExtractValueInst *Create(Value *Agg,
 2347   Value *getAggregateOperand() {
 2350   const Value *getAggregateOperand() const {
 2373   static bool classof(const Value *V) {
 2378 ExtractValueInst::ExtractValueInst(Value *Agg,
 2387 ExtractValueInst::ExtractValueInst(Value *Agg,
 2412   inline InsertValueInst(Value *Agg, Value *Val,
 2412   inline InsertValueInst(Value *Agg, Value *Val,
 2416   inline InsertValueInst(Value *Agg, Value *Val,
 2416   inline InsertValueInst(Value *Agg, Value *Val,
 2422   InsertValueInst(Value *Agg, Value *Val, unsigned Idx,
 2422   InsertValueInst(Value *Agg, Value *Val, unsigned Idx,
 2425   InsertValueInst(Value *Agg, Value *Val, unsigned Idx, const Twine &NameStr,
 2425   InsertValueInst(Value *Agg, Value *Val, unsigned Idx, const Twine &NameStr,
 2428   void init(Value *Agg, Value *Val, ArrayRef<unsigned> Idxs,
 2428   void init(Value *Agg, Value *Val, ArrayRef<unsigned> Idxs,
 2443   static InsertValueInst *Create(Value *Agg, Value *Val,
 2443   static InsertValueInst *Create(Value *Agg, Value *Val,
 2450   static InsertValueInst *Create(Value *Agg, Value *Val,
 2450   static InsertValueInst *Create(Value *Agg, Value *Val,
 2468   Value *getAggregateOperand() {
 2471   const Value *getAggregateOperand() const {
 2478   Value *getInsertedValueOperand() {
 2481   const Value *getInsertedValueOperand() const {
 2504   static bool classof(const Value *V) {
 2514 InsertValueInst::InsertValueInst(Value *Agg,
 2515                                  Value *Val,
 2525 InsertValueInst::InsertValueInst(Value *Agg,
 2526                                  Value *Val,
 2644   Value *getIncomingValue(unsigned i) const {
 2647   void setIncomingValue(unsigned i, Value *V) {
 2679   BasicBlock *getIncomingBlock(Value::const_user_iterator I) const {
 2698   void addIncoming(Value *V, BasicBlock *BB) {
 2715   Value *removeIncomingValue(unsigned Idx, bool DeletePHIIfEmpty = true);
 2717   Value *removeIncomingValue(const BasicBlock *BB, bool DeletePHIIfEmpty=true) {
 2733   Value *getIncomingValueForBlock(const BasicBlock *BB) const {
 2740   void setIncomingValueForBlock(const BasicBlock *BB, Value *V) {
 2754   Value *hasConstantValue() const;
 2765   static bool classof(const Value *V) {
 2874   static bool classof(const Value *V) {
 2908   explicit ReturnInst(LLVMContext &C, Value *retVal = nullptr,
 2910   ReturnInst(LLVMContext &C, Value *retVal, BasicBlock *InsertAtEnd);
 2920   static ReturnInst* Create(LLVMContext &C, Value *retVal = nullptr,
 2925   static ReturnInst* Create(LLVMContext &C, Value *retVal,
 2938   Value *getReturnValue() const {
 2948   static bool classof(const Value *V) {
 2989   BranchInst(BasicBlock *IfTrue, BasicBlock *IfFalse, Value *Cond,
 2992   BranchInst(BasicBlock *IfTrue, BasicBlock *IfFalse, Value *Cond,
 3037                             Value *Cond, Instruction *InsertBefore = nullptr) {
 3046                             Value *Cond, BasicBlock *InsertAtEnd) {
 3056   Value *getCondition() const {
 3061   void setCondition(Value *V) {
 3101   static bool classof(const Value *V) {
 3132   SwitchInst(Value *Value, BasicBlock *Default, unsigned NumCases,
 3139   SwitchInst(Value *Value, BasicBlock *Default, unsigned NumCases,
 3147   void init(Value *Value, BasicBlock *Default, unsigned NumReserved);
 3309   static SwitchInst *Create(Value *Value, BasicBlock *Default,
 3315   static SwitchInst *Create(Value *Value, BasicBlock *Default,
 3324   Value *getCondition() const { return getOperand(0); }
 3325   void setCondition(Value *V) { setOperand(0, V); }
 3458   static bool classof(const Value *V) {
 3532   IndirectBrInst(Value *Address, unsigned NumDests, Instruction *InsertBefore);
 3538   IndirectBrInst(Value *Address, unsigned NumDests, BasicBlock *InsertAtEnd);
 3545   void init(Value *Address, unsigned NumDests);
 3582   static IndirectBrInst *Create(Value *Address, unsigned NumDests,
 3587   static IndirectBrInst *Create(Value *Address, unsigned NumDests,
 3596   Value *getAddress() { return getOperand(0); }
 3597   const Value *getAddress() const { return getOperand(0); }
 3598   void setAddress(Value *V) { setOperand(0, V); }
 3638   static bool classof(const Value *V) {
 3672   inline InvokeInst(FunctionType *Ty, Value *Func, BasicBlock *IfNormal,
 3673                     BasicBlock *IfException, ArrayRef<Value *> Args,
 3677   inline InvokeInst(FunctionType *Ty, Value *Func, BasicBlock *IfNormal,
 3678                     BasicBlock *IfException, ArrayRef<Value *> Args,
 3682   void init(FunctionType *Ty, Value *Func, BasicBlock *IfNormal,
 3683             BasicBlock *IfException, ArrayRef<Value *> Args,
 3700   static InvokeInst *Create(FunctionType *Ty, Value *Func, BasicBlock *IfNormal,
 3701                             BasicBlock *IfException, ArrayRef<Value *> Args,
 3710   static InvokeInst *Create(FunctionType *Ty, Value *Func, BasicBlock *IfNormal,
 3711                             BasicBlock *IfException, ArrayRef<Value *> Args,
 3724   static InvokeInst *Create(FunctionType *Ty, Value *Func, BasicBlock *IfNormal,
 3725                             BasicBlock *IfException, ArrayRef<Value *> Args,
 3733   static InvokeInst *Create(FunctionType *Ty, Value *Func, BasicBlock *IfNormal,
 3734                             BasicBlock *IfException, ArrayRef<Value *> Args,
 3747                             BasicBlock *IfException, ArrayRef<Value *> Args,
 3755                             BasicBlock *IfException, ArrayRef<Value *> Args,
 3764                             BasicBlock *IfException, ArrayRef<Value *> Args,
 3771                             BasicBlock *IfException, ArrayRef<Value *> Args,
 3779   static InvokeInst *Create(Value *Func, BasicBlock *IfNormal,
 3780                             BasicBlock *IfException, ArrayRef<Value *> Args,
 3790   static InvokeInst *Create(Value *Func, BasicBlock *IfNormal,
 3791                             BasicBlock *IfException, ArrayRef<Value *> Args,
 3802   static InvokeInst *Create(Value *Func, BasicBlock *IfNormal,
 3803                             BasicBlock *IfException, ArrayRef<Value *> Args,
 3811   static InvokeInst *Create(Value *Func, BasicBlock *IfNormal,
 3812                             BasicBlock *IfException, ArrayRef<Value *> Args,
 3876   static bool classof(const Value *V) {
 3889 InvokeInst::InvokeInst(FunctionType *Ty, Value *Func, BasicBlock *IfNormal,
 3890                        BasicBlock *IfException, ArrayRef<Value *> Args,
 3899 InvokeInst::InvokeInst(FunctionType *Ty, Value *Func, BasicBlock *IfNormal,
 3900                        BasicBlock *IfException, ArrayRef<Value *> Args,
 3926   inline CallBrInst(FunctionType *Ty, Value *Func, BasicBlock *DefaultDest,
 3928                     ArrayRef<Value *> Args,
 3932   inline CallBrInst(FunctionType *Ty, Value *Func, BasicBlock *DefaultDest,
 3934                     ArrayRef<Value *> Args,
 3938   void init(FunctionType *FTy, Value *Func, BasicBlock *DefaultDest,
 3939             ArrayRef<BasicBlock *> IndirectDests, ArrayRef<Value *> Args,
 3960   static CallBrInst *Create(FunctionType *Ty, Value *Func,
 3963                             ArrayRef<Value *> Args, const Twine &NameStr,
 3971   static CallBrInst *Create(FunctionType *Ty, Value *Func,
 3974                             ArrayRef<Value *> Args,
 3987   static CallBrInst *Create(FunctionType *Ty, Value *Func,
 3990                             ArrayRef<Value *> Args, const Twine &NameStr,
 3998   static CallBrInst *Create(FunctionType *Ty, Value *Func,
 4001                             ArrayRef<Value *> Args,
 4015                             ArrayRef<Value *> Args, const Twine &NameStr,
 4023                             ArrayRef<Value *> Args,
 4033                             ArrayRef<Value *> Args, const Twine &NameStr,
 4042                             ArrayRef<Value *> Args,
 4065   Value *getIndirectDestLabel(unsigned i) const {
 4071   Value *getIndirectDestLabelUse(unsigned i) const {
 4116   static bool classof(const Value *V) {
 4129 CallBrInst::CallBrInst(FunctionType *Ty, Value *Func, BasicBlock *DefaultDest,
 4131                        ArrayRef<Value *> Args,
 4140 CallBrInst::CallBrInst(FunctionType *Ty, Value *Func, BasicBlock *DefaultDest,
 4142                        ArrayRef<Value *> Args,
 4165   explicit ResumeInst(Value *Exn, Instruction *InsertBefore=nullptr);
 4166   ResumeInst(Value *Exn, BasicBlock *InsertAtEnd);
 4175   static ResumeInst *Create(Value *Exn, Instruction *InsertBefore = nullptr) {
 4179   static ResumeInst *Create(Value *Exn, BasicBlock *InsertAtEnd) {
 4187   Value *getValue() const { return Op<0>(); }
 4195   static bool classof(const Value *V) {
 4233   CatchSwitchInst(Value *ParentPad, BasicBlock *UnwindDest,
 4241   CatchSwitchInst(Value *ParentPad, BasicBlock *UnwindDest,
 4248   void init(Value *ParentPad, BasicBlock *UnwindDest, unsigned NumReserved);
 4258   static CatchSwitchInst *Create(Value *ParentPad, BasicBlock *UnwindDest,
 4266   static CatchSwitchInst *Create(Value *ParentPad, BasicBlock *UnwindDest,
 4277   Value *getParentPad() const { return getOperand(0); }
 4278   void setParentPad(Value *ParentPad) { setOperand(0, ParentPad); }
 4303   static BasicBlock *handler_helper(Value *V) { return cast<BasicBlock>(V); }
 4304   static const BasicBlock *handler_helper(const Value *V) {
 4309   using DerefFnTy = BasicBlock *(*)(Value *);
 4312   using ConstDerefFnTy = const BasicBlock *(*)(const Value *);
 4380   static bool classof(const Value *V) {
 4395   explicit CleanupPadInst(Value *ParentPad, ArrayRef<Value *> Args,
 4395   explicit CleanupPadInst(Value *ParentPad, ArrayRef<Value *> Args,
 4400   explicit CleanupPadInst(Value *ParentPad, ArrayRef<Value *> Args,
 4400   explicit CleanupPadInst(Value *ParentPad, ArrayRef<Value *> Args,
 4407   static CleanupPadInst *Create(Value *ParentPad, ArrayRef<Value *> Args = None,
 4407   static CleanupPadInst *Create(Value *ParentPad, ArrayRef<Value *> Args = None,
 4415   static CleanupPadInst *Create(Value *ParentPad, ArrayRef<Value *> Args,
 4415   static CleanupPadInst *Create(Value *ParentPad, ArrayRef<Value *> Args,
 4426   static bool classof(const Value *V) {
 4436   explicit CatchPadInst(Value *CatchSwitch, ArrayRef<Value *> Args,
 4436   explicit CatchPadInst(Value *CatchSwitch, ArrayRef<Value *> Args,
 4441   explicit CatchPadInst(Value *CatchSwitch, ArrayRef<Value *> Args,
 4441   explicit CatchPadInst(Value *CatchSwitch, ArrayRef<Value *> Args,
 4448   static CatchPadInst *Create(Value *CatchSwitch, ArrayRef<Value *> Args,
 4448   static CatchPadInst *Create(Value *CatchSwitch, ArrayRef<Value *> Args,
 4456   static CatchPadInst *Create(Value *CatchSwitch, ArrayRef<Value *> Args,
 4456   static CatchPadInst *Create(Value *CatchSwitch, ArrayRef<Value *> Args,
 4467   void setCatchSwitch(Value *CatchSwitch) {
 4476   static bool classof(const Value *V) {
 4487   CatchReturnInst(Value *CatchPad, BasicBlock *BB, Instruction *InsertBefore);
 4488   CatchReturnInst(Value *CatchPad, BasicBlock *BB, BasicBlock *InsertAtEnd);
 4490   void init(Value *CatchPad, BasicBlock *BB);
 4499   static CatchReturnInst *Create(Value *CatchPad, BasicBlock *BB,
 4506   static CatchReturnInst *Create(Value *CatchPad, BasicBlock *BB,
 4532   Value *getCatchSwitchParentPad() const {
 4540   static bool classof(const Value *V) {
 4569   CleanupReturnInst(Value *CleanupPad, BasicBlock *UnwindBB, unsigned Values,
 4571   CleanupReturnInst(Value *CleanupPad, BasicBlock *UnwindBB, unsigned Values,
 4574   void init(Value *CleanupPad, BasicBlock *UnwindBB);
 4583   static CleanupReturnInst *Create(Value *CleanupPad,
 4594   static CleanupReturnInst *Create(Value *CleanupPad, BasicBlock *UnwindBB,
 4634   static bool classof(const Value *V) {
 4693   static bool classof(const Value *V) {
 4723     Value *S,                           ///< The value to be truncated
 4731     Value *S,                     ///< The value to be truncated
 4741   static bool classof(const Value *V) {
 4762     Value *S,                           ///< The value to be zero extended
 4770     Value *S,                     ///< The value to be zero extended
 4780   static bool classof(const Value *V) {
 4801     Value *S,                           ///< The value to be sign extended
 4809     Value *S,                     ///< The value to be sign extended
 4819   static bool classof(const Value *V) {
 4840     Value *S,                           ///< The value to be truncated
 4848     Value *S,                     ///< The value to be truncated
 4858   static bool classof(const Value *V) {
 4879     Value *S,                           ///< The value to be extended
 4887     Value *S,                     ///< The value to be extended
 4897   static bool classof(const Value *V) {
 4918     Value *S,                           ///< The value to be converted
 4926     Value *S,                     ///< The value to be converted
 4936   static bool classof(const Value *V) {
 4957     Value *S,                           ///< The value to be converted
 4965     Value *S,                     ///< The value to be converted
 4975   static bool classof(const Value *V) {
 4996     Value *S,                           ///< The value to be converted
 5004     Value *S,                     ///< The value to be converted
 5014   static bool classof(const Value *V) {
 5035     Value *S,                           ///< The value to be converted
 5043     Value *S,                     ///< The value to be converted
 5053   static bool classof(const Value *V) {
 5070     Value *S,                           ///< The value to be converted
 5078     Value *S,                     ///< The value to be converted
 5096   static bool classof(const Value *V) {
 5117     Value *S,                           ///< The value to be converted
 5125     Value *S,                     ///< The value to be converted
 5132   Value *getPointerOperand() { return getOperand(0); }
 5134   const Value *getPointerOperand() const { return getOperand(0); }
 5147   static bool classof(const Value *V) {
 5168     Value *S,                           ///< The value to be casted
 5176     Value *S,                     ///< The value to be casted
 5186   static bool classof(const Value *V) {
 5208     Value *S,                           ///< The value to be casted
 5216     Value *S,                     ///< The value to be casted
 5226   static bool classof(const Value *V) {
 5231   Value *getPointerOperand() {
 5236   const Value *getPointerOperand() const {
 5258 inline const Value *getLoadStorePointerOperand(const Value *V) {
 5258 inline const Value *getLoadStorePointerOperand(const Value *V) {
 5265 inline Value *getLoadStorePointerOperand(Value *V) {
 5265 inline Value *getLoadStorePointerOperand(Value *V) {
 5272 inline const Value *getPointerOperand(const Value *V) {
 5272 inline const Value *getPointerOperand(const Value *V) {
 5279 inline Value *getPointerOperand(Value *V) {
 5279 inline Value *getPointerOperand(Value *V) {
 5284 inline MaybeAlign getLoadStoreAlignment(Value *I) {
 5294 inline unsigned getLoadStoreAddressSpace(Value *I) {
include/llvm/IR/IntrinsicInst.h
   60     static bool classof(const Value *V) {
   80     static bool classof(const Value *V) {
   92     Value *getVariableLocation(bool AllowNullOp = true) const;
  131     static bool classof(const Value *V) {
  140     Value *getAddress() const { return getVariableLocation(); }
  147     static bool classof(const Value *V) {
  156     Value *getAddress() const { return getVariableLocation(); }
  163     static bool classof(const Value *V) {
  171     Value *getValue() const {
  180     static bool classof(const Value *V) {
  202     static bool classof(const Value *V) {
  292     static bool classof(const Value *V) {
  318     static bool classof(const Value *V) {
  322     Value *getLHS() const { return const_cast<Value*>(getArgOperand(0)); }
  323     Value *getRHS() const { return const_cast<Value*>(getArgOperand(1)); }
  351     static bool classof(const Value *V) {
  370     static bool classof(const Value *V) {
  384     Value *getRawDest() const {
  390     Value *getLength() const {
  399     Value *getDest() const { return getRawDest()->stripPointerCasts(); }
  408     void setDest(Value *Ptr) {
  421     void setLength(Value *L) {
  436     Value *getRawSource() const {
  447     Value *getSource() const { return getRawSource()->stripPointerCasts(); }
  457     void setSource(Value *Ptr) {
  479     Value *getValue() const {
  487     void setValue(Value *Val) {
  501     Value *getRawElementSizeInBytes() const {
  529     static bool classof(const Value *V) {
  541     static bool classof(const Value *V) {
  559     static bool classof(const Value *V) {
  571     static bool classof(const Value *V) {
  583     static bool classof(const Value *V) {
  615     static bool classof(const Value *V) {
  627     static bool classof(const Value *V) {
  640     static bool classof(const Value *V) {
  652     static bool classof(const Value *V) {
  664     static bool classof(const Value *V) {
  695     static bool classof(const Value *V) {
  714     static bool classof(const Value *V) {
  735     static bool classof(const Value *V) {
  754     static bool classof(const Value *V) {
  773     static bool classof(const Value *V) {
  784     static bool classof(const Value *V) {
  788     Value *getArgList() const { return const_cast<Value*>(getArgOperand(0)); }
  797     static bool classof(const Value *V) {
  801     Value *getArgList() const { return const_cast<Value*>(getArgOperand(0)); }
  810     static bool classof(const Value *V) {
  814     Value *getDest() const { return const_cast<Value*>(getArgOperand(0)); }
  815     Value *getSrc() const { return const_cast<Value*>(getArgOperand(1)); }
  824     static bool classof(const Value *V) {
  845     Value *getStep() const;
  853     static bool classof(const Value *V) {
  864     static bool classof(const Value *V) {
  877     Value *getTargetValue() const {
  878       return cast<Value>(const_cast<Value *>(getArgOperand(2)));
include/llvm/IR/LegacyPassManagers.h
  118   Value *V;
  124   PassManagerPrettyStackEntry(Pass *p, Value &v)
include/llvm/IR/Metadata.h
  173 class MetadataAsValue : public Value {
  192   static bool classof(const Value *V) {
  342   Value *V;
  350   ValueAsMetadata(unsigned ID, Value *V)
  358   static ValueAsMetadata *get(Value *V);
  360   static ConstantAsMetadata *getConstant(Value *C) {
  364   static LocalAsMetadata *getLocal(Value *Local) {
  368   static ValueAsMetadata *getIfExists(Value *V);
  370   static ConstantAsMetadata *getConstantIfExists(Value *C) {
  374   static LocalAsMetadata *getLocalIfExists(Value *Local) {
  378   Value *getValue() const { return V; }
  382   static void handleDeletion(Value *V);
  383   static void handleRAUW(Value *From, Value *To);
  383   static void handleRAUW(Value *From, Value *To);
  429   LocalAsMetadata(Value *Local)
  435   static LocalAsMetadata *get(Value *Local) {
  439   static LocalAsMetadata *getIfExists(Value *Local) {
include/llvm/IR/ModuleSlotTracker.h
   74   int getLocalSlot(const Value *V);
include/llvm/IR/NoFolder.h
  227                                    ArrayRef<Value *> IdxList) const {
  245                                            ArrayRef<Value *> IdxList) const {
include/llvm/IR/Operator.h
   48   static unsigned getOpcode(const Value *V) {
   58   static bool classof(const Value *V) {
  111   static bool classof(const Value *V) {
  152   static bool classof(const Value *V) {
  372   static bool classof(const Value *V) {
  415   static bool classof(const Value *V) {
  482   Value *getPointerOperand() {
  485   const Value *getPointerOperand() const {
  560   Value *getPointerOperand() {
  563   const Value *getPointerOperand() const {
include/llvm/IR/PatternMatch.h
   47 template <typename Val, typename Pattern> bool match(Val *V, const Pattern &P) {
   56   template <typename OpTy> bool match(OpTy *V) {
   66   template <typename ITy> bool match(ITy *V) { return isa<Class>(V); }
   66   template <typename ITy> bool match(ITy *V) { return isa<Class>(V); }
   70 inline class_match<Value> m_Value() { return class_match<Value>(); }
  102   template <typename ITy> bool match(ITy *V) { return !M.match(V); }
  117   template <typename ITy> bool match(ITy *V) {
  132   template <typename ITy> bool match(ITy *V) {
  157   template <typename ITy> bool match(ITy *V) {
  177   template <typename ITy> bool match(ITy *V) {
  201   template <typename ITy> bool match(ITy *V) {
  224   template <typename ITy> bool match(ITy *V) {
  261   template <typename ITy> bool match(ITy *V) {
  283   template <typename ITy> bool match(ITy *V) {
  396   template <typename ITy> bool match(ITy *V) {
  540   Class *&VR;
  542   bind_ty(Class *&V) : VR(V) {}
  544   template <typename ITy> bool match(ITy *V) {
  545     if (auto *CV = dyn_cast<Class>(V)) {
  545     if (auto *CV = dyn_cast<Class>(V)) {
  554 inline bind_ty<Value> m_Value(Value *&V) { return V; }
  554 inline bind_ty<Value> m_Value(Value *&V) { return V; }
  555 inline bind_ty<const Value> m_Value(const Value *&V) { return V; }
  555 inline bind_ty<const Value> m_Value(const Value *&V) { return V; }
  579   const Value *Val;
  581   specificval_ty(const Value *V) : Val(V) {}
  583   template <typename ITy> bool match(ITy *V) { return V == Val; }
  587 inline specificval_ty m_Specific(const Value *V) { return V; }
  592   Class *const &Val;
  594   deferredval_ty(Class *const &V) : Val(V) {}
  596   template <typename ITy> bool match(ITy *const V) { return V == Val; }
  600 inline deferredval_ty<Value> m_Deferred(Value *const &V) { return V; }
  600 inline deferredval_ty<Value> m_Deferred(Value *const &V) { return V; }
  601 inline deferredval_ty<const Value> m_Deferred(const Value *const &V) {
  601 inline deferredval_ty<const Value> m_Deferred(const Value *const &V) {
  612   template <typename ITy> bool match(ITy *V) {
  635   template <typename ITy> bool match(ITy *V) {
  652   template <typename ITy> bool match(ITy *V) {
  714   template <typename OpTy> bool match(OpTy *V) {
  742   template <typename OpTy> bool match(OpTy *V) {
  743     if (V->getValueID() == Value::InstructionVal + Opcode) {
  786   template <typename OpTy> bool match(OpTy *V) {
  918   template <typename OpTy> bool match(OpTy *V) {
 1010   template <typename OpTy> bool match(OpTy *V) {
 1105   template <typename OpTy> bool match(OpTy *V) {
 1132   template <typename OpTy> bool match(OpTy *V) {
 1172   template <typename OpTy> bool match(OpTy *V) {
 1173     if (V->getValueID() == Value::InstructionVal + Opcode) {
 1188   template <typename OpTy> bool match(OpTy *V) {
 1189     if (V->getValueID() == Value::InstructionVal + Opcode) {
 1207   template <typename OpTy> bool match(OpTy *V) {
 1208     if (V->getValueID() == Value::InstructionVal + Opcode) {
 1279   template <typename OpTy> bool match(OpTy *V) {
 1404   template <typename OpTy> bool match(OpTy *V) {
 1439   template <typename OpTy> bool match(OpTy *V) {
 1449     Value *TrueVal = SI->getTrueValue();
 1450     Value *FalseVal = SI->getFalseValue();
 1451     Value *LHS = Cmp->getOperand(0);
 1452     Value *RHS = Cmp->getOperand(1);
 1621     Value *ICmpLHS, *ICmpRHS;
 1626     Value *AddLHS, *AddRHS;
 1673   template <typename OpTy> bool match(OpTy *V) {
 1693   template <typename OpTy> bool match(OpTy *V) {
 1904   template <typename OpTy> bool match(OpTy *V) {
 1910     Value *OpL = nullptr, *OpR = nullptr;
include/llvm/IR/Statepoint.h
   59 bool isStatepoint(const Value *V);
   60 bool isStatepoint(const Value &V);
   63 bool isGCRelocate(const Value *V);
   66 bool isGCResult(const Value *V);
  119     const Value *IDVal = getCall()->getArgOperand(IDPos);
  125     const Value *NumPatchBytesVal = getCall()->getArgOperand(NumPatchBytesPos);
  133   ValueTy *getCalledValue() const {
  165     const Value *NumCallArgsVal = getCall()->getArgOperand(NumCallArgsPos);
  180   ValueTy *getArgument(unsigned Index) {
  199     const Value *NumGCTransitionArgs = *arg_end();
  221     const Value *NumVMSArgs = *gc_transition_args_end();
  293     : public StatepointBase<const Function, const Instruction, const Value,
  295   using Base = StatepointBase<const Function, const Instruction, const Value,
  306     : public StatepointBase<Function, Instruction, Value, CallBase> {
  307   using Base = StatepointBase<Function, Instruction, Value, CallBase>;
  323   static bool classof(const Value *V) {
  330     const Value *Token = getArgOperand(0);
  337     const Value *Token = getArgOperand(0);
  366   static bool classof(const Value *V) {
  383   Value *getBasePtr() const {
  387   Value *getDerivedPtr() const {
  399   static bool classof(const Value *V) {
include/llvm/IR/TypeFinder.h
   33   DenseSet<const Value*> VisitedConstants;
   72   void incorporateValue(const Value *V);
include/llvm/IR/Use.h
  106   operator Value *() const { return Val; }
  107   Value *get() const { return Val; }
  115   inline void set(Value *Val);
  117   inline Value *operator=(Value *RHS);
  117   inline Value *operator=(Value *RHS);
  120   Value *operator->() { return Val; }
  121   const Value *operator->() const { return Val; }
  141   Value *Val = nullptr;
  166   using SimpleType = Value *;
  171   using SimpleType = /*const*/ Value *;
include/llvm/IR/UseListOrder.h
   27   const Value *V = nullptr;
   31   UseListOrder(const Value *V, const Function *F, size_t ShuffleSize)
include/llvm/IR/User.h
   44 class User : public Value {
  169   Value *getOperand(unsigned i) const {
  174   void setOperand(unsigned i, Value *Val) {
  247                               std::random_access_iterator_tag, Value *,
  248                               ptrdiff_t, Value *, Value *> {
  248                               ptrdiff_t, Value *, Value *> {
  251     Value *operator*() const { return *I; }
  252     Value *operator->() const { return operator*(); }
  267                               std::random_access_iterator_tag, const Value *,
  268                               ptrdiff_t, const Value *, const Value *> {
  268                               ptrdiff_t, const Value *, const Value *> {
  272     const Value *operator*() const { return *I; }
  273     const Value *operator->() const { return operator*(); }
  303   void replaceUsesOfWith(Value *From, Value *To);
  303   void replaceUsesOfWith(Value *From, Value *To);
  306   static bool classof(const Value *V) {
  318   using SimpleType = Value*;
  325   using SimpleType = /*const*/ Value*;
include/llvm/IR/Value.h
   55 using ValueName = StringMapEntry<Value *>;
  216   Value(const Value &) = delete;
  217   Value &operator=(const Value &) = delete;
  217   Value &operator=(const Value &) = delete;
  259   void doRAUW(Value *New, ReplaceMetadataUses);
  282   void takeName(Value *V);
  289   void replaceAllUsesWith(Value *V);
  295   void replaceNonMetadataUsesWith(Value *V);
  301   void replaceUsesWithIf(Value *New,
  321   void replaceUsesOutsideBlock(Value *V, BasicBlock *BB);
  501   bool hasSameSubclassOptionalData(const Value *V) const {
  521   const Value *stripPointerCasts() const;
  522   Value *stripPointerCasts() {
  531   const Value *stripPointerCastsAndAliases() const;
  532   Value *stripPointerCastsAndAliases() {
  542   const Value *stripPointerCastsSameRepresentation() const;
  543   Value *stripPointerCastsSameRepresentation() {
  553   const Value *stripPointerCastsAndInvariantGroups() const;
  554   Value *stripPointerCastsAndInvariantGroups() {
  563   const Value *stripInBoundsConstantOffsets() const;
  564   Value *stripInBoundsConstantOffsets() {
  590   const Value *stripAndAccumulateConstantOffsets(const DataLayout &DL,
  593   Value *stripAndAccumulateConstantOffsets(const DataLayout &DL, APInt &Offset,
  602   const Value *stripAndAccumulateInBoundsConstantOffsets(const DataLayout &DL,
  607   Value *stripAndAccumulateInBoundsConstantOffsets(const DataLayout &DL,
  617   const Value *stripInBoundsOffsets() const;
  618   Value *stripInBoundsOffsets() {
  643   const Value *DoPHITranslation(const BasicBlock *CurBB,
  645   Value *DoPHITranslation(const BasicBlock *CurBB, const BasicBlock *PredBB) {
  718 struct ValueDeleter { void operator()(Value *V) { V->deleteValue(); } };
  723 using unique_value = std::unique_ptr<Value, ValueDeleter>;
  725 inline raw_ostream &operator<<(raw_ostream &OS, const Value &V) {
  730 void Use::set(Value *V) {
  736 Value *Use::operator=(Value *RHS) {
  736 Value *Use::operator=(Value *RHS) {
  817   static inline bool doit(const Value &Val) {
  818     static_assert(Value::ConstantFirstVal == 0, "Val.getValueID() >= Value::ConstantFirstVal");
  819     return Val.getValueID() <= Value::ConstantLastVal;
  824   static inline bool doit(const Value &Val) {
  825     return Val.getValueID() >= Value::ConstantDataFirstVal &&
  826            Val.getValueID() <= Value::ConstantDataLastVal;
  831   static inline bool doit(const Value &Val) {
  832     return Val.getValueID() >= Value::ConstantAggregateFirstVal &&
  833            Val.getValueID() <= Value::ConstantAggregateLastVal;
  838   static inline bool doit (const Value &Val) {
  839     return Val.getValueID() == Value::ArgumentVal;
  844   static inline bool doit(const Value &Val) {
  845     return Val.getValueID() == Value::InlineAsmVal;
  850   static inline bool doit(const Value &Val) {
  851     return Val.getValueID() >= Value::InstructionVal;
  856   static inline bool doit(const Value &Val) {
  857     return Val.getValueID() == Value::BasicBlockVal;
  862   static inline bool doit(const Value &Val) {
  863     return Val.getValueID() == Value::FunctionVal;
  868   static inline bool doit(const Value &Val) {
  869     return Val.getValueID() == Value::GlobalVariableVal;
  874   static inline bool doit(const Value &Val) {
  875     return Val.getValueID() == Value::GlobalAliasVal;
  880   static inline bool doit(const Value &Val) {
  881     return Val.getValueID() == Value::GlobalIFuncVal;
  886   static inline bool doit(const Value &Val) {
  892   static inline bool doit(const Value &Val) {
  898   static inline bool doit(const Value &Val) {
  907 inline Value **unwrap(LLVMValueRef *Vals) {
  921 inline LLVMValueRef *wrap(const Value **Vals) {
include/llvm/IR/ValueHandle.h
   51   Value *Val = nullptr;
   53   void setValPtr(Value *V) { Val = V; }
   58   ValueHandleBase(HandleBaseKind Kind, Value *V)
   69   Value *operator=(Value *RHS) {
   69   Value *operator=(Value *RHS) {
   80   Value *operator=(const ValueHandleBase &RHS) {
   91   Value *operator->() const { return getValPtr(); }
   92   Value &operator*() const { return *getValPtr(); }
   95   Value *getValPtr() const { return Val; }
   97   static bool isValid(Value *V) {
   99            V != DenseMapInfo<Value *>::getEmptyKey() &&
  100            V != DenseMapInfo<Value *>::getTombstoneKey();
  114   static void ValueIsDeleted(Value *V);
  115   static void ValueIsRAUWd(Value *Old, Value *New);
  115   static void ValueIsRAUWd(Value *Old, Value *New);
  143   WeakVH(Value *P) : ValueHandleBase(Weak, P) {}
  149   Value *operator=(Value *RHS) {
  149   Value *operator=(Value *RHS) {
  152   Value *operator=(const ValueHandleBase &RHS) {
  156   operator Value*() const {
  164   using SimpleType = Value *;
  169   using SimpleType = Value *;
  184   WeakTrackingVH(Value *P) : ValueHandleBase(WeakTracking, P) {}
  190   Value *operator=(Value *RHS) {
  190   Value *operator=(Value *RHS) {
  193   Value *operator=(const ValueHandleBase &RHS) {
  197   operator Value*() const {
  209   using SimpleType = Value *;
  214   using SimpleType = Value *;
  245   Value *getRawValPtr() const { return ValueHandleBase::getValPtr(); }
  246   void setRawValPtr(Value *P) { ValueHandleBase::operator=(P); }
  253   static Value *GetAsValue(Value *V) { return V; }
  253   static Value *GetAsValue(Value *V) { return V; }
  254   static Value *GetAsValue(const Value *V) { return const_cast<Value*>(V); }
  254   static Value *GetAsValue(const Value *V) { return const_cast<Value*>(V); }
  256   ValueTy *getValPtr() const { return static_cast<ValueTy *>(getRawValPtr()); }
  257   void setValPtr(ValueTy *P) { setRawValPtr(GetAsValue(P)); }
  262   AssertingVH(ValueTy *P) : ValueHandleBase(Assert, GetAsValue(P)) {}
  269   operator ValueTy*() const {
  273   ValueTy *operator=(ValueTy *RHS) {
  273   ValueTy *operator=(ValueTy *RHS) {
  277   ValueTy *operator=(const AssertingVH<ValueTy> &RHS) {
  277   ValueTy *operator=(const AssertingVH<ValueTy> &RHS) {
  282   ValueTy *operator->() const { return getValPtr(); }
  283   ValueTy &operator*() const { return *getValPtr(); }
  289   static inline AssertingVH<T> getEmptyKey() {
  290     AssertingVH<T> Res;
  291     Res.setRawValPtr(DenseMapInfo<Value *>::getEmptyKey());
  295   static inline AssertingVH<T> getTombstoneKey() {
  296     AssertingVH<T> Res;
  297     Res.setRawValPtr(DenseMapInfo<Value *>::getTombstoneKey());
  301   static unsigned getHashValue(const AssertingVH<T> &Val) {
  302     return DenseMapInfo<Value *>::getHashValue(Val.getRawValPtr());
  305   static bool isEqual(const AssertingVH<T> &LHS, const AssertingVH<T> &RHS) {
  305   static bool isEqual(const AssertingVH<T> &LHS, const AssertingVH<T> &RHS) {
  306     return DenseMapInfo<Value *>::isEqual(LHS.getRawValPtr(),
  331   ValueTy *getValPtr() const {
  341     return cast<ValueTy>(InnerHandle);
  344   void setValPtr(ValueTy *P) {
  352   static Value *GetAsValue(Value *V) { return V; }
  352   static Value *GetAsValue(Value *V) { return V; }
  353   static Value *GetAsValue(const Value *V) { return const_cast<Value*>(V); }
  353   static Value *GetAsValue(const Value *V) { return const_cast<Value*>(V); }
  357   TrackingVH(ValueTy *P) { setValPtr(P); }
  359   operator ValueTy*() const {
  363   ValueTy *operator=(ValueTy *RHS) {
  363   ValueTy *operator=(ValueTy *RHS) {
  368   ValueTy *operator->() const { return getValPtr(); }
  369   ValueTy &operator*() const { return *getValPtr(); }
  386   void setValPtr(Value *P) {
  392   CallbackVH(Value *P) : ValueHandleBase(Callback, P) {}
  394   operator Value*() const {
  418   virtual void allUsesReplacedWith(Value *) {}
  448   static Value *GetAsValue(Value *V) { return V; }
  448   static Value *GetAsValue(Value *V) { return V; }
  449   static Value *GetAsValue(const Value *V) { return const_cast<Value *>(V); }
  449   static Value *GetAsValue(const Value *V) { return const_cast<Value *>(V); }
  460   Value *getRawValPtr() const { return ValueHandleBase::getValPtr(); }
  461   void setRawValPtr(Value *P) { ValueHandleBase::operator=(P); }
  471   void allUsesReplacedWith(Value *) override {
  483   ValueTy *getValPtr() const {
  487   void setValPtr(ValueTy *P) { setRawValPtr(GetAsValue(P)); }
  492   PoisoningVH(ValueTy *P) : CallbackVH(GetAsValue(P)) {}
  512   operator ValueTy *() const { return getValPtr(); }
  514   ValueTy *operator->() const { return getValPtr(); }
  515   ValueTy &operator*() const { return *getValPtr(); }
  520   static inline PoisoningVH<T> getEmptyKey() {
  522     Res.setRawValPtr(DenseMapInfo<Value *>::getEmptyKey());
  526   static inline PoisoningVH<T> getTombstoneKey() {
  528     Res.setRawValPtr(DenseMapInfo<Value *>::getTombstoneKey());
  532   static unsigned getHashValue(const PoisoningVH<T> &Val) {
  533     return DenseMapInfo<Value *>::getHashValue(Val.getRawValPtr());
  536   static bool isEqual(const PoisoningVH<T> &LHS, const PoisoningVH<T> &RHS) {
  536   static bool isEqual(const PoisoningVH<T> &LHS, const PoisoningVH<T> &RHS) {
  537     return DenseMapInfo<Value *>::isEqual(LHS.getRawValPtr(),
include/llvm/IR/ValueMap.h
  255   ValueMapCallbackVH(Value *V) : CallbackVH(V), Map(nullptr) {}
  271   void allUsesReplacedWith(Value *new_key) override {
  302     return VH(DenseMapInfo<Value *>::getEmptyKey());
  306     return VH(DenseMapInfo<Value *>::getTombstoneKey());
include/llvm/IR/ValueSymbolTable.h
   51   using ValueMap = StringMap<Value*>;
   74   Value *lookup(StringRef Name) const { return vmap.lookup(Name); }
  108   ValueName *makeUniqueName(Value *V, SmallString<256> &UniqueName);
  114   void reinsertValue(Value *V);
  119   ValueName *createValueName(StringRef Name, Value *V);
include/llvm/Support/Casting.h
   34   using SimpleType = From; // The real type this represents...
   37   static SimpleType &getSimplifiedValue(From &Val) { return Val; }
   41   using NonConstSimpleType = typename simplify_type<From>::SimpleType;
   47   static RetType getSimplifiedValue(const From& Val) {
   57   static inline bool doit(const From &Val) {
   66   static inline bool doit(const From &) { return true; }
   76   static inline bool doit(const From &Val) {
   77     return isa_impl<To, From>::doit(Val);
   90   static inline bool doit(const From *Val) {
   92     return isa_impl<To, From>::doit(*Val);
   92     return isa_impl<To, From>::doit(*Val);
  104   static inline bool doit(const From *Val) {
  106     return isa_impl<To, From>::doit(*Val);
  106     return isa_impl<To, From>::doit(*Val);
  122     return isa_impl_wrap<To, SimpleFrom,
  132     return isa_impl_cl<To,FromTy>::doit(Val);
  141 template <class X, class Y> LLVM_NODISCARD inline bool isa(const Y &Val) {
  142   return isa_impl_wrap<X, const Y,
  142   return isa_impl_wrap<X, const Y,
  143                        typename simplify_type<const Y>::SimpleType>::doit(Val);
  172   using ret_type = To *;       // Pointer arg case, return Ty*
  176   using ret_type = const To *; // Constant pointer arg case, return const Ty*
  198   using ret_type = typename cast_retty<To, SimpleFrom>::ret_type;
  204   using ret_type = typename cast_retty_impl<To,FromTy>::ret_type;
  204   using ret_type = typename cast_retty_impl<To,FromTy>::ret_type;
  210       To, From, typename simplify_type<From>::SimpleType>::ret_type;
  210       To, From, typename simplify_type<From>::SimpleType>::ret_type;
  210       To, From, typename simplify_type<From>::SimpleType>::ret_type;
  218   static typename cast_retty<To, From>::ret_type doit(From &Val) {
  219     return cast_convert_val<To, SimpleFrom,
  227   static typename cast_retty<To, FromTy>::ret_type doit(const FromTy &Val) {
  227   static typename cast_retty<To, FromTy>::ret_type doit(const FromTy &Val) {
  227   static typename cast_retty<To, FromTy>::ret_type doit(const FromTy &Val) {
  228     typename cast_retty<To, FromTy>::ret_type Res2
  228     typename cast_retty<To, FromTy>::ret_type Res2
  236       std::is_same<X, typename simplify_type<X>::SimpleType>::value;
  236       std::is_same<X, typename simplify_type<X>::SimpleType>::value;
  248                                typename cast_retty<X, const Y>::ret_type>::type
  252       X, const Y, typename simplify_type<const Y>::SimpleType>::doit(Val);
  256 inline typename cast_retty<X, Y>::ret_type cast(Y &Val) {
  256 inline typename cast_retty<X, Y>::ret_type cast(Y &Val) {
  256 inline typename cast_retty<X, Y>::ret_type cast(Y &Val) {
  258   return cast_convert_val<X, Y,
  258   return cast_convert_val<X, Y,
  259                           typename simplify_type<Y>::SimpleType>::doit(Val);
  263 inline typename cast_retty<X, Y *>::ret_type cast(Y *Val) {
  263 inline typename cast_retty<X, Y *>::ret_type cast(Y *Val) {
  263 inline typename cast_retty<X, Y *>::ret_type cast(Y *Val) {
  265   return cast_convert_val<X, Y*,
  265   return cast_convert_val<X, Y*,
  266                           typename simplify_type<Y*>::SimpleType>::doit(Val);
  305 LLVM_NODISCARD inline typename cast_retty<X, Y *>::ret_type
  305 LLVM_NODISCARD inline typename cast_retty<X, Y *>::ret_type
  306 cast_or_null(Y *Val) {
  309   return cast<X>(Val);
  337 LLVM_NODISCARD inline typename cast_retty<X, Y>::ret_type dyn_cast(Y &Val) {
  342 LLVM_NODISCARD inline typename cast_retty<X, Y *>::ret_type dyn_cast(Y *Val) {
  342 LLVM_NODISCARD inline typename cast_retty<X, Y *>::ret_type dyn_cast(Y *Val) {
  342 LLVM_NODISCARD inline typename cast_retty<X, Y *>::ret_type dyn_cast(Y *Val) {
  343   return isa<X>(Val) ? cast<X>(Val) : nullptr;
  343   return isa<X>(Val) ? cast<X>(Val) : nullptr;
  366 LLVM_NODISCARD inline typename cast_retty<X, Y *>::ret_type
  367 dyn_cast_or_null(Y *Val) {
include/llvm/Support/PointerLikeTypeTraits.h
   56   static inline void *getAsVoidPointer(T *P) { return P; }
   57   static inline T *getFromVoidPointer(void *P) { return static_cast<T *>(P); }
   59   enum { NumLowBitsAvailable = detail::ConstantLog2<alignof(T)>::value };
   91   typedef PointerLikeTypeTraits<T *> NonConst;
   93   static inline const void *getAsVoidPointer(const T *P) {
   96   static inline const T *getFromVoidPointer(const void *P) {
include/llvm/Support/type_traits.h
   55 struct add_const_past_pointer { using type = const T; };
include/llvm/Transforms/IPO/Attributor.h
  165   static const IRPosition value(const Value &V) {
  257   Value &getAnchorValue() {
  262   const Value &getAnchorValue() const {
  275     Value &V = getAnchorValue();
  325     Value &V = getAnchorValue();
  343     Value &V = getAnchorValue();
  362   Value &getAssociatedValue() {
  370   const Value &getAssociatedValue() const {
  497   explicit IRPosition(Value &AnchorVal, Kind PK)
  506   Value *AnchorVal;
  519     return (DenseMapInfo<Value *>::getHashValue(&IRP.getAnchorValue()) << 4) ^
  859       const function_ref<bool(Value &, const SmallSetVector<ReturnInst *, 4> &)>
  867   bool checkForAllReturnedValues(const function_ref<bool(Value &)> &Pred,
 1538   Optional<Value *> getAssumedUniqueReturnValue(Attributor &A) const;
 1549       const function_ref<bool(Value &, const SmallSetVector<ReturnInst *, 4> &)>
 1553       MapVector<Value *, SmallSetVector<ReturnInst *, 4>>::iterator;
 1555       MapVector<Value *, SmallSetVector<ReturnInst *, 4>>::const_iterator;
 1967   virtual Optional<Value *> getAssumedSimplifiedValue(Attributor &A) const = 0;
include/llvm/Transforms/IPO/DeadArgumentElimination.h
  128   Liveness SurveyUses(const Value *V, UseVector &MaybeLiveUses);
include/llvm/Transforms/IPO/GlobalDCE.h
   65   void ComputeDependencies(Value *V, SmallPtrSetImpl<GlobalValue *> &U);
include/llvm/Transforms/InstCombine/InstCombineWorklist.h
   47   void AddValue(Value *V) {
include/llvm/Transforms/Scalar/AlignmentFromAssumptions.h
   38   bool extractAlignmentInfo(CallInst *I, Value *&AAPtr, const SCEV *&AlignSCEV,
include/llvm/Transforms/Scalar/Float2Int.h
   42   Value *convert(Instruction *I, Type *ToTy);
   48   MapVector<Instruction *, Value *> ConvertedInsts;
include/llvm/Transforms/Scalar/GVN.h
   90     DenseMap<Value *, uint32_t> valueNumbering;
  118                              Value *LHS, Value *RHS);
  118                              Value *LHS, Value *RHS);
  134     uint32_t lookupOrAdd(Value *V);
  135     uint32_t lookup(Value *V, bool Verify = true) const;
  137                             Value *LHS, Value *RHS);
  137                             Value *LHS, Value *RHS);
  141     bool exists(Value *V) const;
  142     void add(Value *V, uint32_t num);
  144     void erase(Value *v);
  150     void verifyRemoved(const Value *) const;
  171     Value *Val;
  181   SmallMapVector<Value *, Value *, 4> ReplaceOperandsWithMap;
  181   SmallMapVector<Value *, Value *, 4> ReplaceOperandsWithMap;
  203   void addToLeaderTable(uint32_t N, Value *V, const BasicBlock *BB) {
  259                                Value *Address, gvn::AvailableValue &Res);
  274   void dump(DenseMap<uint32_t, Value *> &d) const;
  280   Value *findLeader(const BasicBlock *BB, uint32_t num);
  287   bool propagateEquality(Value *LHS, Value *RHS, const BasicBlockEdge &Root,
  287   bool propagateEquality(Value *LHS, Value *RHS, const BasicBlockEdge &Root,
include/llvm/Transforms/Scalar/GVNExpression.h
  138   using RecyclerType = ArrayRecycler<Value *>;
  141   Value **Operands = nullptr;
  167   Value *getOperand(unsigned N) const {
  173   void setOperand(unsigned N, Value *V) {
  181   using op_iterator = Value **;
  182   using const_op_iterator = Value *const *;
  195   void op_push_back(Value *Arg) {
  254   op_inserter &operator=(Value *val) {
  375   Value *StoredValue;
  378   StoreExpression(unsigned NumOperands, StoreInst *S, Value *StoredValue,
  392   Value *getStoredValue() const { return StoredValue; }
  551   Value *VariableValue;
  554   VariableExpression(Value *V) : Expression(ET_Variable), VariableValue(V) {}
  563   Value *getVariableValue() const { return VariableValue; }
  564   void setVariableValue(Value *V) { VariableValue = V; }
include/llvm/Transforms/Scalar/JumpThreading.h
  118       Value *V, BasicBlock *BB, jumpthreading::PredValueInfo &Result,
  120       DenseSet<std::pair<Value *, BasicBlock *>> &RecursionSet,
  123   ComputeValueKnownInPredecessors(Value *V, BasicBlock *BB,
  127     DenseSet<std::pair<Value *, BasicBlock *>> RecursionSet;
  132   bool ProcessThreadableEdges(Value *Cond, BasicBlock *BB,
include/llvm/Transforms/Scalar/MemCpyOptimizer.h
   64   bool performCallSlotOptzn(Instruction *cpy, Value *cpyDst, Value *cpySrc,
   64   bool performCallSlotOptzn(Instruction *cpy, Value *cpyDst, Value *cpySrc,
   70   Instruction *tryMergingIntoMemset(Instruction *I, Value *StartPtr,
   71                                     Value *ByteVal);
include/llvm/Transforms/Scalar/NaryReassociate.h
  135                                               unsigned I, Value *LHS,
  136                                               Value *RHS, Type *IndexedType);
  143   Instruction *tryReassociateBinaryOp(Value *LHS, Value *RHS,
  143   Instruction *tryReassociateBinaryOp(Value *LHS, Value *RHS,
  146   Instruction *tryReassociatedBinaryOp(const SCEV *LHS, Value *RHS,
  150   bool matchTernaryOp(BinaryOperator *I, Value *V, Value *&Op1, Value *&Op2);
  150   bool matchTernaryOp(BinaryOperator *I, Value *V, Value *&Op1, Value *&Op2);
  150   bool matchTernaryOp(BinaryOperator *I, Value *V, Value *&Op1, Value *&Op2);
  165   bool requiresSignExtension(Value *Index, GetElementPtrInst *GEP);
include/llvm/Transforms/Scalar/Reassociate.h
   48   Value *Op;
   50   ValueEntry(unsigned R, Value *O) : Rank(R), Op(O) {}
   60   Value *Base;
   63   Factor(Value *Base, unsigned Power) : Base(Base), Power(Power) {}
   78   DenseMap<AssertingVH<Value>, unsigned> ValueRankMap;
   92   DenseMap<std::pair<Value *, Value *>, PairMapValue> PairMap[NumBinaryOps];
   92   DenseMap<std::pair<Value *, Value *>, PairMapValue> PairMap[NumBinaryOps];
  101   unsigned getRank(Value *V);
  106   Value *OptimizeExpression(BinaryOperator *I,
  108   Value *OptimizeAdd(Instruction *I,
  110   Value *OptimizeXor(Instruction *I,
  113                       APInt &ConstOpnd, Value *&Res);
  116                       Value *&Res);
  117   Value *buildMinimalMultiplyDAG(IRBuilder<> &Builder,
  119   Value *OptimizeMul(BinaryOperator *I,
  121   Value *RemoveFactorFromExpression(Value *V, Value *Factor);
  121   Value *RemoveFactorFromExpression(Value *V, Value *Factor);
  121   Value *RemoveFactorFromExpression(Value *V, Value *Factor);
  126                                                Value *OtherOp);
include/llvm/Transforms/Utils/BasicBlockUtils.h
  100                           BasicBlock::iterator &BI, Value *V);
  301 Instruction *SplitBlockAndInsertIfThen(Value *Cond, Instruction *SplitBefore,
  322 void SplitBlockAndInsertIfThenElse(Value *Cond, Instruction *SplitBefore,
  335 Value *GetIfCondition(BasicBlock *BB, BasicBlock *&IfTrue,
include/llvm/Transforms/Utils/BuildLibCalls.h
   45   Value *castToCStr(Value *V, IRBuilder<> &B);
   45   Value *castToCStr(Value *V, IRBuilder<> &B);
   50   Value *emitStrLen(Value *Ptr, IRBuilder<> &B, const DataLayout &DL,
   50   Value *emitStrLen(Value *Ptr, IRBuilder<> &B, const DataLayout &DL,
   56   Value *emitStrDup(Value *Ptr, IRBuilder<> &B, const TargetLibraryInfo *TLI);
   56   Value *emitStrDup(Value *Ptr, IRBuilder<> &B, const TargetLibraryInfo *TLI);
   61   Value *emitStrNLen(Value *Ptr, Value *MaxLen, IRBuilder<> &B,
   61   Value *emitStrNLen(Value *Ptr, Value *MaxLen, IRBuilder<> &B,
   61   Value *emitStrNLen(Value *Ptr, Value *MaxLen, IRBuilder<> &B,
   67   Value *emitStrChr(Value *Ptr, char C, IRBuilder<> &B,
   67   Value *emitStrChr(Value *Ptr, char C, IRBuilder<> &B,
   71   Value *emitStrNCmp(Value *Ptr1, Value *Ptr2, Value *Len, IRBuilder<> &B,
   71   Value *emitStrNCmp(Value *Ptr1, Value *Ptr2, Value *Len, IRBuilder<> &B,
   71   Value *emitStrNCmp(Value *Ptr1, Value *Ptr2, Value *Len, IRBuilder<> &B,
   71   Value *emitStrNCmp(Value *Ptr1, Value *Ptr2, Value *Len, IRBuilder<> &B,
   76   Value *emitStrCpy(Value *Dst, Value *Src, IRBuilder<> &B,
   76   Value *emitStrCpy(Value *Dst, Value *Src, IRBuilder<> &B,
   76   Value *emitStrCpy(Value *Dst, Value *Src, IRBuilder<> &B,
   81   Value *emitStpCpy(Value *Dst, Value *Src, IRBuilder<> &B,
   81   Value *emitStpCpy(Value *Dst, Value *Src, IRBuilder<> &B,
   81   Value *emitStpCpy(Value *Dst, Value *Src, IRBuilder<> &B,
   86   Value *emitStrNCpy(Value *Dst, Value *Src, Value *Len, IRBuilder<> &B,
   86   Value *emitStrNCpy(Value *Dst, Value *Src, Value *Len, IRBuilder<> &B,
   86   Value *emitStrNCpy(Value *Dst, Value *Src, Value *Len, IRBuilder<> &B,
   86   Value *emitStrNCpy(Value *Dst, Value *Src, Value *Len, IRBuilder<> &B,
   91   Value *emitStpNCpy(Value *Dst, Value *Src, Value *Len, IRBuilder<> &B,
   91   Value *emitStpNCpy(Value *Dst, Value *Src, Value *Len, IRBuilder<> &B,
   91   Value *emitStpNCpy(Value *Dst, Value *Src, Value *Len, IRBuilder<> &B,
   91   Value *emitStpNCpy(Value *Dst, Value *Src, Value *Len, IRBuilder<> &B,
   96   Value *emitMemCpyChk(Value *Dst, Value *Src, Value *Len, Value *ObjSize,
   96   Value *emitMemCpyChk(Value *Dst, Value *Src, Value *Len, Value *ObjSize,
   96   Value *emitMemCpyChk(Value *Dst, Value *Src, Value *Len, Value *ObjSize,
   96   Value *emitMemCpyChk(Value *Dst, Value *Src, Value *Len, Value *ObjSize,
   96   Value *emitMemCpyChk(Value *Dst, Value *Src, Value *Len, Value *ObjSize,
  102   Value *emitMemChr(Value *Ptr, Value *Val, Value *Len, IRBuilder<> &B,
  102   Value *emitMemChr(Value *Ptr, Value *Val, Value *Len, IRBuilder<> &B,
  102   Value *emitMemChr(Value *Ptr, Value *Val, Value *Len, IRBuilder<> &B,
  102   Value *emitMemChr(Value *Ptr, Value *Val, Value *Len, IRBuilder<> &B,
  106   Value *emitMemCmp(Value *Ptr1, Value *Ptr2, Value *Len, IRBuilder<> &B,
  106   Value *emitMemCmp(Value *Ptr1, Value *Ptr2, Value *Len, IRBuilder<> &B,
  106   Value *emitMemCmp(Value *Ptr1, Value *Ptr2, Value *Len, IRBuilder<> &B,
  106   Value *emitMemCmp(Value *Ptr1, Value *Ptr2, Value *Len, IRBuilder<> &B,
  110   Value *emitBCmp(Value *Ptr1, Value *Ptr2, Value *Len, IRBuilder<> &B,
  110   Value *emitBCmp(Value *Ptr1, Value *Ptr2, Value *Len, IRBuilder<> &B,
  110   Value *emitBCmp(Value *Ptr1, Value *Ptr2, Value *Len, IRBuilder<> &B,
  110   Value *emitBCmp(Value *Ptr1, Value *Ptr2, Value *Len, IRBuilder<> &B,
  114   Value *emitMemCCpy(Value *Ptr1, Value *Ptr2, Value *Val, Value *Len,
  114   Value *emitMemCCpy(Value *Ptr1, Value *Ptr2, Value *Val, Value *Len,
  114   Value *emitMemCCpy(Value *Ptr1, Value *Ptr2, Value *Val, Value *Len,
  114   Value *emitMemCCpy(Value *Ptr1, Value *Ptr2, Value *Val, Value *Len,
  114   Value *emitMemCCpy(Value *Ptr1, Value *Ptr2, Value *Val, Value *Len,
  118   Value *emitSNPrintf(Value *Dest, Value *Size, Value *Fmt,
  118   Value *emitSNPrintf(Value *Dest, Value *Size, Value *Fmt,
  118   Value *emitSNPrintf(Value *Dest, Value *Size, Value *Fmt,
  118   Value *emitSNPrintf(Value *Dest, Value *Size, Value *Fmt,
  119                       ArrayRef<Value *> Args, IRBuilder<> &B,
  123   Value *emitSPrintf(Value *Dest, Value *Fmt, ArrayRef<Value *> VariadicArgs,
  123   Value *emitSPrintf(Value *Dest, Value *Fmt, ArrayRef<Value *> VariadicArgs,
  123   Value *emitSPrintf(Value *Dest, Value *Fmt, ArrayRef<Value *> VariadicArgs,
  123   Value *emitSPrintf(Value *Dest, Value *Fmt, ArrayRef<Value *> VariadicArgs,
  127   Value *emitStrCat(Value *Dest, Value *Src, IRBuilder<> &B,
  127   Value *emitStrCat(Value *Dest, Value *Src, IRBuilder<> &B,
  127   Value *emitStrCat(Value *Dest, Value *Src, IRBuilder<> &B,
  131   Value *emitStrLCpy(Value *Dest, Value *Src, Value *Size, IRBuilder<> &B,
  131   Value *emitStrLCpy(Value *Dest, Value *Src, Value *Size, IRBuilder<> &B,
  131   Value *emitStrLCpy(Value *Dest, Value *Src, Value *Size, IRBuilder<> &B,
  131   Value *emitStrLCpy(Value *Dest, Value *Src, Value *Size, IRBuilder<> &B,
  135   Value *emitStrLCat(Value *Dest, Value *Src, Value *Size, IRBuilder<> &B,
  135   Value *emitStrLCat(Value *Dest, Value *Src, Value *Size, IRBuilder<> &B,
  135   Value *emitStrLCat(Value *Dest, Value *Src, Value *Size, IRBuilder<> &B,
  135   Value *emitStrLCat(Value *Dest, Value *Src, Value *Size, IRBuilder<> &B,
  139   Value *emitStrNCat(Value *Dest, Value *Src, Value *Size, IRBuilder<> &B,
  139   Value *emitStrNCat(Value *Dest, Value *Src, Value *Size, IRBuilder<> &B,
  139   Value *emitStrNCat(Value *Dest, Value *Src, Value *Size, IRBuilder<> &B,
  139   Value *emitStrNCat(Value *Dest, Value *Src, Value *Size, IRBuilder<> &B,
  143   Value *emitVSNPrintf(Value *Dest, Value *Size, Value *Fmt, Value *VAList,
  143   Value *emitVSNPrintf(Value *Dest, Value *Size, Value *Fmt, Value *VAList,
  143   Value *emitVSNPrintf(Value *Dest, Value *Size, Value *Fmt, Value *VAList,
  143   Value *emitVSNPrintf(Value *Dest, Value *Size, Value *Fmt, Value *VAList,
  143   Value *emitVSNPrintf(Value *Dest, Value *Size, Value *Fmt, Value *VAList,
  147   Value *emitVSPrintf(Value *Dest, Value *Fmt, Value *VAList, IRBuilder<> &B,
  147   Value *emitVSPrintf(Value *Dest, Value *Fmt, Value *VAList, IRBuilder<> &B,
  147   Value *emitVSPrintf(Value *Dest, Value *Fmt, Value *VAList, IRBuilder<> &B,
  147   Value *emitVSPrintf(Value *Dest, Value *Fmt, Value *VAList, IRBuilder<> &B,
  154   Value *emitUnaryFloatFnCall(Value *Op, StringRef Name, IRBuilder<> &B,
  154   Value *emitUnaryFloatFnCall(Value *Op, StringRef Name, IRBuilder<> &B,
  159   Value *emitUnaryFloatFnCall(Value *Op, const TargetLibraryInfo *TLI,
  159   Value *emitUnaryFloatFnCall(Value *Op, const TargetLibraryInfo *TLI,
  168   Value *emitBinaryFloatFnCall(Value *Op1, Value *Op2, StringRef Name,
  168   Value *emitBinaryFloatFnCall(Value *Op1, Value *Op2, StringRef Name,
  168   Value *emitBinaryFloatFnCall(Value *Op1, Value *Op2, StringRef Name,
  173   Value *emitBinaryFloatFnCall(Value *Op1, Value *Op2,
  173   Value *emitBinaryFloatFnCall(Value *Op1, Value *Op2,
  173   Value *emitBinaryFloatFnCall(Value *Op1, Value *Op2,
  179   Value *emitPutChar(Value *Char, IRBuilder<> &B, const TargetLibraryInfo *TLI);
  179   Value *emitPutChar(Value *Char, IRBuilder<> &B, const TargetLibraryInfo *TLI);
  182   Value *emitPutS(Value *Str, IRBuilder<> &B, const TargetLibraryInfo *TLI);
  182   Value *emitPutS(Value *Str, IRBuilder<> &B, const TargetLibraryInfo *TLI);
  186   Value *emitFPutC(Value *Char, Value *File, IRBuilder<> &B,
  186   Value *emitFPutC(Value *Char, Value *File, IRBuilder<> &B,
  186   Value *emitFPutC(Value *Char, Value *File, IRBuilder<> &B,
  191   Value *emitFPutCUnlocked(Value *Char, Value *File, IRBuilder<> &B,
  191   Value *emitFPutCUnlocked(Value *Char, Value *File, IRBuilder<> &B,
  191   Value *emitFPutCUnlocked(Value *Char, Value *File, IRBuilder<> &B,
  196   Value *emitFPutS(Value *Str, Value *File, IRBuilder<> &B,
  196   Value *emitFPutS(Value *Str, Value *File, IRBuilder<> &B,
  196   Value *emitFPutS(Value *Str, Value *File, IRBuilder<> &B,
  201   Value *emitFPutSUnlocked(Value *Str, Value *File, IRBuilder<> &B,
  201   Value *emitFPutSUnlocked(Value *Str, Value *File, IRBuilder<> &B,
  201   Value *emitFPutSUnlocked(Value *Str, Value *File, IRBuilder<> &B,
  206   Value *emitFWrite(Value *Ptr, Value *Size, Value *File, IRBuilder<> &B,
  206   Value *emitFWrite(Value *Ptr, Value *Size, Value *File, IRBuilder<> &B,
  206   Value *emitFWrite(Value *Ptr, Value *Size, Value *File, IRBuilder<> &B,
  206   Value *emitFWrite(Value *Ptr, Value *Size, Value *File, IRBuilder<> &B,
  210   Value *emitMalloc(Value *Num, IRBuilder<> &B, const DataLayout &DL,
  210   Value *emitMalloc(Value *Num, IRBuilder<> &B, const DataLayout &DL,
  214   Value *emitCalloc(Value *Num, Value *Size, const AttributeList &Attrs,
  214   Value *emitCalloc(Value *Num, Value *Size, const AttributeList &Attrs,
  214   Value *emitCalloc(Value *Num, Value *Size, const AttributeList &Attrs,
  219   Value *emitFWriteUnlocked(Value *Ptr, Value *Size, Value *N, Value *File,
  219   Value *emitFWriteUnlocked(Value *Ptr, Value *Size, Value *N, Value *File,
  219   Value *emitFWriteUnlocked(Value *Ptr, Value *Size, Value *N, Value *File,
  219   Value *emitFWriteUnlocked(Value *Ptr, Value *Size, Value *N, Value *File,
  219   Value *emitFWriteUnlocked(Value *Ptr, Value *Size, Value *N, Value *File,
  224   Value *emitFGetCUnlocked(Value *File, IRBuilder<> &B,
  224   Value *emitFGetCUnlocked(Value *File, IRBuilder<> &B,
  229   Value *emitFGetSUnlocked(Value *Str, Value *Size, Value *File, IRBuilder<> &B,
  229   Value *emitFGetSUnlocked(Value *Str, Value *Size, Value *File, IRBuilder<> &B,
  229   Value *emitFGetSUnlocked(Value *Str, Value *Size, Value *File, IRBuilder<> &B,
  229   Value *emitFGetSUnlocked(Value *Str, Value *Size, Value *File, IRBuilder<> &B,
  234   Value *emitFReadUnlocked(Value *Ptr, Value *Size, Value *N, Value *File,
  234   Value *emitFReadUnlocked(Value *Ptr, Value *Size, Value *N, Value *File,
  234   Value *emitFReadUnlocked(Value *Ptr, Value *Size, Value *N, Value *File,
  234   Value *emitFReadUnlocked(Value *Ptr, Value *Size, Value *N, Value *File,
  234   Value *emitFReadUnlocked(Value *Ptr, Value *Size, Value *N, Value *File,
include/llvm/Transforms/Utils/BypassSlowDivision.h
   32   AssertingVH<Value> Dividend;
   33   AssertingVH<Value> Divisor;
   37   DivRemMapKey(bool InSignedOp, Value *InDividend, Value *InDivisor)
   37   DivRemMapKey(bool InSignedOp, Value *InDividend, Value *InDivisor)
include/llvm/Transforms/Utils/Cloning.h
  273     const ValueMap<const Value *, WeakTrackingVH> *VMap = nullptr);
include/llvm/Transforms/Utils/CodeExtractor.h
   51   DenseMap<BasicBlock *, DenseSet<Value *>> BaseMemAddrs;
   86     using ValueSet = SetVector<Value *>;
include/llvm/Transforms/Utils/Evaluator.h
   65   Constant *getVal(Value *V) {
   72   void setVal(Value *V, Constant *C) {
   86   Constant *castCallResultIfNeeded(Value *CallExpr, Constant *RV);
  102   std::deque<DenseMap<Value*, Constant*>> ValueStack;
include/llvm/Transforms/Utils/FunctionComparator.h
  246   int cmpValues(const Value *L, const Value *R) const;
  246   int cmpValues(const Value *L, const Value *R) const;
  384   mutable DenseMap<const Value*, int> sn_mapL, sn_mapR;
include/llvm/Transforms/Utils/GlobalStatus.h
   59   Value *StoredOnceValue = nullptr;
   79   static bool analyzeGlobal(const Value *V, GlobalStatus &GS);
include/llvm/Transforms/Utils/Local.h
  144     Value *V, const TargetLibraryInfo *TLI = nullptr,
  260 unsigned getOrEnforceKnownAlignment(Value *V, unsigned PrefAlign,
  267 inline unsigned getKnownAlignment(Value *V, const DataLayout &DL,
  313 TinyPtrVector<DbgVariableIntrinsic *> FindDbgAddrUses(Value *V);
  316 void findDbgValues(SmallVectorImpl<DbgValueInst *> &DbgValues, Value *V);
  319 void findDbgUsers(SmallVectorImpl<DbgVariableIntrinsic *> &DbgInsts, Value *V);
  326 bool replaceDbgDeclare(Value *Address, Value *NewAddress,
  326 bool replaceDbgDeclare(Value *Address, Value *NewAddress,
  336 bool replaceDbgDeclareForAlloca(AllocaInst *AI, Value *NewAllocaAddress,
  345 void replaceDbgValueForAlloca(AllocaInst *AI, Value *NewAllocaAddress,
  349 AllocaInst *findAllocaForValue(Value *V,
  350                                DenseMap<Value *, AllocaInst *> &AllocaForValue);
  383 bool replaceAllDbgUsesWith(Instruction &From, Value &To, Instruction &DomPoint,
  442 void patchReplacementInstruction(Instruction *I, Value *Repl);
  446 unsigned replaceNonLocalUsesWith(Instruction *From, Value *To);
  450 unsigned replaceDominatedUsesWith(Value *From, Value *To, DominatorTree &DT,
  450 unsigned replaceDominatedUsesWith(Value *From, Value *To, DominatorTree &DT,
  454 unsigned replaceDominatedUsesWith(Value *From, Value *To, DominatorTree &DT,
  454 unsigned replaceDominatedUsesWith(Value *From, Value *To, DominatorTree &DT,
include/llvm/Transforms/Utils/LoopUtils.h
  161     const SmallSetVector<Value *, 8> &, SmallVectorImpl<BasicBlock *> &,
  296 Value *createMinMaxOp(IRBuilder<> &Builder,
  298                       Value *Left, Value *Right);
  298                       Value *Left, Value *Right);
  301 Value *
  302 getOrderedReduction(IRBuilder<> &Builder, Value *Acc, Value *Src, unsigned Op,
  302 getOrderedReduction(IRBuilder<> &Builder, Value *Acc, Value *Src, unsigned Op,
  305                     ArrayRef<Value *> RedOps = None);
  309 Value *getShuffleReduction(IRBuilder<> &Builder, Value *Src, unsigned Op,
  309 Value *getShuffleReduction(IRBuilder<> &Builder, Value *Src, unsigned Op,
  312                            ArrayRef<Value *> RedOps = None);
  320 Value *createSimpleTargetReduction(IRBuilder<> &B,
  322                                    unsigned Opcode, Value *Src,
  325                                    ArrayRef<Value *> RedOps = None);
  331 Value *createTargetReduction(IRBuilder<> &B, const TargetTransformInfo *TTI,
  332                              RecurrenceDescriptor &Desc, Value *Src,
  340 void propagateIRFlags(Value *I, ArrayRef<Value *> VL, Value *OpValue = nullptr);
  340 void propagateIRFlags(Value *I, ArrayRef<Value *> VL, Value *OpValue = nullptr);
  340 void propagateIRFlags(Value *I, ArrayRef<Value *> VL, Value *OpValue = nullptr);
include/llvm/Transforms/Utils/LoopVersioning.h
  132   DenseMap<const Value *, const RuntimePointerChecking::CheckingPtrGroup *>
include/llvm/Transforms/Utils/LowerMemIntrinsics.h
   29 void createMemCpyLoopUnknownSize(Instruction *InsertBefore, Value *SrcAddr,
   30                                  Value *DstAddr, Value *CopyLen,
   30                                  Value *DstAddr, Value *CopyLen,
   37 void createMemCpyLoopKnownSize(Instruction *InsertBefore, Value *SrcAddr,
   38                                Value *DstAddr, ConstantInt *CopyLen,
include/llvm/Transforms/Utils/ModuleUtils.h
   52     ArrayRef<Type *> InitArgTypes, ArrayRef<Value *> InitArgs,
   64     ArrayRef<Type *> InitArgTypes, ArrayRef<Value *> InitArgs,
include/llvm/Transforms/Utils/PredicateInfo.h
  105   Value *OriginalOp;
  112   PredicateBase(PredicateType PT, Value *Op) : Type(PT), OriginalOp(Op) {}
  117   Value *Condition;
  124   PredicateWithCondition(PredicateType PT, Value *Op, Value *Condition)
  124   PredicateWithCondition(PredicateType PT, Value *Op, Value *Condition)
  134   PredicateAssume(Value *Op, IntrinsicInst *AssumeInst, Value *Condition)
  134   PredicateAssume(Value *Op, IntrinsicInst *AssumeInst, Value *Condition)
  156   PredicateWithEdge(PredicateType PType, Value *Op, BasicBlock *From,
  157                     BasicBlock *To, Value *Cond)
  166   PredicateBranch(Value *Op, BasicBlock *BranchBB, BasicBlock *SplitBB,
  167                   Value *Condition, bool TakenEdge)
  178   Value *CaseValue;
  181   PredicateSwitch(Value *Op, BasicBlock *SwitchBB, BasicBlock *TargetBB,
  182                   Value *CaseValue, SwitchInst *SI)
  221   const PredicateBase *getPredicateInfoFor(const Value *V) const {
  232   void processAssume(IntrinsicInst *, BasicBlock *, SmallVectorImpl<Value *> &);
  233   void processBranch(BranchInst *, BasicBlock *, SmallVectorImpl<Value *> &);
  234   void processSwitch(SwitchInst *, BasicBlock *, SmallVectorImpl<Value *> &);
  235   void renameUses(SmallVectorImpl<Value *> &);
  238   void convertUsesToDFSOrdered(Value *, SmallVectorImpl<ValueDFS> &);
  239   Value *materializeStack(unsigned int &, ValueDFSStack &, Value *);
  239   Value *materializeStack(unsigned int &, ValueDFSStack &, Value *);
  242   ValueInfo &getOrCreateValueInfo(Value *);
  243   void addInfoFor(SmallVectorImpl<Value *> &OpsToRename, Value *Op,
  243   void addInfoFor(SmallVectorImpl<Value *> &OpsToRename, Value *Op,
  245   const ValueInfo &getValueInfo(Value *) const;
  253   DenseMap<const Value *, const PredicateBase *> PredicateMap;
  261   DenseMap<Value *, unsigned int> ValueInfoNums;
include/llvm/Transforms/Utils/SSAUpdater.h
   72   void AddAvailableValue(BasicBlock *BB, Value *V);
   80   Value *FindValueForBlock(BasicBlock *BB) const;
   84   Value *GetValueAtEndOfBlock(BasicBlock *BB);
  106   Value *GetValueInMiddleOfBlock(BasicBlock *BB);
  125   Value *GetValueAtEndOfBlockInternal(BasicBlock *BB);
  165   virtual void replaceLoadWithValue(LoadInst *LI, Value *V) const {}
include/llvm/Transforms/Utils/SSAUpdaterBulk.h
   42     DenseMap<BasicBlock *, Value *> Defines;
   53   Value *computeValueAt(BasicBlock *BB, RewriteInfo &R, DominatorTree *DT);
   68   void AddAvailableValue(unsigned Var, BasicBlock *BB, Value *V);
include/llvm/Transforms/Utils/SimplifyLibCalls.h
   53   Value *optimizeCall(CallInst *CI);
   56   Value *optimizeMemCpyChk(CallInst *CI, IRBuilder<> &B);
   57   Value *optimizeMemMoveChk(CallInst *CI, IRBuilder<> &B);
   58   Value *optimizeMemSetChk(CallInst *CI, IRBuilder<> &B);
   61   Value *optimizeStrpCpyChk(CallInst *CI, IRBuilder<> &B, LibFunc Func);
   62   Value *optimizeStrpNCpyChk(CallInst *CI, IRBuilder<> &B, LibFunc Func);
   63   Value *optimizeMemCCpyChk(CallInst *CI, IRBuilder<> &B);
   64   Value *optimizeSNPrintfChk(CallInst *CI, IRBuilder<> &B);
   65   Value *optimizeSPrintfChk(CallInst *CI,IRBuilder<> &B);
   66   Value *optimizeStrCatChk(CallInst *CI, IRBuilder<> &B);
   67   Value *optimizeStrLCat(CallInst *CI, IRBuilder<> &B);
   68   Value *optimizeStrNCatChk(CallInst *CI, IRBuilder<> &B);
   69   Value *optimizeStrLCpyChk(CallInst *CI, IRBuilder<> &B);
   70   Value *optimizeVSNPrintfChk(CallInst *CI, IRBuilder<> &B);
   71   Value *optimizeVSPrintfChk(CallInst *CI, IRBuilder<> &B);
  109   function_ref<void(Instruction *, Value *)> Replacer;
  116   static void replaceAllUsesWithDefault(Instruction *I, Value *With) {
  124   void replaceAllUsesWith(Instruction *I, Value *With);
  130   void substituteInParent(Instruction *I, Value *With) {
  135   Value *foldMallocMemset(CallInst *Memset, IRBuilder<> &B);
  142       function_ref<void(Instruction *, Value *)> Replacer =
  153   Value *optimizeCall(CallInst *CI);
  157   Value *optimizeStrCat(CallInst *CI, IRBuilder<> &B);
  158   Value *optimizeStrNCat(CallInst *CI, IRBuilder<> &B);
  159   Value *optimizeStrChr(CallInst *CI, IRBuilder<> &B);
  160   Value *optimizeStrRChr(CallInst *CI, IRBuilder<> &B);
  161   Value *optimizeStrCmp(CallInst *CI, IRBuilder<> &B);
  162   Value *optimizeStrNCmp(CallInst *CI, IRBuilder<> &B);
  163   Value *optimizeStrNDup(CallInst *CI, IRBuilder<> &B);
  164   Value *optimizeStrCpy(CallInst *CI, IRBuilder<> &B);
  165   Value *optimizeStpCpy(CallInst *CI, IRBuilder<> &B);
  166   Value *optimizeStrNCpy(CallInst *CI, IRBuilder<> &B);
  167   Value *optimizeStrLen(CallInst *CI, IRBuilder<> &B);
  168   Value *optimizeStrPBrk(CallInst *CI, IRBuilder<> &B);
  169   Value *optimizeStrTo(CallInst *CI, IRBuilder<> &B);
  170   Value *optimizeStrSpn(CallInst *CI, IRBuilder<> &B);
  171   Value *optimizeStrCSpn(CallInst *CI, IRBuilder<> &B);
  172   Value *optimizeStrStr(CallInst *CI, IRBuilder<> &B);
  173   Value *optimizeMemChr(CallInst *CI, IRBuilder<> &B);
  174   Value *optimizeMemRChr(CallInst *CI, IRBuilder<> &B);
  175   Value *optimizeMemCmp(CallInst *CI, IRBuilder<> &B);
  176   Value *optimizeBCmp(CallInst *CI, IRBuilder<> &B);
  177   Value *optimizeMemCmpBCmpCommon(CallInst *CI, IRBuilder<> &B);
  178   Value *optimizeMemPCpy(CallInst *CI, IRBuilder<> &B);
  179   Value *optimizeMemCpy(CallInst *CI, IRBuilder<> &B);
  180   Value *optimizeMemMove(CallInst *CI, IRBuilder<> &B);
  181   Value *optimizeMemSet(CallInst *CI, IRBuilder<> &B);
  182   Value *optimizeRealloc(CallInst *CI, IRBuilder<> &B);
  183   Value *optimizeWcslen(CallInst *CI, IRBuilder<> &B);
  184   Value *optimizeBCopy(CallInst *CI, IRBuilder<> &B);
  186   Value *optimizeStringMemoryLibCall(CallInst *CI, IRBuilder<> &B);
  189   Value *optimizeCAbs(CallInst *CI, IRBuilder<> &B);
  190   Value *optimizePow(CallInst *CI, IRBuilder<> &B);
  191   Value *replacePowWithExp(CallInst *Pow, IRBuilder<> &B);
  192   Value *replacePowWithSqrt(CallInst *Pow, IRBuilder<> &B);
  193   Value *optimizeExp2(CallInst *CI, IRBuilder<> &B);
  194   Value *optimizeFMinFMax(CallInst *CI, IRBuilder<> &B);
  195   Value *optimizeLog(CallInst *CI, IRBuilder<> &B);
  196   Value *optimizeSqrt(CallInst *CI, IRBuilder<> &B);
  197   Value *optimizeSinCosPi(CallInst *CI, IRBuilder<> &B);
  198   Value *optimizeTan(CallInst *CI, IRBuilder<> &B);
  200   Value *optimizeFloatingPointLibCall(CallInst *CI, LibFunc Func,
  204   Value *optimizeFFS(CallInst *CI, IRBuilder<> &B);
  205   Value *optimizeFls(CallInst *CI, IRBuilder<> &B);
  206   Value *optimizeAbs(CallInst *CI, IRBuilder<> &B);
  207   Value *optimizeIsDigit(CallInst *CI, IRBuilder<> &B);
  208   Value *optimizeIsAscii(CallInst *CI, IRBuilder<> &B);
  209   Value *optimizeToAscii(CallInst *CI, IRBuilder<> &B);
  210   Value *optimizeAtoi(CallInst *CI, IRBuilder<> &B);
  211   Value *optimizeStrtol(CallInst *CI, IRBuilder<> &B);
  214   Value *optimizeErrorReporting(CallInst *CI, IRBuilder<> &B,
  216   Value *optimizePrintF(CallInst *CI, IRBuilder<> &B);
  217   Value *optimizeSPrintF(CallInst *CI, IRBuilder<> &B);
  218   Value *optimizeSnPrintF(CallInst *CI, IRBuilder<> &B);
  219   Value *optimizeFPrintF(CallInst *CI, IRBuilder<> &B);
  220   Value *optimizeFWrite(CallInst *CI, IRBuilder<> &B);
  221   Value *optimizeFRead(CallInst *CI, IRBuilder<> &B);
  222   Value *optimizeFPuts(CallInst *CI, IRBuilder<> &B);
  223   Value *optimizeFGets(CallInst *CI, IRBuilder<> &B);
  224   Value *optimizeFPutc(CallInst *CI, IRBuilder<> &B);
  225   Value *optimizeFGetc(CallInst *CI, IRBuilder<> &B);
  226   Value *optimizePuts(CallInst *CI, IRBuilder<> &B);
  229   Value *emitStrLenMemCpy(Value *Src, Value *Dst, uint64_t Len, IRBuilder<> &B);
  229   Value *emitStrLenMemCpy(Value *Src, Value *Dst, uint64_t Len, IRBuilder<> &B);
  229   Value *emitStrLenMemCpy(Value *Src, Value *Dst, uint64_t Len, IRBuilder<> &B);
  230   void classifyArgUse(Value *Val, Function *F, bool IsFloat,
  234   Value *optimizePrintFString(CallInst *CI, IRBuilder<> &B);
  235   Value *optimizeSPrintFString(CallInst *CI, IRBuilder<> &B);
  236   Value *optimizeSnPrintFString(CallInst *CI, IRBuilder<> &B);
  237   Value *optimizeFPrintFString(CallInst *CI, IRBuilder<> &B);
  244   Value *optimizeStringLength(CallInst *CI, IRBuilder<> &B, unsigned CharSize);
include/llvm/Transforms/Utils/UnrollLoop.h
  115                         const SmallPtrSetImpl<const Value *> &EphValues,
  142                              const SmallPtrSetImpl<const Value *> &EphValues,
include/llvm/Transforms/Utils/VNCoercion.h
   37 bool canCoerceMustAliasedValueToLoad(Value *StoredVal, Type *LoadTy,
   46 Value *coerceAvailableValueToLoadType(Value *StoredVal, Type *LoadedTy,
   46 Value *coerceAvailableValueToLoadType(Value *StoredVal, Type *LoadedTy,
   54 int analyzeLoadFromClobberingStore(Type *LoadTy, Value *LoadPtr,
   62 int analyzeLoadFromClobberingLoad(Type *LoadTy, Value *LoadPtr, LoadInst *DepLI,
   70 int analyzeLoadFromClobberingMemInst(Type *LoadTy, Value *LoadPtr,
   76 Value *getStoreValueForLoad(Value *SrcVal, unsigned Offset, Type *LoadTy,
   76 Value *getStoreValueForLoad(Value *SrcVal, unsigned Offset, Type *LoadTy,
   87 Value *getLoadValueForLoad(LoadInst *SrcVal, unsigned Offset, Type *LoadTy,
   98 Value *getMemInstValueForLoad(MemIntrinsic *SrcInst, unsigned Offset,
include/llvm/Transforms/Utils/ValueMapper.h
   33 using ValueToValueMapTy = ValueMap<const Value *, WeakTrackingVH>;
   62   virtual Value *materialize(Value *V) = 0;
   62   virtual Value *materialize(Value *V) = 0;
  171   Value *mapValue(const Value &V);
  171   Value *mapValue(const Value &V);
  206 inline Value *MapValue(const Value *V, ValueToValueMapTy &VM,
  206 inline Value *MapValue(const Value *V, ValueToValueMapTy &VM,
include/llvm/Transforms/Vectorize/LoopVectorizationLegality.h
  253   bool isInductionPhi(const Value *V);
  258   bool isCastedInductionVariable(const Value *V);
  263   bool isInductionVariable(const Value *V);
  285   int isConsecutivePtr(Value *Ptr);
  288   bool isUniform(Value *V);
  303   bool hasStride(Value *V) { return LAI->hasStride(V); }
  366   bool blockCanBePredicated(BasicBlock *BB, SmallPtrSetImpl<Value *> &SafePtrs,
  373                        SmallPtrSetImpl<Value *> &AllowedExit);
  449   SmallPtrSet<Value *, 4> AllowedExit;
include/llvm/Transforms/Vectorize/SLPVectorizer.h
   61   using StoreListMap = MapVector<Value *, StoreList>;
   63   using GEPListMap = MapVector<Value *, GEPList>;
   95   bool tryToVectorizePair(Value *A, Value *B, slpvectorizer::BoUpSLP &R);
   95   bool tryToVectorizePair(Value *A, Value *B, slpvectorizer::BoUpSLP &R);
  101   bool tryToVectorizeList(ArrayRef<Value *> VL, slpvectorizer::BoUpSLP &R,
  116   bool vectorizeRootInstruction(PHINode *P, Value *V, BasicBlock *BB,
  140   bool vectorizeStoreChain(ArrayRef<Value *> Chain, slpvectorizer::BoUpSLP &R,
lib/Analysis/AliasAnalysis.cpp
  212         const Value *Arg = *AI;
  294       const Value *Arg = *I;
  345       const Value *Arg = *I;
  646   const Value *Object =
  868 bool llvm::isNoAliasCall(const Value *V) {
  874 bool llvm::isNoAliasArgument(const Value *V) {
  880 bool llvm::isIdentifiedObject(const Value *V) {
  892 bool llvm::isIdentifiedFunctionLocal(const Value *V) {
lib/Analysis/AliasAnalysisEvaluator.cpp
   43 static void PrintResults(AliasResult AR, bool P, const Value *V1,
   44                          const Value *V2, const Module *M) {
   60                                       Value *Ptr, Module *M) {
   76                                          const Value *V1, const Value *V2,
   76                                          const Value *V1, const Value *V2,
   83 static inline bool isInterestingPointer(Value *V) {
   98   SetVector<Value *> Pointers;
  100   SetVector<Value *> Loads;
  101   SetVector<Value *> Stores;
  116       Value *Callee = Call->getCalledValue();
  140   for (SetVector<Value *>::iterator I1 = Pointers.begin(), E = Pointers.end();
  147     for (SetVector<Value *>::iterator I2 = Pointers.begin(); I2 != I1; ++I2) {
  177     for (Value *Load : Loads) {
  178       for (Value *Store : Stores) {
  203     for (SetVector<Value *>::iterator I1 = Stores.begin(), E = Stores.end();
  205       for (SetVector<Value *>::iterator I2 = Stores.begin(); I2 != I1; ++I2) {
lib/Analysis/AliasAnalysisSummary.cpp
   51 AliasAttrs getGlobalOrArgAttrFromValue(const Value &Val) {
   78   auto *V = (Index == 0) ? &Call : Call.getArgOperand(Index - 1);
lib/Analysis/AliasAnalysisSummary.h
   86 AliasAttrs getGlobalOrArgAttrFromValue(const Value &);
  200   Value *Val;
  247     return cflaa::InstantiatedValue{DenseMapInfo<Value *>::getEmptyKey(),
  251     return cflaa::InstantiatedValue{DenseMapInfo<Value *>::getTombstoneKey(),
  255     return DenseMapInfo<std::pair<Value *, unsigned>>::getHashValue(
lib/Analysis/AliasSetTracker.cpp
  198 AliasResult AliasSet::aliasesPointer(const Value *Ptr, LocationSize Size,
  274     Value *Addr = begin()->getValue();
  304 AliasSet *AliasSetTracker::mergeAliasSetsForPointer(const Value *Ptr,
  354   Value * const Pointer = const_cast<Value*>(MemLoc.Ptr);
  403 void AliasSetTracker::add(Value *Ptr, LocationSize Size,
  499         const Value *Arg = IdxArgPair.value();
  558 void AliasSetTracker::deleteValue(Value *PtrVal) {
  586 void AliasSetTracker::copyValue(Value *From, Value *To) {
  586 void AliasSetTracker::copyValue(Value *From, Value *To) {
  723 void AliasSetTracker::ASTCallbackVH::allUsesReplacedWith(Value *V) {
  727 AliasSetTracker::ASTCallbackVH::ASTCallbackVH(Value *V, AliasSetTracker *ast)
  731 AliasSetTracker::ASTCallbackVH::operator=(Value *V) {
lib/Analysis/AssumptionCache.cpp
   57                                SmallVectorImpl<Value *> &Affected) {
   68       Value *Op;
   78   Value *Cond = CI->getArgOperand(0), *A, *B;
   89         Value *A;
   95         Value *B;
  114   SmallVector<Value *, 16> Affected;
  125   SmallVector<Value *, 16> Affected;
  146 void AssumptionCache::transferAffectedValuesInCache(Value *OV, Value *NV) {
  146 void AssumptionCache::transferAffectedValuesInCache(Value *OV, Value *NV) {
  158 void AssumptionCache::AffectedValueCallbackVH::allUsesReplacedWith(Value *NV) {
  209   SmallPtrSet<Value *, 16> AssumptionSet;
lib/Analysis/BasicAliasAnalysis.cpp
  120     const Value *V,
  121     SmallDenseMap<const Value *, bool, 8> *IsCapturedCache = nullptr) {
  122   SmallDenseMap<const Value *, bool, 8>::iterator CacheIt;
  163 static bool isEscapeSource(const Value *V) {
  180 static uint64_t getObjectSize(const Value *V, const DataLayout &DL,
  195 static bool isObjectSmallerThan(const Value *V, uint64_t Size,
  239 static uint64_t getMinimalExtentFrom(const Value &V,
  257 static bool isObjectSize(const Value *V, uint64_t Size, const DataLayout &DL,
  277 /*static*/ const Value *BasicAAResult::GetLinearExpression(
  278     const Value *V, APInt &Scale, APInt &Offset, unsigned &ZExtBits,
  377     Value *CastOp = cast<CastInst>(V)->getOperand(0);
  381     const Value *Result =
  462 bool BasicAAResult::DecomposeGEPExpression(const Value *V,
  517         if (const Value *Simplified =
  541       const Value *Index = *I;
  579       const Value *OrigIndex = Index;
  658   SmallVector<const Value *, 16> Worklist;
  661     const Value *V = GetUnderlyingObject(Worklist.pop_back_val(), DL);
  698       for (Value *IncValue : PN->incoming_values())
  817 static const Function *getParent(const Value *V) {
  830 static bool notDifferentParent(const Value *O1, const Value *O2) {
  830 static bool notDifferentParent(const Value *O1, const Value *O2) {
  875   const Value *Object = GetUnderlyingObject(Loc.Ptr, DL);
 1127   SmallVector<Value *, 8> IntermediateIndices;
 1179       Value *GEP1LastIdx = GEP1->getOperand(GEP1->getNumOperands() - 1);
 1180       Value *GEP2LastIdx = GEP2->getOperand(GEP2->getNumOperands() - 1);
 1312     const Value *V2, LocationSize V2Size, const AAMDNodes &V2AAInfo,
 1313     const Value *UnderlyingV1, const Value *UnderlyingV2, AAQueryInfo &AAQI) {
 1313     const Value *UnderlyingV1, const Value *UnderlyingV2, AAQueryInfo &AAQI) {
 1482         const Value *V = DecompGEP1.VarIndices[i].V;
 1549                            const AAMDNodes &SIAAInfo, const Value *V2,
 1551                            const Value *UnderV2, AAQueryInfo &AAQI) {
 1582                                     const AAMDNodes &PNAAInfo, const Value *V2,
 1585                                     const Value *UnderV2, AAQueryInfo &AAQI) {
 1637   SmallVector<Value *, 4> V1Srcs;
 1649     for (Value *PV1 : PhiValueSet) {
 1668     SmallPtrSet<Value *, 4> UniqueSrc;
 1669     for (Value *PV1 : PN->incoming_values()) {
 1718     Value *V = V1Srcs[i];
 1732 AliasResult BasicAAResult::aliasCheck(const Value *V1, LocationSize V1Size,
 1733                                       AAMDNodes V1AAInfo, const Value *V2,
 1735                                       AAQueryInfo &AAQI, const Value *O1,
 1736                                       const Value *O2) {
 1912 bool BasicAAResult::isValueEqualInPotentialCycles(const Value *V,
 1913                                                   const Value *V2) {
 1948     const Value *V = Src[i].V;
 2004   const Value *V0 = GetLinearExpression(Var0.V, V0Scale, V0Offset, V0ZExtBits,
 2008   const Value *V1 = GetLinearExpression(Var1.V, V1Scale, V1Offset, V1ZExtBits,
lib/Analysis/BranchProbabilityInfo.cpp
  405   Value *Cond = BI->getCondition();
  410   Value *LHS = CI->getOperand(0);
  535       Value *V = P->getIncomingValueForBlock(B);
  665   Value *Cond = BI->getCondition();
  676   Value *RHS = CI->getOperand(1);
  783   Value *Cond = BI->getCondition();
lib/Analysis/CFLAndersAliasAnalysis.cpp
  136   const Value *Val;
  276     return OffsetValue{DenseMapInfo<const Value *>::getEmptyKey(),
  281     return OffsetValue{DenseMapInfo<const Value *>::getTombstoneKey(),
  286     return DenseMapInfo<std::pair<const Value *, int64_t>>::getHashValue(
  327   DenseMap<const Value *, std::vector<OffsetValue>> AliasMap;
  330   DenseMap<const Value *, AliasAttrs> AttrMap;
  338   FunctionInfo(const Function &, const SmallVectorImpl<Value *> &,
  341   bool mayAlias(const Value *, LocationSize, const Value *, LocationSize) const;
  341   bool mayAlias(const Value *, LocationSize, const Value *, LocationSize) const;
  355                   const SmallVectorImpl<Value *> &RetVals) {
  369 static void populateAttrMap(DenseMap<const Value *, AliasAttrs> &AttrMap,
  383 populateAliasMap(DenseMap<const Value *, std::vector<OffsetValue>> &AliasMap,
  405     const SmallVectorImpl<Value *> &RetVals, const ReachabilitySet &ReachSet) {
  430   DenseMap<Value *, ValueSummary> ValueMap;
  490     const SmallVectorImpl<Value *> &RetVals, const AliasAttrMap &AMap) {
  501     const Function &Fn, const SmallVectorImpl<Value *> &RetVals,
  520     const Value *LHS, LocationSize MaybeLHSSize, const Value *RHS,
  520     const Value *LHS, LocationSize MaybeLHSSize, const Value *RHS,
lib/Analysis/CFLGraph.h
   98   using ValueMap = DenseMap<Value *, ValueInfo>;
  170   SmallVector<Value *, 4> ReturnedValues;
  180     SmallVectorImpl<Value *> &ReturnValues;
  204     void addNode(Value *Val, AliasAttrs Attr = AliasAttrs()) {
  219     void addAssignEdge(Value *From, Value *To, int64_t Offset = 0) {
  219     void addAssignEdge(Value *From, Value *To, int64_t Offset = 0) {
  231     void addDerefEdge(Value *From, Value *To, bool IsRead) {
  231     void addDerefEdge(Value *From, Value *To, bool IsRead) {
  251     void addLoadEdge(Value *From, Value *To) { addDerefEdge(From, To, true); }
  251     void addLoadEdge(Value *From, Value *To) { addDerefEdge(From, To, true); }
  252     void addStoreEdge(Value *From, Value *To) { addDerefEdge(From, To, false); }
  252     void addStoreEdge(Value *From, Value *To) { addDerefEdge(From, To, false); }
  273       auto *Ptr = Inst.getOperand(0);
  283       auto *Src = Inst.getOperand(0);
  288       auto *Op1 = Inst.getOperand(0);
  289       auto *Op2 = Inst.getOperand(1);
  295       auto *Src = Inst.getOperand(0);
  300       auto *Ptr = Inst.getPointerOperand();
  301       auto *Val = Inst.getNewValOperand();
  306       auto *Ptr = Inst.getPointerOperand();
  307       auto *Val = Inst.getValOperand();
  312       for (Value *Val : Inst.incoming_values())
  323       auto *Op = GEPOp.getPointerOperand();
  338       auto *TrueVal = Inst.getTrueValue();
  339       auto *FalseVal = Inst.getFalseValue();
  347       auto *Ptr = Inst.getPointerOperand();
  353       auto *Ptr = Inst.getPointerOperand();
  354       auto *Val = Inst.getValueOperand();
  419       for (Value *V : Call.args())
  445         for (Value *V : Call.args()) {
  470       auto *Ptr = Inst.getVectorOperand();
  476       auto *Vec = Inst.getOperand(0);
  477       auto *Val = Inst.getOperand(1);
  491       auto *Agg = Inst.getOperand(0);
  492       auto *Val = Inst.getOperand(1);
  498       auto *Ptr = Inst.getAggregateOperand();
  503       auto *From1 = Inst.getOperand(0);
  504       auto *From2 = Inst.getOperand(1);
  652   const SmallVector<Value *, 4> &getReturnValues() const {
lib/Analysis/CFLSteensAliasAnalysis.cpp
   76   FunctionInfo(Function &Fn, const SmallVectorImpl<Value *> &RetVals,
   94 static bool canSkipAddingToSets(Value *Val) {
  116     Function &Fn, const SmallVectorImpl<Value *> &RetVals,
  163   for (auto *RetVal : RetVals) {
  267   auto *ValA = const_cast<Value *>(LocA.Ptr);
  268   auto *ValB = const_cast<Value *>(LocB.Ptr);
lib/Analysis/CGSCCPassManager.cpp
  473     for (Value *Op : I.operand_values())
lib/Analysis/CallGraphSCCPass.cpp
  203   DenseMap<Value *, CallGraphNode *> Calls;
  297         DenseMap<Value *, CallGraphNode *>::iterator ExistingIt =
lib/Analysis/CaptureTracking.cpp
   36 bool CaptureTracker::isDereferenceableOrNull(Value *O, const DataLayout &DL) {
  174 bool llvm::PointerMayBeCaptured(const Value *V,
  201 bool llvm::PointerMayBeCapturedBefore(const Value *V, bool ReturnCaptures,
  227 void llvm::PointerMayBeCaptured(const Value *V, CaptureTracker *Tracker,
  292         Value *A = IdxOpPair.value();
  360           auto *O = I->getOperand(Idx)->stripPointerCastsSameRepresentation();
lib/Analysis/CmpInstAnalysis.cpp
   66 bool llvm::decomposeBitTestICmp(Value *LHS, Value *RHS,
   66 bool llvm::decomposeBitTestICmp(Value *LHS, Value *RHS,
   68                                 Value *&X, APInt &Mask, bool LookThruTrunc) {
lib/Analysis/CodeMetrics.cpp
   28 appendSpeculatableOperands(const Value *V,
   29                            SmallPtrSetImpl<const Value *> &Visited,
   30                            SmallVectorImpl<const Value *> &Worklist) {
   35   for (const Value *Operand : U->operands())
   41 static void completeEphemeralValues(SmallPtrSetImpl<const Value *> &Visited,
   42                                     SmallVectorImpl<const Value *> &Worklist,
   43                                     SmallPtrSetImpl<const Value *> &EphValues) {
   52     const Value *V = Worklist[i];
   72     SmallPtrSetImpl<const Value *> &EphValues) {
   73   SmallPtrSet<const Value *, 32> Visited;
   74   SmallVector<const Value *, 16> Worklist;
   96     SmallPtrSetImpl<const Value *> &EphValues) {
   97   SmallPtrSet<const Value *, 32> Visited;
   98   SmallVector<const Value *, 16> Worklist;
  118                                     const SmallPtrSetImpl<const Value*> &EphValues) {
lib/Analysis/ConstantFolding.cpp
  879     SmallVector<Value *, 4> NestedOps(GEP->op_begin() + 1, GEP->op_end());
  883     for (Value *NestedOp : NestedOps)
 1015 Constant *ConstantFoldInstOperandsImpl(const Value *InstOrCE, unsigned Opcode,
 1125     for (Value *Incoming : PN->incoming_values()) {
 1663     for (const Value *subc : c->operand_values()) {
 1672 static bool getConstIntOrUndef(Value *Op, const APInt *&C) {
lib/Analysis/DemandedBits.cpp
   86     const Instruction *UserI, const Value *Val, unsigned OperandNo,
lib/Analysis/DependenceAnalysis.cpp
  656   const Value *AObj = GetUnderlyingObject(LocA.Ptr, DL);
  657   const Value *BObj = GetUnderlyingObject(LocB.Ptr, DL);
 1044 bool DependenceInfo::isKnownNonNegative(const SCEV *S, const Value *Ptr) const {
 3268   Value *SrcPtr = getLoadStorePointerOperand(Src);
 3269   Value *DstPtr = getLoadStorePointerOperand(Dst);
 3423   Value *SrcPtr = getLoadStorePointerOperand(Src);
 3424   Value *DstPtr = getLoadStorePointerOperand(Dst);
 3842   Value *SrcPtr = getLoadStorePointerOperand(Src);
 3843   Value *DstPtr = getLoadStorePointerOperand(Dst);
lib/Analysis/DivergenceAnalysis.cpp
  100 void DivergenceAnalysis::markDivergent(const Value &DivVal) {
  106 void DivergenceAnalysis::addUniformOverride(const Value &UniVal) {
  137                                              const Value &Val) const {
  170     const auto *InVal = Phi.getIncomingValue(i);
  261 void DivergenceAnalysis::pushUsers(const Value &V) {
  407 bool DivergenceAnalysis::isAlwaysUniform(const Value &V) const {
  411 bool DivergenceAnalysis::isDivergent(const Value &V) const {
  416   Value &V = *U.get();
  454 bool GPUDivergenceAnalysis::isDivergent(const Value &val) const {
lib/Analysis/EHPersonalities.cpp
   21 EHPersonality llvm::classifyEHPersonality(const Value *Pers) {
  124       Value *ParentPad = CatchRet->getCatchSwitchParentPad();
lib/Analysis/GlobalsModRef.cpp
  210   Value *V = getValPtr();
  343 bool GlobalsAAResult::AnalyzeUsesOfPointer(Value *V,
  406   std::vector<Value *> AllocRelatedValues;
  433       Value *Ptr = GetUnderlyingObject(SI->getOperand(0),
  628                                                const Value *V,
  631   SmallPtrSet<const Value *, 8> Visited;
  632   SmallVector<const Value *, 8> Inputs;
  636     const Value *Input = Inputs.pop_back_val();
  660       const Value *LHS = GetUnderlyingObject(SI->getTrueValue(), DL);
  661       const Value *RHS = GetUnderlyingObject(SI->getFalseValue(), DL);
  669       for (const Value *Op : PN->incoming_values()) {
  710                                                  const Value *V) {
  717   SmallPtrSet<const Value *, 8> Visited;
  718   SmallVector<const Value *, 8> Inputs;
  723     const Value *Input = Inputs.pop_back_val();
  769       const Value *Ptr = GetUnderlyingObject(LI->getPointerOperand(), DL);
  777       const Value *LHS = GetUnderlyingObject(SI->getTrueValue(), DL);
  778       const Value *RHS = GetUnderlyingObject(SI->getFalseValue(), DL);
  786       for (const Value *Op : PN->incoming_values()) {
  814   const Value *UV1 = GetUnderlyingObject(LocA.Ptr, DL);
  815   const Value *UV2 = GetUnderlyingObject(LocB.Ptr, DL);
  845       const Value *UV = GV1 ? UV2 : UV1;
  901     SmallVector<const Value*, 4> Objects;
lib/Analysis/GuardUtils.cpp
   23   Value *Condition, *WidenableCondition;
   38 bool llvm::parseWidenableBranch(const User *U, Value *&Condition,
   39                                 Value *&WidenableCondition,
lib/Analysis/IVDescriptors.cpp
  183     for (Value *O : cast<User>(Val)->operands())
  205   Value *RdxStart = Phi->getIncomingValueForBlock(TheLoop->getLoopPreheader());
  485   Value *CmpLeft;
  486   Value *CmpRight;
  530   Value *TrueVal = SI->getTrueValue();
  531   Value *FalseVal = SI->getFalseValue();
  544   Value *Op1, *Op2;
  776 InductionDescriptor::InductionDescriptor(Value *Start, InductionKind K,
  841   Value *BEValue = nullptr, *StartValue = nullptr;
  856   Value *Addend = nullptr;
  934     Value *Op0 = BinOp->getOperand(0);
  935     Value *Op1 = BinOp->getOperand(1);
  936     Value *Def = nullptr;
  949   Value *Val = PN->getIncomingValueForBlock(Latch);
 1055   Value *StartValue =
lib/Analysis/IVUsers.cpp
  128 static bool IVUseShouldUsePostIncValue(Instruction *User, Value *Operand,
  299 IVStrideUse &IVUsers::AddUser(Instruction *User, Value *Operand) {
lib/Analysis/InlineCost.cpp
  169   DenseMap<Value *, Constant *> SimplifiedValues;
  173   DenseMap<Value *, Value *> SROAArgValues;
  173   DenseMap<Value *, Value *> SROAArgValues;
  178   DenseMap<Value *, int> SROAArgCosts;
  181   DenseMap<Value *, std::pair<Value *, APInt>> ConstantOffsetPtrs;
  181   DenseMap<Value *, std::pair<Value *, APInt>> ConstantOffsetPtrs;
  194   SmallPtrSet<Value *, 16> LoadAddrSet;
  198   bool isAllocaDerivedArg(Value *V);
  199   bool lookupSROAArgAndCost(Value *V, Value *&Arg,
  199   bool lookupSROAArgAndCost(Value *V, Value *&Arg,
  200                             DenseMap<Value *, int>::iterator &CostIt);
  201   void disableSROA(DenseMap<Value *, int>::iterator CostIt);
  202   void disableSROA(Value *V);
  204   void accumulateSROACost(DenseMap<Value *, int>::iterator CostIt,
  213   ConstantInt *stripAndComputeInBoundsConstantOffsets(Value *&V);
  224   bool isKnownNonNullInCallee(Value *V);
  244                             SmallPtrSetImpl<const Value *> &EphValues);
  327 bool CallAnalyzer::isAllocaDerivedArg(Value *V) {
  334     Value *V, Value *&Arg, DenseMap<Value *, int>::iterator &CostIt) {
  334     Value *V, Value *&Arg, DenseMap<Value *, int>::iterator &CostIt) {
  334     Value *V, Value *&Arg, DenseMap<Value *, int>::iterator &CostIt) {
  338   DenseMap<Value *, Value *>::iterator ArgIt = SROAArgValues.find(V);
  338   DenseMap<Value *, Value *>::iterator ArgIt = SROAArgValues.find(V);
  351 void CallAnalyzer::disableSROA(DenseMap<Value *, int>::iterator CostIt) {
  362 void CallAnalyzer::disableSROA(Value *V) {
  363   Value *SROAArg;
  364   DenseMap<Value *, int>::iterator CostIt;
  370 void CallAnalyzer::accumulateSROACost(DenseMap<Value *, int>::iterator CostIt,
  421   SmallVector<Value *, 4> Operands;
  480   std::pair<Value *, APInt> FirstBaseAndOffset = {nullptr, ZeroOffset};
  481   Value *FirstV = nullptr;
  494     Value *V = I.getIncomingValue(i);
  503     std::pair<Value *, APInt> BaseAndOffset = {nullptr, ZeroOffset};
  551     Value *SROAArg;
  552     DenseMap<Value *, int>::iterator CostIt;
  566   std::pair<Value *, APInt> BaseAndOffset =
  583   Value *SROAArg;
  584   DenseMap<Value *, int>::iterator CostIt;
  616   for (Value *Op : I.operands()) {
  639   std::pair<Value *, APInt> BaseAndOffset =
  646   Value *SROAArg;
  647   DenseMap<Value *, int>::iterator CostIt;
  667     std::pair<Value *, APInt> BaseAndOffset =
  680   Value *SROAArg;
  681   DenseMap<Value *, int>::iterator CostIt;
  697   Value *Op = I.getOperand(0);
  700     std::pair<Value *, APInt> BaseAndOffset = ConstantOffsetPtrs.lookup(Op);
  706   Value *SROAArg;
  707   DenseMap<Value *, int>::iterator CostIt;
  745   Value *Operand = I.getOperand(0);
  761 bool CallAnalyzer::isKnownNonNullInCallee(Value *V) {
  983   Value *LHS = I.getOperand(0), *RHS = I.getOperand(1);
  995   Value *LHSBase, *RHSBase;
 1023   Value *SROAArg;
 1024   DenseMap<Value *, int>::iterator CostIt;
 1040   Value *LHS = I.getOperand(0), *RHS = I.getOperand(1);
 1041   Value *LHSBase, *RHSBase;
 1065   Value *LHS = I.getOperand(0), *RHS = I.getOperand(1);
 1073   Value *SimpleV = nullptr;
 1104   Value *Op = I.getOperand(0);
 1109   Value *SimpleV = SimplifyFNegInst(COp ? COp : Op,
 1126   Value *SROAArg;
 1127   DenseMap<Value *, int>::iterator CostIt;
 1150   Value *SROAArg;
 1151   DenseMap<Value *, int>::iterator CostIt;
 1214   for (Value *I : Call.args()) {
 1301   Value *Callee = Call.getCalledValue();
 1355   Value *TrueVal = SI.getTrueValue();
 1356   Value *FalseVal = SI.getFalseValue();
 1377     std::pair<Value *, APInt> TrueBaseAndOffset =
 1379     std::pair<Value *, APInt> FalseBaseAndOffset =
 1384       Value *SROAArg;
 1385       DenseMap<Value *, int>::iterator CostIt;
 1395   Value *SelectedV = CondC->isAllOnesValue()
 1420   std::pair<Value *, APInt> BaseAndOffset =
 1425     Value *SROAArg;
 1426     DenseMap<Value *, int>::iterator CostIt;
 1439   if (Value *V = SimplifiedValues.lookup(SI.getCondition()))
 1562                            SmallPtrSetImpl<const Value *> &EphValues) {
 1650 ConstantInt *CallAnalyzer::stripAndComputeInBoundsConstantOffsets(Value *&V) {
 1660   SmallPtrSet<Value *, 4> Visited;
 1794     Value *PtrArg = *CAI;
 1812   SmallPtrSet<const Value *, 32> EphValues;
 1864         Value *Cond = BI->getCondition();
 1875       Value *Cond = SI->getCondition();
lib/Analysis/InstructionSimplify.cpp
   53 static Value *SimplifyAndInst(Value *, Value *, const SimplifyQuery &, unsigned);
   53 static Value *SimplifyAndInst(Value *, Value *, const SimplifyQuery &, unsigned);
   53 static Value *SimplifyAndInst(Value *, Value *, const SimplifyQuery &, unsigned);
   54 static Value *simplifyUnOp(unsigned, Value *, const SimplifyQuery &, unsigned);
   54 static Value *simplifyUnOp(unsigned, Value *, const SimplifyQuery &, unsigned);
   55 static Value *simplifyFPUnOp(unsigned, Value *, const FastMathFlags &,
   55 static Value *simplifyFPUnOp(unsigned, Value *, const FastMathFlags &,
   57 static Value *SimplifyBinOp(unsigned, Value *, Value *, const SimplifyQuery &,
   57 static Value *SimplifyBinOp(unsigned, Value *, Value *, const SimplifyQuery &,
   57 static Value *SimplifyBinOp(unsigned, Value *, Value *, const SimplifyQuery &,
   59 static Value *SimplifyBinOp(unsigned, Value *, Value *, const FastMathFlags &,
   59 static Value *SimplifyBinOp(unsigned, Value *, Value *, const FastMathFlags &,
   59 static Value *SimplifyBinOp(unsigned, Value *, Value *, const FastMathFlags &,
   61 static Value *SimplifyCmpInst(unsigned, Value *, Value *, const SimplifyQuery &,
   61 static Value *SimplifyCmpInst(unsigned, Value *, Value *, const SimplifyQuery &,
   61 static Value *SimplifyCmpInst(unsigned, Value *, Value *, const SimplifyQuery &,
   63 static Value *SimplifyICmpInst(unsigned Predicate, Value *LHS, Value *RHS,
   63 static Value *SimplifyICmpInst(unsigned Predicate, Value *LHS, Value *RHS,
   63 static Value *SimplifyICmpInst(unsigned Predicate, Value *LHS, Value *RHS,
   65 static Value *SimplifyOrInst(Value *, Value *, const SimplifyQuery &, unsigned);
   65 static Value *SimplifyOrInst(Value *, Value *, const SimplifyQuery &, unsigned);
   65 static Value *SimplifyOrInst(Value *, Value *, const SimplifyQuery &, unsigned);
   66 static Value *SimplifyXorInst(Value *, Value *, const SimplifyQuery &, unsigned);
   66 static Value *SimplifyXorInst(Value *, Value *, const SimplifyQuery &, unsigned);
   66 static Value *SimplifyXorInst(Value *, Value *, const SimplifyQuery &, unsigned);
   67 static Value *SimplifyCastInst(unsigned, Value *, Type *,
   67 static Value *SimplifyCastInst(unsigned, Value *, Type *,
   69 static Value *SimplifyGEPInst(Type *, ArrayRef<Value *>, const SimplifyQuery &,
   69 static Value *SimplifyGEPInst(Type *, ArrayRef<Value *>, const SimplifyQuery &,
   72 static Value *foldSelectWithBinaryOp(Value *Cond, Value *TrueVal,
   72 static Value *foldSelectWithBinaryOp(Value *Cond, Value *TrueVal,
   72 static Value *foldSelectWithBinaryOp(Value *Cond, Value *TrueVal,
   73                                      Value *FalseVal) {
  101   Value *X, *Y;
  127 static bool isSameCompare(Value *V, CmpInst::Predicate Pred, Value *LHS,
  127 static bool isSameCompare(Value *V, CmpInst::Predicate Pred, Value *LHS,
  128                           Value *RHS) {
  133   Value *CLHS = Cmp->getOperand(0), *CRHS = Cmp->getOperand(1);
  141 static bool valueDominatesPHI(Value *V, PHINode *P, const DominatorTree *DT) {
  171 static Value *ExpandBinOp(Instruction::BinaryOps Opcode, Value *LHS, Value *RHS,
  171 static Value *ExpandBinOp(Instruction::BinaryOps Opcode, Value *LHS, Value *RHS,
  171 static Value *ExpandBinOp(Instruction::BinaryOps Opcode, Value *LHS, Value *RHS,
  182       Value *A = Op0->getOperand(0), *B = Op0->getOperand(1), *C = RHS;
  184       if (Value *L = SimplifyBinOp(Opcode, A, C, Q, MaxRecurse))
  185         if (Value *R = SimplifyBinOp(Opcode, B, C, Q, MaxRecurse)) {
  194           if (Value *V = SimplifyBinOp(OpcodeToExpand, L, R, Q, MaxRecurse)) {
  205       Value *A = LHS, *B = Op1->getOperand(0), *C = Op1->getOperand(1);
  207       if (Value *L = SimplifyBinOp(Opcode, A, B, Q, MaxRecurse))
  208         if (Value *R = SimplifyBinOp(Opcode, A, C, Q, MaxRecurse)) {
  217           if (Value *V = SimplifyBinOp(OpcodeToExpand, L, R, Q, MaxRecurse)) {
  229 static Value *SimplifyAssociativeBinOp(Instruction::BinaryOps Opcode,
  230                                        Value *LHS, Value *RHS,
  230                                        Value *LHS, Value *RHS,
  244     Value *A = Op0->getOperand(0);
  245     Value *B = Op0->getOperand(1);
  246     Value *C = RHS;
  249     if (Value *V = SimplifyBinOp(Opcode, B, C, Q, MaxRecurse)) {
  254       if (Value *W = SimplifyBinOp(Opcode, A, V, Q, MaxRecurse)) {
  263     Value *A = LHS;
  264     Value *B = Op1->getOperand(0);
  265     Value *C = Op1->getOperand(1);
  268     if (Value *V = SimplifyBinOp(Opcode, A, B, Q, MaxRecurse)) {
  273       if (Value *W = SimplifyBinOp(Opcode, V, C, Q, MaxRecurse)) {
  286     Value *A = Op0->getOperand(0);
  287     Value *B = Op0->getOperand(1);
  288     Value *C = RHS;
  291     if (Value *V = SimplifyBinOp(Opcode, C, A, Q, MaxRecurse)) {
  296       if (Value *W = SimplifyBinOp(Opcode, V, B, Q, MaxRecurse)) {
  305     Value *A = LHS;
  306     Value *B = Op1->getOperand(0);
  307     Value *C = Op1->getOperand(1);
  310     if (Value *V = SimplifyBinOp(Opcode, C, A, Q, MaxRecurse)) {
  315       if (Value *W = SimplifyBinOp(Opcode, B, V, Q, MaxRecurse)) {
  329 static Value *ThreadBinOpOverSelect(Instruction::BinaryOps Opcode, Value *LHS,
  329 static Value *ThreadBinOpOverSelect(Instruction::BinaryOps Opcode, Value *LHS,
  330                                     Value *RHS, const SimplifyQuery &Q,
  345   Value *TV;
  346   Value *FV;
  382       Value *UnsimplifiedBranch = FV ? SI->getTrueValue() : SI->getFalseValue();
  383       Value *UnsimplifiedLHS = SI == LHS ? UnsimplifiedBranch : LHS;
  384       Value *UnsimplifiedRHS = SI == LHS ? RHS : UnsimplifiedBranch;
  401 static Value *ThreadCmpOverSelect(CmpInst::Predicate Pred, Value *LHS,
  401 static Value *ThreadCmpOverSelect(CmpInst::Predicate Pred, Value *LHS,
  402                                   Value *RHS, const SimplifyQuery &Q,
  415   Value *Cond = SI->getCondition();
  416   Value *TV = SI->getTrueValue();
  417   Value *FV = SI->getFalseValue();
  421   Value *TCmp = SimplifyCmpInst(Pred, TV, RHS, Q, MaxRecurse);
  435   Value *FCmp = SimplifyCmpInst(Pred, FV, RHS, Q, MaxRecurse);
  461     if (Value *V = SimplifyAndInst(Cond, TCmp, Q, MaxRecurse))
  466     if (Value *V = SimplifyOrInst(Cond, FCmp, Q, MaxRecurse))
  471     if (Value *V =
  483 static Value *ThreadBinOpOverPHI(Instruction::BinaryOps Opcode, Value *LHS,
  483 static Value *ThreadBinOpOverPHI(Instruction::BinaryOps Opcode, Value *LHS,
  484                                  Value *RHS, const SimplifyQuery &Q,
  505   Value *CommonValue = nullptr;
  506   for (Value *Incoming : PI->incoming_values()) {
  509     Value *V = PI == LHS ?
  526 static Value *ThreadCmpOverPHI(CmpInst::Predicate Pred, Value *LHS, Value *RHS,
  526 static Value *ThreadCmpOverPHI(CmpInst::Predicate Pred, Value *LHS, Value *RHS,
  526 static Value *ThreadCmpOverPHI(CmpInst::Predicate Pred, Value *LHS, Value *RHS,
  545   Value *CommonValue = nullptr;
  546   for (Value *Incoming : PI->incoming_values()) {
  549     Value *V = SimplifyCmpInst(Pred, Incoming, RHS, Q, MaxRecurse);
  561                                        Value *&Op0, Value *&Op1,
  561                                        Value *&Op0, Value *&Op1,
  576 static Value *SimplifyAddInst(Value *Op0, Value *Op1, bool IsNSW, bool IsNUW,
  576 static Value *SimplifyAddInst(Value *Op0, Value *Op1, bool IsNSW, bool IsNUW,
  576 static Value *SimplifyAddInst(Value *Op0, Value *Op1, bool IsNSW, bool IsNUW,
  596   Value *Y = nullptr;
  620     if (Value *V = SimplifyXorInst(Op0, Op1, Q, MaxRecurse-1))
  624   if (Value *V = SimplifyAssociativeBinOp(Instruction::Add, Op0, Op1, Q,
  640 Value *llvm::SimplifyAddInst(Value *Op0, Value *Op1, bool IsNSW, bool IsNUW,
  640 Value *llvm::SimplifyAddInst(Value *Op0, Value *Op1, bool IsNSW, bool IsNUW,
  640 Value *llvm::SimplifyAddInst(Value *Op0, Value *Op1, bool IsNSW, bool IsNUW,
  655 static Constant *stripAndComputeConstantOffsets(const DataLayout &DL, Value *&V,
  677 static Constant *computePointerDifference(const DataLayout &DL, Value *LHS,
  678                                           Value *RHS) {
  696 static Value *SimplifySubInst(Value *Op0, Value *Op1, bool isNSW, bool isNUW,
  696 static Value *SimplifySubInst(Value *Op0, Value *Op1, bool isNSW, bool isNUW,
  696 static Value *SimplifySubInst(Value *Op0, Value *Op1, bool isNSW, bool isNUW,
  734   Value *X = nullptr, *Y = nullptr, *Z = Op1;
  737     if (Value *V = SimplifyBinOp(Instruction::Sub, Y, Z, Q, MaxRecurse-1))
  739       if (Value *W = SimplifyBinOp(Instruction::Add, X, V, Q, MaxRecurse-1)) {
  745     if (Value *V = SimplifyBinOp(Instruction::Sub, X, Z, Q, MaxRecurse-1))
  747       if (Value *W = SimplifyBinOp(Instruction::Add, Y, V, Q, MaxRecurse-1)) {
  759     if (Value *V = SimplifyBinOp(Instruction::Sub, X, Y, Q, MaxRecurse-1))
  761       if (Value *W = SimplifyBinOp(Instruction::Sub, V, Z, Q, MaxRecurse-1)) {
  767     if (Value *V = SimplifyBinOp(Instruction::Sub, X, Z, Q, MaxRecurse-1))
  769       if (Value *W = SimplifyBinOp(Instruction::Sub, V, Y, Q, MaxRecurse-1)) {
  781     if (Value *V = SimplifyBinOp(Instruction::Sub, Z, X, Q, MaxRecurse-1))
  783       if (Value *W = SimplifyBinOp(Instruction::Add, V, Y, Q, MaxRecurse-1)) {
  794       if (Value *V = SimplifyBinOp(Instruction::Sub, X, Y, Q, MaxRecurse-1))
  796         if (Value *W = SimplifyCastInst(Instruction::Trunc, V, Op0->getType(),
  809     if (Value *V = SimplifyXorInst(Op0, Op1, Q, MaxRecurse-1))
  824 Value *llvm::SimplifySubInst(Value *Op0, Value *Op1, bool isNSW, bool isNUW,
  824 Value *llvm::SimplifySubInst(Value *Op0, Value *Op1, bool isNSW, bool isNUW,
  824 Value *llvm::SimplifySubInst(Value *Op0, Value *Op1, bool isNSW, bool isNUW,
  831 static Value *SimplifyMulInst(Value *Op0, Value *Op1, const SimplifyQuery &Q,
  831 static Value *SimplifyMulInst(Value *Op0, Value *Op1, const SimplifyQuery &Q,
  831 static Value *SimplifyMulInst(Value *Op0, Value *Op1, const SimplifyQuery &Q,
  846   Value *X = nullptr;
  855     if (Value *V = SimplifyAndInst(Op0, Op1, Q, MaxRecurse-1))
  859   if (Value *V = SimplifyAssociativeBinOp(Instruction::Mul, Op0, Op1, Q,
  864   if (Value *V = ExpandBinOp(Instruction::Mul, Op0, Op1, Instruction::Add,
  871     if (Value *V = ThreadBinOpOverSelect(Instruction::Mul, Op0, Op1, Q,
  878     if (Value *V = ThreadBinOpOverPHI(Instruction::Mul, Op0, Op1, Q,
  885 Value *llvm::SimplifyMulInst(Value *Op0, Value *Op1, const SimplifyQuery &Q) {
  885 Value *llvm::SimplifyMulInst(Value *Op0, Value *Op1, const SimplifyQuery &Q) {
  885 Value *llvm::SimplifyMulInst(Value *Op0, Value *Op1, const SimplifyQuery &Q) {
  891 static Value *simplifyDivRem(Value *Op0, Value *Op1, bool IsDiv) {
  891 static Value *simplifyDivRem(Value *Op0, Value *Op1, bool IsDiv) {
  891 static Value *simplifyDivRem(Value *Op0, Value *Op1, bool IsDiv) {
  937   Value *X;
  948 static bool isICmpTrue(ICmpInst::Predicate Pred, Value *LHS, Value *RHS,
  948 static bool isICmpTrue(ICmpInst::Predicate Pred, Value *LHS, Value *RHS,
  950   Value *V = SimplifyICmpInst(Pred, LHS, RHS, Q, MaxRecurse);
  957 static bool isDivZero(Value *X, Value *Y, const SimplifyQuery &Q,
  957 static bool isDivZero(Value *X, Value *Y, const SimplifyQuery &Q,
 1008 static Value *simplifyDiv(Instruction::BinaryOps Opcode, Value *Op0, Value *Op1,
 1008 static Value *simplifyDiv(Instruction::BinaryOps Opcode, Value *Op0, Value *Op1,
 1008 static Value *simplifyDiv(Instruction::BinaryOps Opcode, Value *Op0, Value *Op1,
 1013   if (Value *V = simplifyDivRem(Op0, Op1, true))
 1019   Value *X;
 1050     if (Value *V = ThreadBinOpOverSelect(Opcode, Op0, Op1, Q, MaxRecurse))
 1056     if (Value *V = ThreadBinOpOverPHI(Opcode, Op0, Op1, Q, MaxRecurse))
 1066 static Value *simplifyRem(Instruction::BinaryOps Opcode, Value *Op0, Value *Op1,
 1066 static Value *simplifyRem(Instruction::BinaryOps Opcode, Value *Op0, Value *Op1,
 1066 static Value *simplifyRem(Instruction::BinaryOps Opcode, Value *Op0, Value *Op1,
 1071   if (Value *V = simplifyDivRem(Op0, Op1, false))
 1092     if (Value *V = ThreadBinOpOverSelect(Opcode, Op0, Op1, Q, MaxRecurse))
 1098     if (Value *V = ThreadBinOpOverPHI(Opcode, Op0, Op1, Q, MaxRecurse))
 1110 static Value *SimplifySDivInst(Value *Op0, Value *Op1, const SimplifyQuery &Q,
 1110 static Value *SimplifySDivInst(Value *Op0, Value *Op1, const SimplifyQuery &Q,
 1110 static Value *SimplifySDivInst(Value *Op0, Value *Op1, const SimplifyQuery &Q,
 1119 Value *llvm::SimplifySDivInst(Value *Op0, Value *Op1, const SimplifyQuery &Q) {
 1119 Value *llvm::SimplifySDivInst(Value *Op0, Value *Op1, const SimplifyQuery &Q) {
 1119 Value *llvm::SimplifySDivInst(Value *Op0, Value *Op1, const SimplifyQuery &Q) {
 1125 static Value *SimplifyUDivInst(Value *Op0, Value *Op1, const SimplifyQuery &Q,
 1125 static Value *SimplifyUDivInst(Value *Op0, Value *Op1, const SimplifyQuery &Q,
 1125 static Value *SimplifyUDivInst(Value *Op0, Value *Op1, const SimplifyQuery &Q,
 1130 Value *llvm::SimplifyUDivInst(Value *Op0, Value *Op1, const SimplifyQuery &Q) {
 1130 Value *llvm::SimplifyUDivInst(Value *Op0, Value *Op1, const SimplifyQuery &Q) {
 1130 Value *llvm::SimplifyUDivInst(Value *Op0, Value *Op1, const SimplifyQuery &Q) {
 1136 static Value *SimplifySRemInst(Value *Op0, Value *Op1, const SimplifyQuery &Q,
 1136 static Value *SimplifySRemInst(Value *Op0, Value *Op1, const SimplifyQuery &Q,
 1136 static Value *SimplifySRemInst(Value *Op0, Value *Op1, const SimplifyQuery &Q,
 1140   Value *X;
 1151 Value *llvm::SimplifySRemInst(Value *Op0, Value *Op1, const SimplifyQuery &Q) {
 1151 Value *llvm::SimplifySRemInst(Value *Op0, Value *Op1, const SimplifyQuery &Q) {
 1151 Value *llvm::SimplifySRemInst(Value *Op0, Value *Op1, const SimplifyQuery &Q) {
 1157 static Value *SimplifyURemInst(Value *Op0, Value *Op1, const SimplifyQuery &Q,
 1157 static Value *SimplifyURemInst(Value *Op0, Value *Op1, const SimplifyQuery &Q,
 1157 static Value *SimplifyURemInst(Value *Op0, Value *Op1, const SimplifyQuery &Q,
 1162 Value *llvm::SimplifyURemInst(Value *Op0, Value *Op1, const SimplifyQuery &Q) {
 1162 Value *llvm::SimplifyURemInst(Value *Op0, Value *Op1, const SimplifyQuery &Q) {
 1162 Value *llvm::SimplifyURemInst(Value *Op0, Value *Op1, const SimplifyQuery &Q) {
 1167 static bool isUndefShift(Value *Amount) {
 1195 static Value *SimplifyShift(Instruction::BinaryOps Opcode, Value *Op0,
 1195 static Value *SimplifyShift(Instruction::BinaryOps Opcode, Value *Op0,
 1196                             Value *Op1, const SimplifyQuery &Q, unsigned MaxRecurse) {
 1207   Value *X;
 1219     if (Value *V = ThreadBinOpOverSelect(Opcode, Op0, Op1, Q, MaxRecurse))
 1225     if (Value *V = ThreadBinOpOverPHI(Opcode, Op0, Op1, Q, MaxRecurse))
 1245 static Value *SimplifyRightShift(Instruction::BinaryOps Opcode, Value *Op0,
 1245 static Value *SimplifyRightShift(Instruction::BinaryOps Opcode, Value *Op0,
 1246                                  Value *Op1, bool isExact, const SimplifyQuery &Q,
 1248   if (Value *V = SimplifyShift(Opcode, Op0, Op1, Q, MaxRecurse))
 1272 static Value *SimplifyShlInst(Value *Op0, Value *Op1, bool isNSW, bool isNUW,
 1272 static Value *SimplifyShlInst(Value *Op0, Value *Op1, bool isNSW, bool isNUW,
 1272 static Value *SimplifyShlInst(Value *Op0, Value *Op1, bool isNSW, bool isNUW,
 1274   if (Value *V = SimplifyShift(Instruction::Shl, Op0, Op1, Q, MaxRecurse))
 1283   Value *X;
 1297 Value *llvm::SimplifyShlInst(Value *Op0, Value *Op1, bool isNSW, bool isNUW,
 1297 Value *llvm::SimplifyShlInst(Value *Op0, Value *Op1, bool isNSW, bool isNUW,
 1297 Value *llvm::SimplifyShlInst(Value *Op0, Value *Op1, bool isNSW, bool isNUW,
 1304 static Value *SimplifyLShrInst(Value *Op0, Value *Op1, bool isExact,
 1304 static Value *SimplifyLShrInst(Value *Op0, Value *Op1, bool isExact,
 1304 static Value *SimplifyLShrInst(Value *Op0, Value *Op1, bool isExact,
 1306   if (Value *V = SimplifyRightShift(Instruction::LShr, Op0, Op1, isExact, Q,
 1311   Value *X;
 1320   Value *Y;
 1335 Value *llvm::SimplifyLShrInst(Value *Op0, Value *Op1, bool isExact,
 1335 Value *llvm::SimplifyLShrInst(Value *Op0, Value *Op1, bool isExact,
 1335 Value *llvm::SimplifyLShrInst(Value *Op0, Value *Op1, bool isExact,
 1342 static Value *SimplifyAShrInst(Value *Op0, Value *Op1, bool isExact,
 1342 static Value *SimplifyAShrInst(Value *Op0, Value *Op1, bool isExact,
 1342 static Value *SimplifyAShrInst(Value *Op0, Value *Op1, bool isExact,
 1344   if (Value *V = SimplifyRightShift(Instruction::AShr, Op0, Op1, isExact, Q,
 1354   Value *X;
 1366 Value *llvm::SimplifyAShrInst(Value *Op0, Value *Op1, bool isExact,
 1366 Value *llvm::SimplifyAShrInst(Value *Op0, Value *Op1, bool isExact,
 1366 Value *llvm::SimplifyAShrInst(Value *Op0, Value *Op1, bool isExact,
 1373 static Value *simplifyUnsignedRangeCheck(ICmpInst *ZeroICmp,
 1376   Value *X, *Y;
 1385   Value *A, *B;
 1484 static Value *simplifyAndOfICmpsWithSameOperands(ICmpInst *Op0, ICmpInst *Op1) {
 1486   Value *A ,*B;
 1509 static Value *simplifyOrOfICmpsWithSameOperands(ICmpInst *Op0, ICmpInst *Op1) {
 1511   Value *A ,*B;
 1536 static Value *simplifyAndOrOfICmpsWithConstants(ICmpInst *Cmp0, ICmpInst *Cmp1,
 1573 static Value *simplifyAndOrOfICmpsWithZero(ICmpInst *Cmp0, ICmpInst *Cmp1,
 1584   Value *X = Cmp0->getOperand(0);
 1585   Value *Y = Cmp1->getOperand(0);
 1610 static Value *simplifyAndOfICmpsWithAdd(ICmpInst *Op0, ICmpInst *Op1,
 1615   Value *V;
 1657 static Value *simplifyAndOfICmps(ICmpInst *Op0, ICmpInst *Op1,
 1659   if (Value *X = simplifyUnsignedRangeCheck(Op0, Op1, /*IsAnd=*/true, Q))
 1661   if (Value *X = simplifyUnsignedRangeCheck(Op1, Op0, /*IsAnd=*/true, Q))
 1664   if (Value *X = simplifyAndOfICmpsWithSameOperands(Op0, Op1))
 1666   if (Value *X = simplifyAndOfICmpsWithSameOperands(Op1, Op0))
 1669   if (Value *X = simplifyAndOrOfICmpsWithConstants(Op0, Op1, true))
 1672   if (Value *X = simplifyAndOrOfICmpsWithZero(Op0, Op1, true))
 1675   if (Value *X = simplifyAndOfICmpsWithAdd(Op0, Op1, Q.IIQ))
 1677   if (Value *X = simplifyAndOfICmpsWithAdd(Op1, Op0, Q.IIQ))
 1683 static Value *simplifyOrOfICmpsWithAdd(ICmpInst *Op0, ICmpInst *Op1,
 1688   Value *V;
 1730 static Value *simplifyOrOfICmps(ICmpInst *Op0, ICmpInst *Op1,
 1732   if (Value *X = simplifyUnsignedRangeCheck(Op0, Op1, /*IsAnd=*/false, Q))
 1734   if (Value *X = simplifyUnsignedRangeCheck(Op1, Op0, /*IsAnd=*/false, Q))
 1737   if (Value *X = simplifyOrOfICmpsWithSameOperands(Op0, Op1))
 1739   if (Value *X = simplifyOrOfICmpsWithSameOperands(Op1, Op0))
 1742   if (Value *X = simplifyAndOrOfICmpsWithConstants(Op0, Op1, false))
 1745   if (Value *X = simplifyAndOrOfICmpsWithZero(Op0, Op1, false))
 1748   if (Value *X = simplifyOrOfICmpsWithAdd(Op0, Op1, Q.IIQ))
 1750   if (Value *X = simplifyOrOfICmpsWithAdd(Op1, Op0, Q.IIQ))
 1756 static Value *simplifyAndOrOfFCmps(const TargetLibraryInfo *TLI,
 1758   Value *LHS0 = LHS->getOperand(0), *LHS1 = LHS->getOperand(1);
 1759   Value *RHS0 = RHS->getOperand(0), *RHS1 = RHS->getOperand(1);
 1794 static Value *simplifyAndOrOfCmps(const SimplifyQuery &Q,
 1795                                   Value *Op0, Value *Op1, bool IsAnd) {
 1795                                   Value *Op0, Value *Op1, bool IsAnd) {
 1805   Value *V = nullptr;
 1833 static bool omitCheckForZeroBeforeMulWithOverflowInternal(Value *Op1,
 1834                                                           Value *X) {
 1839   Value *Agg = Extract->getAggregateOperand();
 1860 static Value *omitCheckForZeroBeforeMulWithOverflow(Value *Op0, Value *Op1) {
 1860 static Value *omitCheckForZeroBeforeMulWithOverflow(Value *Op0, Value *Op1) {
 1860 static Value *omitCheckForZeroBeforeMulWithOverflow(Value *Op0, Value *Op1) {
 1862   Value *X;
 1883 static Value *omitCheckForZeroBeforeInvertedMulWithOverflow(Value *Op0,
 1883 static Value *omitCheckForZeroBeforeInvertedMulWithOverflow(Value *Op0,
 1884                                                             Value *NotOp1) {
 1886   Value *X;
 1891   Value *Op1;
 1903 static Value *SimplifyAndInst(Value *Op0, Value *Op1, const SimplifyQuery &Q,
 1903 static Value *SimplifyAndInst(Value *Op0, Value *Op1, const SimplifyQuery &Q,
 1903 static Value *SimplifyAndInst(Value *Op0, Value *Op1, const SimplifyQuery &Q,
 1938   Value *X;
 1958   if (Value *V = omitCheckForZeroBeforeMulWithOverflow(Op0, Op1))
 1960   if (Value *V = omitCheckForZeroBeforeMulWithOverflow(Op1, Op0))
 1984   if (Value *V = simplifyAndOrOfCmps(Q, Op0, Op1, true))
 1988   if (Value *V = SimplifyAssociativeBinOp(Instruction::And, Op0, Op1, Q,
 1993   if (Value *V = ExpandBinOp(Instruction::And, Op0, Op1, Instruction::Or,
 1998   if (Value *V = ExpandBinOp(Instruction::And, Op0, Op1, Instruction::Xor,
 2005     if (Value *V = ThreadBinOpOverSelect(Instruction::And, Op0, Op1, Q,
 2012     if (Value *V = ThreadBinOpOverPHI(Instruction::And, Op0, Op1, Q,
 2026   Value *Y, *XShifted;
 2053 Value *llvm::SimplifyAndInst(Value *Op0, Value *Op1, const SimplifyQuery &Q) {
 2053 Value *llvm::SimplifyAndInst(Value *Op0, Value *Op1, const SimplifyQuery &Q) {
 2053 Value *llvm::SimplifyAndInst(Value *Op0, Value *Op1, const SimplifyQuery &Q) {
 2059 static Value *SimplifyOrInst(Value *Op0, Value *Op1, const SimplifyQuery &Q,
 2059 static Value *SimplifyOrInst(Value *Op0, Value *Op1, const SimplifyQuery &Q,
 2059 static Value *SimplifyOrInst(Value *Op0, Value *Op1, const SimplifyQuery &Q,
 2096   Value *A, *B;
 2134   if (Value *V = simplifyAndOrOfCmps(Q, Op0, Op1, false))
 2140   if (Value *V = omitCheckForZeroBeforeInvertedMulWithOverflow(Op0, Op1))
 2142   if (Value *V = omitCheckForZeroBeforeInvertedMulWithOverflow(Op1, Op0))
 2146   if (Value *V = SimplifyAssociativeBinOp(Instruction::Or, Op0, Op1, Q,
 2151   if (Value *V = ExpandBinOp(Instruction::Or, Op0, Op1, Instruction::And, Q,
 2158     if (Value *V = ThreadBinOpOverSelect(Instruction::Or, Op0, Op1, Q,
 2171       Value *N;
 2191     if (Value *V = ThreadBinOpOverPHI(Instruction::Or, Op0, Op1, Q, MaxRecurse))
 2197 Value *llvm::SimplifyOrInst(Value *Op0, Value *Op1, const SimplifyQuery &Q) {
 2197 Value *llvm::SimplifyOrInst(Value *Op0, Value *Op1, const SimplifyQuery &Q) {
 2197 Value *llvm::SimplifyOrInst(Value *Op0, Value *Op1, const SimplifyQuery &Q) {
 2203 static Value *SimplifyXorInst(Value *Op0, Value *Op1, const SimplifyQuery &Q,
 2203 static Value *SimplifyXorInst(Value *Op0, Value *Op1, const SimplifyQuery &Q,
 2203 static Value *SimplifyXorInst(Value *Op0, Value *Op1, const SimplifyQuery &Q,
 2226   if (Value *V = SimplifyAssociativeBinOp(Instruction::Xor, Op0, Op1, Q,
 2242 Value *llvm::SimplifyXorInst(Value *Op0, Value *Op1, const SimplifyQuery &Q) {
 2242 Value *llvm::SimplifyXorInst(Value *Op0, Value *Op1, const SimplifyQuery &Q) {
 2242 Value *llvm::SimplifyXorInst(Value *Op0, Value *Op1, const SimplifyQuery &Q) {
 2247 static Type *GetCompareTy(Value *Op) {
 2254 static Value *ExtractEquivalentCondition(Value *V, CmpInst::Predicate Pred,
 2254 static Value *ExtractEquivalentCondition(Value *V, CmpInst::Predicate Pred,
 2255                                          Value *LHS, Value *RHS) {
 2255                                          Value *LHS, Value *RHS) {
 2262   Value *CmpLHS = Cmp->getOperand(0), *CmpRHS = Cmp->getOperand(1);
 2303                    const InstrInfoQuery &IIQ, Value *LHS, Value *RHS) {
 2303                    const InstrInfoQuery &IIQ, Value *LHS, Value *RHS) {
 2431     SmallVector<const Value *, 8> LHSUObjs, RHSUObjs;
 2468     Value *MI = nullptr;
 2487 static Value *simplifyICmpOfBools(CmpInst::Predicate Pred, Value *LHS,
 2487 static Value *simplifyICmpOfBools(CmpInst::Predicate Pred, Value *LHS,
 2488                                   Value *RHS, const SimplifyQuery &Q) {
 2561 static Value *simplifyICmpWithZero(CmpInst::Predicate Pred, Value *LHS,
 2561 static Value *simplifyICmpWithZero(CmpInst::Predicate Pred, Value *LHS,
 2562                                    Value *RHS, const SimplifyQuery &Q) {
 2623 static Value *simplifyICmpWithConstant(CmpInst::Predicate Pred, Value *LHS,
 2623 static Value *simplifyICmpWithConstant(CmpInst::Predicate Pred, Value *LHS,
 2624                                        Value *RHS, const InstrInfoQuery &IIQ) {
 2627   Value *X;
 2664 static Value *simplifyICmpWithBinOp(CmpInst::Predicate Pred, Value *LHS,
 2664 static Value *simplifyICmpWithBinOp(CmpInst::Predicate Pred, Value *LHS,
 2665                                     Value *RHS, const SimplifyQuery &Q,
 2673     Value *A = nullptr, *B = nullptr, *C = nullptr, *D = nullptr;
 2699       if (Value *V = SimplifyICmpInst(Pred, A == RHS ? B : A,
 2706       if (Value *V =
 2715       Value *Y, *Z;
 2734       if (Value *V = SimplifyICmpInst(Pred, Y, Z, Q, MaxRecurse - 1))
 2740     Value *Y = nullptr;
 2940       if (Value *V = SimplifyICmpInst(Pred, LBO->getOperand(0),
 2948       if (Value *V = SimplifyICmpInst(Pred, LBO->getOperand(0),
 2955       if (Value *V = SimplifyICmpInst(Pred, LBO->getOperand(0),
 2966       if (Value *V = SimplifyICmpInst(Pred, LBO->getOperand(0),
 2978 static Value *simplifyICmpWithMinMax(CmpInst::Predicate Pred, Value *LHS,
 2978 static Value *simplifyICmpWithMinMax(CmpInst::Predicate Pred, Value *LHS,
 2979                                      Value *RHS, const SimplifyQuery &Q,
 2982   Value *A, *B;
 3026       if (Value *V = ExtractEquivalentCondition(LHS, EqP, A, B))
 3028       if (Value *V = ExtractEquivalentCondition(RHS, EqP, A, B))
 3032         if (Value *V = SimplifyICmpInst(EqP, A, B, Q, MaxRecurse - 1))
 3040       if (Value *V = ExtractEquivalentCondition(LHS, InvEqP, A, B))
 3042       if (Value *V = ExtractEquivalentCondition(RHS, InvEqP, A, B))
 3046         if (Value *V = SimplifyICmpInst(InvEqP, A, B, Q, MaxRecurse - 1))
 3100       if (Value *V = ExtractEquivalentCondition(LHS, EqP, A, B))
 3102       if (Value *V = ExtractEquivalentCondition(RHS, EqP, A, B))
 3106         if (Value *V = SimplifyICmpInst(EqP, A, B, Q, MaxRecurse - 1))
 3114       if (Value *V = ExtractEquivalentCondition(LHS, InvEqP, A, B))
 3116       if (Value *V = ExtractEquivalentCondition(RHS, InvEqP, A, B))
 3120         if (Value *V = SimplifyICmpInst(InvEqP, A, B, Q, MaxRecurse - 1))
 3134   Value *C, *D;
 3182 static Value *SimplifyICmpInst(unsigned Predicate, Value *LHS, Value *RHS,
 3182 static Value *SimplifyICmpInst(unsigned Predicate, Value *LHS, Value *RHS,
 3182 static Value *SimplifyICmpInst(unsigned Predicate, Value *LHS, Value *RHS,
 3210   if (Value *V = simplifyICmpOfBools(Pred, LHS, RHS, Q))
 3213   if (Value *V = simplifyICmpWithZero(Pred, LHS, RHS, Q))
 3216   if (Value *V = simplifyICmpWithConstant(Pred, LHS, RHS, Q.IIQ))
 3246     Value *SrcOp = LI->getOperand(0);
 3256         if (Value *V = SimplifyICmpInst(Pred, SrcOp,
 3263           if (Value *V = SimplifyICmpInst(Pred, SrcOp, RI->getOperand(0),
 3275           if (Value *V = SimplifyICmpInst(ICmpInst::getUnsignedPredicate(Pred),
 3291           if (Value *V = SimplifyICmpInst(ICmpInst::getUnsignedPredicate(Pred),
 3335           if (Value *V = SimplifyICmpInst(Pred, SrcOp, RI->getOperand(0),
 3350           if (Value *V = SimplifyICmpInst(Pred, SrcOp, Trunc, Q, MaxRecurse-1))
 3382               if (Value *V = SimplifyICmpInst(ICmpInst::ICMP_SLT, SrcOp,
 3391               if (Value *V = SimplifyICmpInst(ICmpInst::ICMP_SGE, SrcOp,
 3408   if (Value *V = simplifyICmpWithBinOp(Pred, LHS, RHS, Q, MaxRecurse))
 3411   if (Value *V = simplifyICmpWithMinMax(Pred, LHS, RHS, Q, MaxRecurse))
 3442         SmallVector<Value *, 4> IndicesLHS(GLHS->idx_begin(), GLHS->idx_end());
 3446         SmallVector<Value *, 4> IndicesRHS(GRHS->idx_begin(), GRHS->idx_end());
 3457     if (Value *V = ThreadCmpOverSelect(Pred, LHS, RHS, Q, MaxRecurse))
 3463     if (Value *V = ThreadCmpOverPHI(Pred, LHS, RHS, Q, MaxRecurse))
 3469 Value *llvm::SimplifyICmpInst(unsigned Predicate, Value *LHS, Value *RHS,
 3469 Value *llvm::SimplifyICmpInst(unsigned Predicate, Value *LHS, Value *RHS,
 3469 Value *llvm::SimplifyICmpInst(unsigned Predicate, Value *LHS, Value *RHS,
 3476 static Value *SimplifyFCmpInst(unsigned Predicate, Value *LHS, Value *RHS,
 3476 static Value *SimplifyFCmpInst(unsigned Predicate, Value *LHS, Value *RHS,
 3476 static Value *SimplifyFCmpInst(unsigned Predicate, Value *LHS, Value *RHS,
 3646     if (Value *V = ThreadCmpOverSelect(Pred, LHS, RHS, Q, MaxRecurse))
 3652     if (Value *V = ThreadCmpOverPHI(Pred, LHS, RHS, Q, MaxRecurse))
 3658 Value *llvm::SimplifyFCmpInst(unsigned Predicate, Value *LHS, Value *RHS,
 3658 Value *llvm::SimplifyFCmpInst(unsigned Predicate, Value *LHS, Value *RHS,
 3658 Value *llvm::SimplifyFCmpInst(unsigned Predicate, Value *LHS, Value *RHS,
 3664 static const Value *SimplifyWithOpReplaced(Value *V, Value *Op, Value *RepOp,
 3664 static const Value *SimplifyWithOpReplaced(Value *V, Value *Op, Value *RepOp,
 3664 static const Value *SimplifyWithOpReplaced(Value *V, Value *Op, Value *RepOp,
 3664 static const Value *SimplifyWithOpReplaced(Value *V, Value *Op, Value *RepOp,
 3721       SmallVector<Value *, 8> NewOps(GEP->getNumOperands());
 3764 static Value *simplifySelectBitTest(Value *TrueVal, Value *FalseVal, Value *X,
 3764 static Value *simplifySelectBitTest(Value *TrueVal, Value *FalseVal, Value *X,
 3764 static Value *simplifySelectBitTest(Value *TrueVal, Value *FalseVal, Value *X,
 3764 static Value *simplifySelectBitTest(Value *TrueVal, Value *FalseVal, Value *X,
 3799 static Value *simplifySelectWithFakeICmpEq(Value *CmpLHS, Value *CmpRHS,
 3799 static Value *simplifySelectWithFakeICmpEq(Value *CmpLHS, Value *CmpRHS,
 3799 static Value *simplifySelectWithFakeICmpEq(Value *CmpLHS, Value *CmpRHS,
 3801                                            Value *TrueVal, Value *FalseVal) {
 3801                                            Value *TrueVal, Value *FalseVal) {
 3802   Value *X;
 3813 static Value *simplifySelectWithICmpCond(Value *CondVal, Value *TrueVal,
 3813 static Value *simplifySelectWithICmpCond(Value *CondVal, Value *TrueVal,
 3813 static Value *simplifySelectWithICmpCond(Value *CondVal, Value *TrueVal,
 3814                                          Value *FalseVal, const SimplifyQuery &Q,
 3817   Value *CmpLHS, *CmpRHS;
 3822     Value *X;
 3825       if (Value *V = simplifySelectBitTest(TrueVal, FalseVal, X, Y,
 3830     Value *ShAmt;
 3870   if (Value *V = simplifySelectWithFakeICmpEq(CmpLHS, CmpRHS, Pred,
 3906 static Value *simplifySelectWithFCmp(Value *Cond, Value *T, Value *F) {
 3906 static Value *simplifySelectWithFCmp(Value *Cond, Value *T, Value *F) {
 3906 static Value *simplifySelectWithFCmp(Value *Cond, Value *T, Value *F) {
 3906 static Value *simplifySelectWithFCmp(Value *Cond, Value *T, Value *F) {
 3934 static Value *SimplifySelectInst(Value *Cond, Value *TrueVal, Value *FalseVal,
 3934 static Value *SimplifySelectInst(Value *Cond, Value *TrueVal, Value *FalseVal,
 3934 static Value *SimplifySelectInst(Value *Cond, Value *TrueVal, Value *FalseVal,
 3934 static Value *SimplifySelectInst(Value *Cond, Value *TrueVal, Value *FalseVal,
 3964   if (Value *V =
 3968   if (Value *V = simplifySelectWithFCmp(Cond, TrueVal, FalseVal))
 3971   if (Value *V = foldSelectWithBinaryOp(Cond, TrueVal, FalseVal))
 3981 Value *llvm::SimplifySelectInst(Value *Cond, Value *TrueVal, Value *FalseVal,
 3981 Value *llvm::SimplifySelectInst(Value *Cond, Value *TrueVal, Value *FalseVal,
 3981 Value *llvm::SimplifySelectInst(Value *Cond, Value *TrueVal, Value *FalseVal,
 3981 Value *llvm::SimplifySelectInst(Value *Cond, Value *TrueVal, Value *FalseVal,
 3988 static Value *SimplifyGEPInst(Type *SrcTy, ArrayRef<Value *> Ops,
 3988 static Value *SimplifyGEPInst(Type *SrcTy, ArrayRef<Value *> Ops,
 4016       Value *P;
 4030           Value *Temp;
 4040           if (Value *R = PtrToIntOrZero(P))
 4049           if (Value *R = PtrToIntOrZero(P))
 4057           if (Value *R = PtrToIntOrZero(P))
 4070       Value *StrippedBasePtr =
 4100 Value *llvm::SimplifyGEPInst(Type *SrcTy, ArrayRef<Value *> Ops,
 4100 Value *llvm::SimplifyGEPInst(Type *SrcTy, ArrayRef<Value *> Ops,
 4107 static Value *SimplifyInsertValueInst(Value *Agg, Value *Val,
 4107 static Value *SimplifyInsertValueInst(Value *Agg, Value *Val,
 4107 static Value *SimplifyInsertValueInst(Value *Agg, Value *Val,
 4134 Value *llvm::SimplifyInsertValueInst(Value *Agg, Value *Val,
 4134 Value *llvm::SimplifyInsertValueInst(Value *Agg, Value *Val,
 4134 Value *llvm::SimplifyInsertValueInst(Value *Agg, Value *Val,
 4140 Value *llvm::SimplifyInsertElementInst(Value *Vec, Value *Val, Value *Idx,
 4140 Value *llvm::SimplifyInsertElementInst(Value *Vec, Value *Val, Value *Idx,
 4140 Value *llvm::SimplifyInsertElementInst(Value *Vec, Value *Val, Value *Idx,
 4140 Value *llvm::SimplifyInsertElementInst(Value *Vec, Value *Val, Value *Idx,
 4176 static Value *SimplifyExtractValueInst(Value *Agg, ArrayRef<unsigned> Idxs,
 4176 static Value *SimplifyExtractValueInst(Value *Agg, ArrayRef<unsigned> Idxs,
 4199 Value *llvm::SimplifyExtractValueInst(Value *Agg, ArrayRef<unsigned> Idxs,
 4199 Value *llvm::SimplifyExtractValueInst(Value *Agg, ArrayRef<unsigned> Idxs,
 4206 static Value *SimplifyExtractElementInst(Value *Vec, Value *Idx, const SimplifyQuery &,
 4206 static Value *SimplifyExtractElementInst(Value *Vec, Value *Idx, const SimplifyQuery &,
 4206 static Value *SimplifyExtractElementInst(Value *Vec, Value *Idx, const SimplifyQuery &,
 4226     if (Value *Elt = findScalarElement(Vec, IdxC->getZExtValue()))
 4238 Value *llvm::SimplifyExtractElementInst(Value *Vec, Value *Idx,
 4238 Value *llvm::SimplifyExtractElementInst(Value *Vec, Value *Idx,
 4238 Value *llvm::SimplifyExtractElementInst(Value *Vec, Value *Idx,
 4244 static Value *SimplifyPHINode(PHINode *PN, const SimplifyQuery &Q) {
 4247   Value *CommonValue = nullptr;
 4249   for (Value *Incoming : PN->incoming_values()) {
 4276 static Value *SimplifyCastInst(unsigned CastOpc, Value *Op,
 4276 static Value *SimplifyCastInst(unsigned CastOpc, Value *Op,
 4282     auto *Src = CI->getOperand(0);
 4310 Value *llvm::SimplifyCastInst(unsigned CastOpc, Value *Op, Type *Ty,
 4310 Value *llvm::SimplifyCastInst(unsigned CastOpc, Value *Op, Type *Ty,
 4318 static Value *foldIdentityShuffles(int DestElt, Value *Op0, Value *Op1,
 4318 static Value *foldIdentityShuffles(int DestElt, Value *Op0, Value *Op1,
 4318 static Value *foldIdentityShuffles(int DestElt, Value *Op0, Value *Op1,
 4319                                    int MaskVal, Value *RootVec,
 4332   Value *SourceOp = Op0;
 4366 static Value *SimplifyShuffleVectorInst(Value *Op0, Value *Op1, Constant *Mask,
 4366 static Value *SimplifyShuffleVectorInst(Value *Op0, Value *Op1, Constant *Mask,
 4366 static Value *SimplifyShuffleVectorInst(Value *Op0, Value *Op1, Constant *Mask,
 4428   Value *RootVec = nullptr;
 4443 Value *llvm::SimplifyShuffleVectorInst(Value *Op0, Value *Op1, Constant *Mask,
 4443 Value *llvm::SimplifyShuffleVectorInst(Value *Op0, Value *Op1, Constant *Mask,
 4443 Value *llvm::SimplifyShuffleVectorInst(Value *Op0, Value *Op1, Constant *Mask,
 4449                               Value *&Op, const SimplifyQuery &Q) {
 4457 static Value *simplifyFNegInst(Value *Op, FastMathFlags FMF,
 4457 static Value *simplifyFNegInst(Value *Op, FastMathFlags FMF,
 4462   Value *X;
 4470 Value *llvm::SimplifyFNegInst(Value *Op, FastMathFlags FMF,
 4470 Value *llvm::SimplifyFNegInst(Value *Op, FastMathFlags FMF,
 4488 static Constant *simplifyFPOp(ArrayRef<Value *> Ops) {
 4492   for (Value *V : Ops)
 4501 static Value *SimplifyFAddInst(Value *Op0, Value *Op1, FastMathFlags FMF,
 4501 static Value *SimplifyFAddInst(Value *Op0, Value *Op1, FastMathFlags FMF,
 4501 static Value *SimplifyFAddInst(Value *Op0, Value *Op1, FastMathFlags FMF,
 4537   Value *X;
 4548 static Value *SimplifyFSubInst(Value *Op0, Value *Op1, FastMathFlags FMF,
 4548 static Value *SimplifyFSubInst(Value *Op0, Value *Op1, FastMathFlags FMF,
 4548 static Value *SimplifyFSubInst(Value *Op0, Value *Op1, FastMathFlags FMF,
 4567   Value *X;
 4593 static Value *SimplifyFMAFMul(Value *Op0, Value *Op1, FastMathFlags FMF,
 4593 static Value *SimplifyFMAFMul(Value *Op0, Value *Op1, FastMathFlags FMF,
 4593 static Value *SimplifyFMAFMul(Value *Op0, Value *Op1, FastMathFlags FMF,
 4618   Value *X;
 4627 static Value *SimplifyFMulInst(Value *Op0, Value *Op1, FastMathFlags FMF,
 4627 static Value *SimplifyFMulInst(Value *Op0, Value *Op1, FastMathFlags FMF,
 4627 static Value *SimplifyFMulInst(Value *Op0, Value *Op1, FastMathFlags FMF,
 4636 Value *llvm::SimplifyFAddInst(Value *Op0, Value *Op1, FastMathFlags FMF,
 4636 Value *llvm::SimplifyFAddInst(Value *Op0, Value *Op1, FastMathFlags FMF,
 4636 Value *llvm::SimplifyFAddInst(Value *Op0, Value *Op1, FastMathFlags FMF,
 4642 Value *llvm::SimplifyFSubInst(Value *Op0, Value *Op1, FastMathFlags FMF,
 4642 Value *llvm::SimplifyFSubInst(Value *Op0, Value *Op1, FastMathFlags FMF,
 4642 Value *llvm::SimplifyFSubInst(Value *Op0, Value *Op1, FastMathFlags FMF,
 4647 Value *llvm::SimplifyFMulInst(Value *Op0, Value *Op1, FastMathFlags FMF,
 4647 Value *llvm::SimplifyFMulInst(Value *Op0, Value *Op1, FastMathFlags FMF,
 4647 Value *llvm::SimplifyFMulInst(Value *Op0, Value *Op1, FastMathFlags FMF,
 4652 Value *llvm::SimplifyFMAFMul(Value *Op0, Value *Op1, FastMathFlags FMF,
 4652 Value *llvm::SimplifyFMAFMul(Value *Op0, Value *Op1, FastMathFlags FMF,
 4652 Value *llvm::SimplifyFMAFMul(Value *Op0, Value *Op1, FastMathFlags FMF,
 4657 static Value *SimplifyFDivInst(Value *Op0, Value *Op1, FastMathFlags FMF,
 4657 static Value *SimplifyFDivInst(Value *Op0, Value *Op1, FastMathFlags FMF,
 4657 static Value *SimplifyFDivInst(Value *Op0, Value *Op1, FastMathFlags FMF,
 4682     Value *X;
 4697 Value *llvm::SimplifyFDivInst(Value *Op0, Value *Op1, FastMathFlags FMF,
 4697 Value *llvm::SimplifyFDivInst(Value *Op0, Value *Op1, FastMathFlags FMF,
 4697 Value *llvm::SimplifyFDivInst(Value *Op0, Value *Op1, FastMathFlags FMF,
 4702 static Value *SimplifyFRemInst(Value *Op0, Value *Op1, FastMathFlags FMF,
 4702 static Value *SimplifyFRemInst(Value *Op0, Value *Op1, FastMathFlags FMF,
 4702 static Value *SimplifyFRemInst(Value *Op0, Value *Op1, FastMathFlags FMF,
 4725 Value *llvm::SimplifyFRemInst(Value *Op0, Value *Op1, FastMathFlags FMF,
 4725 Value *llvm::SimplifyFRemInst(Value *Op0, Value *Op1, FastMathFlags FMF,
 4725 Value *llvm::SimplifyFRemInst(Value *Op0, Value *Op1, FastMathFlags FMF,
 4734 static Value *simplifyUnOp(unsigned Opcode, Value *Op, const SimplifyQuery &Q,
 4734 static Value *simplifyUnOp(unsigned Opcode, Value *Op, const SimplifyQuery &Q,
 4747 static Value *simplifyFPUnOp(unsigned Opcode, Value *Op,
 4747 static Value *simplifyFPUnOp(unsigned Opcode, Value *Op,
 4758 Value *llvm::SimplifyUnOp(unsigned Opcode, Value *Op, const SimplifyQuery &Q) {
 4758 Value *llvm::SimplifyUnOp(unsigned Opcode, Value *Op, const SimplifyQuery &Q) {
 4762 Value *llvm::SimplifyUnOp(unsigned Opcode, Value *Op, FastMathFlags FMF,
 4762 Value *llvm::SimplifyUnOp(unsigned Opcode, Value *Op, FastMathFlags FMF,
 4769 static Value *SimplifyBinOp(unsigned Opcode, Value *LHS, Value *RHS,
 4769 static Value *SimplifyBinOp(unsigned Opcode, Value *LHS, Value *RHS,
 4769 static Value *SimplifyBinOp(unsigned Opcode, Value *LHS, Value *RHS,
 4816 static Value *SimplifyBinOp(unsigned Opcode, Value *LHS, Value *RHS,
 4816 static Value *SimplifyBinOp(unsigned Opcode, Value *LHS, Value *RHS,
 4816 static Value *SimplifyBinOp(unsigned Opcode, Value *LHS, Value *RHS,
 4833 Value *llvm::SimplifyBinOp(unsigned Opcode, Value *LHS, Value *RHS,
 4833 Value *llvm::SimplifyBinOp(unsigned Opcode, Value *LHS, Value *RHS,
 4833 Value *llvm::SimplifyBinOp(unsigned Opcode, Value *LHS, Value *RHS,
 4838 Value *llvm::SimplifyBinOp(unsigned Opcode, Value *LHS, Value *RHS,
 4838 Value *llvm::SimplifyBinOp(unsigned Opcode, Value *LHS, Value *RHS,
 4838 Value *llvm::SimplifyBinOp(unsigned Opcode, Value *LHS, Value *RHS,
 4844 static Value *SimplifyCmpInst(unsigned Predicate, Value *LHS, Value *RHS,
 4844 static Value *SimplifyCmpInst(unsigned Predicate, Value *LHS, Value *RHS,
 4844 static Value *SimplifyCmpInst(unsigned Predicate, Value *LHS, Value *RHS,
 4851 Value *llvm::SimplifyCmpInst(unsigned Predicate, Value *LHS, Value *RHS,
 4851 Value *llvm::SimplifyCmpInst(unsigned Predicate, Value *LHS, Value *RHS,
 4851 Value *llvm::SimplifyCmpInst(unsigned Predicate, Value *LHS, Value *RHS,
 4873 static Value *SimplifyRelativeLoad(Constant *Ptr, Constant *Offset,
 4929 static Value *simplifyUnaryIntrinsic(Function *F, Value *Op0,
 4929 static Value *simplifyUnaryIntrinsic(Function *F, Value *Op0,
 4938   Value *X;
 5002 static Value *simplifyBinaryIntrinsic(Function *F, Value *Op0, Value *Op1,
 5002 static Value *simplifyBinaryIntrinsic(Function *F, Value *Op0, Value *Op1,
 5002 static Value *simplifyBinaryIntrinsic(Function *F, Value *Op0, Value *Op1,
 5140 static Value *simplifyIntrinsic(CallBase *Call, const SimplifyQuery &Q) {
 5160     Value *MaskArg = Call->getArgOperand(2);
 5161     Value *PassthruArg = Call->getArgOperand(3);
 5169     Value *Op0 = Call->getArgOperand(0), *Op1 = Call->getArgOperand(1),
 5191     Value *Op0 = Call->getArgOperand(0);
 5192     Value *Op1 = Call->getArgOperand(1);
 5193     Value *Op2 = Call->getArgOperand(2);
 5194     if (Value *V = simplifyFPOp({ Op0, Op1, Op2 }))
 5203 Value *llvm::SimplifyCall(CallBase *Call, const SimplifyQuery &Q) {
 5204   Value *Callee = Call->getCalledValue();
 5216     if (Value *Ret = simplifyIntrinsic(Call, Q))
 5238 Value *llvm::SimplifyInstruction(Instruction *I, const SimplifyQuery &SQ,
 5241   Value *Result;
 5334     SmallVector<Value *, 8> Ops(I->op_begin(), I->op_end());
 5417     Instruction *I, Value *SimpleV, const TargetLibraryInfo *TLI,
 5483     Instruction *I, Value *SimpleV, const TargetLibraryInfo *TLI,
lib/Analysis/LazyCallGraph.cpp
  111       for (Value *Op : I.operand_values())
lib/Analysis/LazyValueInfo.cpp
  140     LVIValueHandle(Value *V, LazyValueInfoCache *P)
  144     void allUsesReplacedWith(Value *V) override {
  160       ValueCacheEntryTy(Value *V, LazyValueInfoCache *P) : Handle(V, P) {}
  167     typedef DenseMap<PoisoningVH<BasicBlock>, SmallPtrSet<Value *, 4>>
  175     DenseMap<Value *, std::unique_ptr<ValueCacheEntryTy>> ValueCache;
  180     void insertResult(Value *Val, BasicBlock *BB,
  199     bool isOverdefined(Value *V, BasicBlock *BB) const {
  208     bool hasCachedValueInfo(Value *V, BasicBlock *BB) const {
  219     ValueLatticeElement getCachedValueInfo(Value *V, BasicBlock *BB) const {
  240     void eraseValue(Value *V);
  255 void LazyValueInfoCache::eraseValue(Value *V) {
  260     SmallPtrSetImpl<Value *> &ValueSet = Iter->second;
  308   SmallVector<Value *, 4> ValsToClear(I->second.begin(), I->second.end());
  325     SmallPtrSetImpl<Value *> &ValueSet = OI->second;
  328     for (Value *V : ValsToClear) {
  384     SmallVector<std::pair<BasicBlock*, Value*>, 8> BlockValueStack;
  387     DenseSet<std::pair<BasicBlock*, Value*> > BlockValueSet;
  391     bool pushBlockValue(const std::pair<BasicBlock *, Value *> &BV) {
  406   ValueLatticeElement getBlockValue(Value *Val, BasicBlock *BB);
  407   bool getEdgeValue(Value *V, BasicBlock *F, BasicBlock *T,
  409   bool hasBlockValue(Value *Val, BasicBlock *BB);
  414   bool solveBlockValue(Value *Val, BasicBlock *BB);
  415   bool solveBlockValueImpl(ValueLatticeElement &Res, Value *Val,
  417   bool solveBlockValueNonLocal(ValueLatticeElement &BBLV, Value *Val,
  441   void intersectAssumeOrGuardBlockValueConstantRange(Value *Val,
  450     ValueLatticeElement getValueInBlock(Value *V, BasicBlock *BB,
  456     ValueLatticeElement getValueAt(Value *V, Instruction *CxtI);
  460     ValueLatticeElement getValueOnEdge(Value *V, BasicBlock *FromBB,
  510   SmallVector<std::pair<BasicBlock *, Value *>, 8> StartingStack(
  529         std::pair<BasicBlock *, Value *> &e = StartingStack.back();
  538     std::pair<BasicBlock *, Value *> e = BlockValueStack.back();
  560 bool LazyValueInfoImpl::hasBlockValue(Value *Val, BasicBlock *BB) {
  568 ValueLatticeElement LazyValueInfoImpl::getBlockValue(Value *Val,
  594 bool LazyValueInfoImpl::solveBlockValue(Value *Val, BasicBlock *BB) {
  621                                             Value *Val, BasicBlock *BB) {
  667 static bool InstructionDereferencesPointer(Instruction *I, Value *Ptr) {
  702 static bool isObjectDereferencedInBlock(Value *Val, BasicBlock *BB) {
  706   Value *UnderlyingVal = GetUnderlyingObject(Val, DL);
  717                                                  Value *Val, BasicBlock *BB) {
  789     Value *PhiVal = PN->getIncomingValue(i);
  817 static ValueLatticeElement getValueFromCondition(Value *Val, Value *Cond,
  817 static ValueLatticeElement getValueFromCondition(Value *Val, Value *Cond,
  823         Value *Val, ValueLatticeElement &BBLV, Instruction *BBI) {
  848     Value *Cond = nullptr;
  889     Value *LHS = nullptr;
  890     Value *RHS = nullptr;
  941   Value *Cond = SI->getCondition();
  957     Value *A = ICI->getOperand(0);
 1171   if (Value *V = SimplifyExtractValueInst(
 1190 static ValueLatticeElement getValueFromICmpCondition(Value *Val, ICmpInst *ICI,
 1192   Value *LHS = ICI->getOperand(0);
 1193   Value *RHS = ICI->getOperand(1);
 1256     Value *Val, WithOverflowInst *WO, bool IsTrueDest) {
 1276 getValueFromCondition(Value *Val, Value *Cond, bool isTrueDest,
 1276 getValueFromCondition(Value *Val, Value *Cond, bool isTrueDest,
 1277                       DenseMap<Value*, ValueLatticeElement> &Visited);
 1280 getValueFromConditionImpl(Value *Val, Value *Cond, bool isTrueDest,
 1280 getValueFromConditionImpl(Value *Val, Value *Cond, bool isTrueDest,
 1281                           DenseMap<Value*, ValueLatticeElement> &Visited) {
 1303   Value *BL = BO->getOperand(0);
 1304   Value *BR = BO->getOperand(1);
 1313 getValueFromCondition(Value *Val, Value *Cond, bool isTrueDest,
 1313 getValueFromCondition(Value *Val, Value *Cond, bool isTrueDest,
 1314                       DenseMap<Value*, ValueLatticeElement> &Visited) {
 1324 ValueLatticeElement getValueFromCondition(Value *Val, Value *Cond,
 1324 ValueLatticeElement getValueFromCondition(Value *Val, Value *Cond,
 1327   DenseMap<Value*, ValueLatticeElement> Visited;
 1332 static bool usesOperand(User *Usr, Value *Op) {
 1348 static ValueLatticeElement constantFoldUser(User *Usr, Value *Op,
 1366     Value *LHS = Op0Match ? OpConst : BO->getOperand(0);
 1367     Value *RHS = Op1Match ? OpConst : BO->getOperand(1);
 1379 static bool getEdgeValueLocal(Value *Val, BasicBlock *BBFrom,
 1391       Value *Condition = BI->getCondition();
 1433               Value *Op = Usr->getOperand(i);
 1452     Value *Condition = SI->getCondition();
 1503 bool LazyValueInfoImpl::getEdgeValue(Value *Val, BasicBlock *BBFrom,
 1551 ValueLatticeElement LazyValueInfoImpl::getValueInBlock(Value *V, BasicBlock *BB,
 1568 ValueLatticeElement LazyValueInfoImpl::getValueAt(Value *V, Instruction *CxtI) {
 1585 getValueOnEdge(Value *V, BasicBlock *FromBB, BasicBlock *ToBB,
 1686 static bool isKnownNonConstant(Value *V) {
 1694 Constant *LazyValueInfo::getConstant(Value *V, BasicBlock *BB,
 1714 ConstantRange LazyValueInfo::getConstantRange(Value *V, BasicBlock *BB,
 1734 Constant *LazyValueInfo::getConstantOnEdge(Value *V, BasicBlock *FromBB,
 1751 ConstantRange LazyValueInfo::getConstantRangeOnEdge(Value *V,
 1839 LazyValueInfo::getPredicateOnEdge(unsigned Pred, Value *V, Constant *C,
 1850 LazyValueInfo::getPredicateAt(unsigned Pred, Value *V, Constant *C,
 1908           Value *Incoming = PHI->getIncomingValue(i);
lib/Analysis/LegacyDivergenceAnalysis.cpp
   96                        PostDominatorTree &PDT, DenseSet<const Value *> &DV,
  104   void exploreDataDependency(Value *V);
  120   std::vector<Value *> Worklist; // Stack for DFS.
  121   DenseSet<const Value *> &DV;   // Stores all divergent values.
  257 void DivergencePropagator::exploreDataDependency(Value *V) {
  268     Value *V = Worklist.back();
  354 bool LegacyDivergenceAnalysis::isDivergent(const Value *V) const {
  374     const Value *FirstDivergentValue = *DivergentValues.begin();
lib/Analysis/Lint.cpp
   96     void visitMemoryReference(Instruction &I, Value *Ptr,
  123     Value *findValue(Value *V, bool OffsetOk) const;
  123     Value *findValue(Value *V, bool OffsetOk) const;
  124     Value *findValueImpl(Value *V, bool OffsetOk,
  124     Value *findValueImpl(Value *V, bool OffsetOk,
  125                          SmallPtrSetImpl<Value *> &Visited) const;
  154     void WriteValues(ArrayRef<const Value *> Vs) {
  155       for (const Value *V : Vs) {
  226   Value *Callee = CS.getCalledValue();
  256       Value *Actual = *AI;
  304       for (Value *Arg : CS.args()) {
  309         Value *Obj = findValue(Arg, /*OffsetOk=*/true);
  406   if (Value *V = I.getReturnValue()) {
  407     Value *Obj = findValue(V, /*OffsetOk=*/true);
  415                                 Value *Ptr, uint64_t Size, unsigned Align,
  422   Value *UnderlyingObject = findValue(Ptr, /*OffsetOk=*/true);
  462   if (Value *Base = GetPointerBaseWithConstantOffset(Ptr, Offset, *DL)) {
  549 static bool isZero(Value *V, const DataLayout &DL, DominatorTree *DT,
  656 Value *Lint::findValue(Value *V, bool OffsetOk) const {
  656 Value *Lint::findValue(Value *V, bool OffsetOk) const {
  657   SmallPtrSet<Value *, 4> Visited;
  662 Value *Lint::findValueImpl(Value *V, bool OffsetOk,
  662 Value *Lint::findValueImpl(Value *V, bool OffsetOk,
  663                            SmallPtrSetImpl<Value *> &Visited) const {
  681       if (Value *U =
  690     if (Value *W = PN->hasConstantValue())
  697     if (Value *W = FindInsertedValue(Ex->getAggregateOperand(),
  710       if (Value *W = FindInsertedValue(CE->getOperand(0), Indices))
  718     if (Value *W = SimplifyInstruction(Inst, {*DL, TLI, DT, AC}))
  721     if (Value *W = ConstantFoldConstant(C, *DL, TLI))
lib/Analysis/Loads.cpp
   30 static MaybeAlign getBaseAlign(const Value *Base, const DataLayout &DL) {
   39 static bool isAligned(const Value *Base, const APInt &Offset, Align Alignment,
   53     const Value *V, Align Alignment, const APInt &Size, const DataLayout &DL,
   55     SmallPtrSetImpl<const Value *> &Visited) {
   84     const Value *Base = GEP->getPointerOperand();
  123 bool llvm::isDereferenceableAndAlignedPointer(const Value *V, Align Alignment,
  133   SmallPtrSet<const Value *, 32> Visited;
  138 bool llvm::isDereferenceableAndAlignedPointer(const Value *V, Type *Ty,
  159 bool llvm::isDereferenceablePointer(const Value *V, Type *Ty,
  177 static bool AreEquivalentAddressValues(const Value *A, const Value *B) {
  177 static bool AreEquivalentAddressValues(const Value *A, const Value *B) {
  201   Value *Ptr = LI->getPointerOperand();
  240   Value *Base = StartS->getValue();
  262 bool llvm::isSafeToLoadUnconditionally(Value *V, MaybeAlign MA, APInt &Size,
  303     Value *AccessedPtr;
  341 bool llvm::isSafeToLoadUnconditionally(Value *V, Type *Ty, MaybeAlign Alignment,
  361 Value *llvm::FindAvailableLoadedValue(LoadInst *Load,
  376 Value *llvm::FindAvailablePtrLoadStore(Value *Ptr, Type *AccessTy,
  376 Value *llvm::FindAvailablePtrLoadStore(Value *Ptr, Type *AccessTy,
  390   Value *StrippedPtr = Ptr->stripPointerCasts();
  429       Value *StorePtr = SI->getPointerOperand()->stripPointerCasts();
lib/Analysis/LoopAccessAnalysis.cpp
  137 Value *llvm::stripIntegerCast(Value *V) {
  137 Value *llvm::stripIntegerCast(Value *V) {
  146                                             Value *Ptr, Value *OrigPtr) {
  146                                             Value *Ptr, Value *OrigPtr) {
  154     Value *StrideVal = SI->second;
  189 void RuntimePointerChecking::insert(Loop *Lp, Value *Ptr, bool WritePtr,
  360   DenseMap<Value *, unsigned> PositionMap;
  499   typedef PointerIntPair<Value *, 1, bool> MemAccessInfo;
  510     Value *Ptr = const_cast<Value*>(Loc.Ptr);
  519     Value *Ptr = const_cast<Value*>(Loc.Ptr);
  588   SmallPtrSet<Value*, 16> ReadOnlyPtr;
  620                                 const ValueToValueMap &Strides, Value *Ptr,
  641                      const ValueToValueMap &Strides, Value *Ptr, Loop *L) {
  660   Value *Ptr = Access.getPointer();
  678     Value *Leader = DepCands.getLeaderValue(Access).getPointer();
  718     DenseMap<Value *, unsigned> DepSetId;
  723       Value *Ptr = A.getValue();
  790       Value *PtrI = RtCheck.Pointers[i].PointerValue;
  791       Value *PtrJ = RtCheck.Pointers[j].PointerValue;
  845     typedef DenseMap<const Value*, MemAccessInfo> UnderlyingObjToAccessMap;
  858         Value *Ptr = AV.getValue();
  906           typedef SmallVector<const Value *, 16> ValueVector;
  912           for (const Value *UnderlyingObj : TempObjects) {
  935 static bool isInBoundsGep(Value *Ptr) {
  943 static bool isNoWrapAddRec(Value *Ptr, const SCEVAddRecExpr *AR,
  962   Value *NonConstIndex = nullptr;
  963   for (Value *Index : make_range(GEP->idx_begin(), GEP->idx_end()))
  990 int64_t llvm::getPtrStride(PredicatedScalarEvolution &PSE, Value *Ptr,
 1100 bool llvm::sortPtrAccesses(ArrayRef<Value *> VL, const DataLayout &DL,
 1106   SmallVector<std::pair<int64_t, Value *>, 4> OffValPairs;
 1111   Value *Ptr0 = VL[0];
 1113   Value *Obj0 = GetUnderlyingObject(Ptr0, DL);
 1116   for (auto *Ptr : VL) {
 1124     Value *CurrObj = GetUnderlyingObject(Ptr, DL);
 1162 static unsigned getAddressSpaceOperand(Value *I) {
 1171 bool llvm::isConsecutiveAccess(Value *A, Value *B, const DataLayout &DL,
 1171 bool llvm::isConsecutiveAccess(Value *A, Value *B, const DataLayout &DL,
 1173   Value *PtrA = getLoadStorePointerOperand(A);
 1174   Value *PtrB = getLoadStorePointerOperand(B);
 1447   Value *APtr = A.getPointer();
 1448   Value *BPtr = B.getPointer();
 1792   typedef SmallPtrSet<Value*, 16> ValueSet;
 1929     Value *Ptr = ST->getPointerOperand();
 1960     Value *Ptr = LD->getPointerOperand();
 2091   Value *CodeRegion = TheLoop->getHeader();
 2107 bool LoopAccessInfo::isUniform(Value *V) const {
 2120 static Instruction *getFirstInst(Instruction *FirstInst, Value *V,
 2136   TrackingVH<Value> Start;
 2137   TrackingVH<Value> End;
 2148   Value *Ptr = PtrRtChecking.Pointers[CG->Members[0]].PointerValue;
 2163     Value *NewPtr = (Inst && TheLoop->contains(Inst))
 2168     Value *NewPtrPlusOne = Exp.expandCodeFor(ScPlusOne, PtrArithTy, Loc);
 2171     Value *Start = nullptr, *End = nullptr;
 2217   Value *MemoryRuntimeCheck = nullptr;
 2233     Value *Start0 = ChkBuilder.CreateBitCast(A.Start, PtrArithTy0, "bc");
 2234     Value *Start1 = ChkBuilder.CreateBitCast(B.Start, PtrArithTy1, "bc");
 2235     Value *End0 =   ChkBuilder.CreateBitCast(A.End,   PtrArithTy1, "bc");
 2236     Value *End1 =   ChkBuilder.CreateBitCast(B.End,   PtrArithTy0, "bc");
 2246     Value *Cmp0 = ChkBuilder.CreateICmpULT(Start0, End1, "bound0");
 2248     Value *Cmp1 = ChkBuilder.CreateICmpULT(Start1, End0, "bound1");
 2250     Value *IsConflict = ChkBuilder.CreateAnd(Cmp0, Cmp1, "found.conflict");
 2281 void LoopAccessInfo::collectStridedAccess(Value *MemAccess) {
 2282   Value *Ptr = nullptr;
 2290   Value *Stride = getStrideFromPointer(Ptr, PSE->getSE(), TheLoop);
lib/Analysis/LoopCacheAnalysis.cpp
  362   Value *Addr = getPointerOperand(&StoreOrLoadInst);
lib/Analysis/LoopInfo.cpp
   61 bool Loop::isLoopInvariant(const Value *V) const {
   71 bool Loop::makeLoopInvariant(Value *V, bool &Changed, Instruction *InsertPt,
  100   for (Value *Operand : I->operands())
  180 static Value *findFinalIVValue(const Loop &L, const PHINode &IndVar,
  186   Value *Op0 = LatchCmpInst->getOperand(0);
  187   Value *Op1 = LatchCmpInst->getOperand(1);
  204   Value *InitialIVValue = IndDesc.getStartValue();
  210   Value *StepInstOp1 = StepInst->getOperand(1);
  211   Value *StepInstOp0 = StepInst->getOperand(0);
  212   Value *StepValue = nullptr;
  218   Value *FinalIVValue = findFinalIVValue(L, IndVar, *StepInst);
lib/Analysis/LoopPass.cpp
  106 void LPPassManager::deleteSimpleAnalysisValue(Value *V, Loop *L) {
lib/Analysis/LoopUnrollAnalyzer.cpp
   69   Value *LHS = I.getOperand(0), *RHS = I.getOperand(1);
   77   Value *SimpleV = nullptr;
   95   Value *AddrOp = I.getPointerOperand();
  167   Value *LHS = I.getOperand(0), *RHS = I.getOperand(1);
lib/Analysis/MemDerefPrinter.cpp
   22     SmallVector<Value *, 4> Deref;
   23     SmallPtrSet<Value *, 4> DerefAndAligned;
   55       Value *PO = LI->getPointerOperand();
   68   for (Value *V: Deref) {
lib/Analysis/MemoryBuiltins.cpp
  111 static const Function *getCalledFunction(const Value *V, bool LookThroughBitCast,
  172 static Optional<AllocFnsTy> getAllocationData(const Value *V, AllocType AllocTy,
  184 getAllocationData(const Value *V, AllocType AllocTy,
  196 static Optional<AllocFnsTy> getAllocationSize(const Value *V,
  227 static bool hasNoAliasAttr(const Value *V, bool LookThroughBitCast) {
  235 bool llvm::isAllocationFn(const Value *V, const TargetLibraryInfo *TLI,
  240     const Value *V, function_ref<const TargetLibraryInfo &(Function &)> GetTLI,
  247 bool llvm::isNoAliasFn(const Value *V, const TargetLibraryInfo *TLI,
  257 bool llvm::isMallocLikeFn(const Value *V, const TargetLibraryInfo *TLI,
  262     const Value *V, function_ref<const TargetLibraryInfo &(Function &)> GetTLI,
  270 bool llvm::isCallocLikeFn(const Value *V, const TargetLibraryInfo *TLI,
  277 bool llvm::isMallocOrCallocLikeFn(const Value *V, const TargetLibraryInfo *TLI,
  285 bool llvm::isAllocLikeFn(const Value *V, const TargetLibraryInfo *TLI,
  292 bool llvm::isReallocLikeFn(const Value *V, const TargetLibraryInfo *TLI,
  305 bool llvm::isOpNewLikeFn(const Value *V, const TargetLibraryInfo *TLI,
  312 bool llvm::isStrdupLikeFn(const Value *V, const TargetLibraryInfo *TLI,
  321     const Value *I,
  326 static Value *computeArraySize(const CallInst *CI, const DataLayout &DL,
  343   Value *MallocArg = CI->getArgOperand(0);
  344   Value *Multiple = nullptr;
  364   for (Value::const_user_iterator UI = CI->user_begin(), E = CI->user_end();
  399 Value *llvm::getMallocArraySize(CallInst *CI, const DataLayout &DL,
  408 const CallInst *llvm::extractCallocCall(const Value *I,
  462 const CallInst *llvm::isFreeCall(const Value *I, const TargetLibraryInfo *TLI) {
  491 bool llvm::getObjectSize(const Value *Ptr, uint64_t &Size, const DataLayout &DL,
  502 Value *llvm::lowerObjectSizeCall(IntrinsicInst *ObjectSize,
  543       Value *ResultSize =
  545       Value *UseZero =
  578 SizeOffsetType ObjectSizeOffsetVisitor::compute(Value *V) {
  639   Value *ArraySize = I.getArraySize();
  835 SizeOffsetEvalType ObjectSizeOffsetEvaluator::compute(Value *V) {
  846     for (const Value *SeenVal : SeenVals) {
  865 SizeOffsetEvalType ObjectSizeOffsetEvaluator::compute_(Value *V) {
  922   Value *ArraySize = I.getArraySize();
  923   Value *Size = ConstantInt::get(ArraySize->getType(),
  940   Value *FirstArg = CS.getArgument(FnData->FstParam);
  945   Value *SecondArg = CS.getArgument(FnData->SndParam);
  947   Value *Size = Builder.CreateMul(FirstArg, SecondArg);
  975   Value *Offset = EmitGEPOffset(&Builder, DL, &GEP, /*NoAssumptions=*/true);
 1015   Value *Size = SizePHI, *Offset = OffsetPHI;
 1016   if (Value *Tmp = SizePHI->hasConstantValue()) {
 1022   if (Value *Tmp = OffsetPHI->hasConstantValue()) {
 1040   Value *Size = Builder.CreateSelect(I.getCondition(), TrueSide.first,
 1042   Value *Offset = Builder.CreateSelect(I.getCondition(), TrueSide.second,
lib/Analysis/MemoryDependenceAnalysis.cpp
  241     const Value *MemLocBase, int64_t MemLocOffs, unsigned MemLocSize,
  256   const Value *LIBase =
  364   Value *LoadOperand = LI->getPointerOperand()->stripPointerCasts();
  374   SmallVector<const Value *, 8> LoadOperandsQueue;
  390     const Value *Ptr = LoadOperandsQueue.pop_back_val();
  667       const Value *AccessPtr = GetUnderlyingObject(MemLoc.Ptr, DL);
  963   DenseMap<BasicBlock *, Value *> Visited;
 1096     DenseMap<BasicBlock *, Value *> &Visited, bool SkipFirstBlock) {
 1180         DenseMap<BasicBlock *, Value *>::iterator VI =
 1192     Value *Addr = Pointer.getAddr();
 1284         std::pair<DenseMap<BasicBlock *, Value *>::iterator, bool> InsertRes =
 1340       Value *PredPtrVal = PredPointer.getAddr();
 1347       std::pair<DenseMap<BasicBlock *, Value *>::iterator, bool> InsertRes =
 1380       Value *PredPtrVal = PredPointer.getAddr();
 1525 void MemoryDependenceResults::invalidateCachedPointerInfo(Value *Ptr) {
lib/Analysis/MemoryLocation.cpp
  132   const Value *Arg = Call->getArgOperand(ArgIdx);
lib/Analysis/MemorySSA.cpp
  204         hash_combine(MLOC.IsCall, DenseMapInfo<const Value *>::getHashValue(
  207     for (const Value *Arg : MLOC.getCall()->args())
  208       hash = hash_combine(hash, DenseMapInfo<const Value *>::getHashValue(Arg));
 1817   Value *MemoryInst;
lib/Analysis/MemorySSAUpdater.cpp
  194   SmallVector<TrackingVH<Value>, 8> Uses;
 1094         Value::use_iterator UI = DefToReplaceUses.use_begin(),
lib/Analysis/ModuleSummaryAnalysis.cpp
  295           Value *Stored = I.getOperand(0);
lib/Analysis/MustExecute.cpp
  136   auto *RHS = Cond->getOperand(1);
  140   auto *IVStart = LHS->getIncomingValueForBlock(CurLoop->getLoopPreheader());
  141   auto *SimpleValOrNull = SimplifyCmpInst(Cond->getPredicate(),
  383   DenseMap<const Value*, SmallVector<Loop*, 4> > MustExec;
  413   void printInfoComment(const Value &V, formatted_raw_ostream &OS) override {
lib/Analysis/ObjCARCAliasAnalysis.cpp
   47   const Value *SA = GetRCIdentityRoot(LocA.Ptr);
   48   const Value *SB = GetRCIdentityRoot(LocB.Ptr);
   57   const Value *UA = GetUnderlyingObjCPtr(SA, DL);
   58   const Value *UB = GetUnderlyingObjCPtr(SB, DL);
   79   const Value *S = GetRCIdentityRoot(Loc.Ptr);
   86   const Value *U = GetUnderlyingObjCPtr(S, DL);
lib/Analysis/ObjCARCInstKind.cpp
  213 ARCInstKind llvm::objcarc::GetARCInstKind(const Value *V) {
lib/Analysis/OptimizationRemarkEmitter.cpp
   58 Optional<uint64_t> OptimizationRemarkEmitter::computeHotness(const Value *V) {
   67   const Value *V = OptDiag.getCodeRegion();
lib/Analysis/PHITransAddr.cpp
   57 static bool VerifySubExpr(Value *Expr,
  122 static void RemoveInstInputs(Value *V,
  143 Value *PHITransAddr::PHITranslateSubExpr(Value *V, BasicBlock *CurBB,
  143 Value *PHITransAddr::PHITranslateSubExpr(Value *V, BasicBlock *CurBB,
  189     Value *PHIIn = PHITranslateSubExpr(Cast->getOperand(0), CurBB, PredBB, DT);
  215     SmallVector<Value*, 8> GEPOps;
  218       Value *GEPOp = PHITranslateSubExpr(GEP->getOperand(i), CurBB, PredBB, DT);
  229     if (Value *V = SimplifyGEPInst(GEP->getSourceElementType(),
  238     Value *APHIOp = GEPOps[0];
  260     Value *LHS = PHITranslateSubExpr(Inst->getOperand(0), CurBB, PredBB, DT);
  279     if (Value *Res = SimplifyAddInst(LHS, RHS, isNSW, isNUW, {DL, TLI, DT, AC})) {
  340 Value *PHITransAddr::
  364 Value *PHITransAddr::
  365 InsertPHITranslatedSubExpr(Value *InVal, BasicBlock *CurBB,
  382     Value *OpVal = InsertPHITranslatedSubExpr(Cast->getOperand(0),
  397     SmallVector<Value*, 8> GEPOps;
  400       Value *OpVal = InsertPHITranslatedSubExpr(GEP->getOperand(i),
lib/Analysis/PhiValues.cpp
   20 void PhiValues::PhiValuesCallbackVH::allUsesReplacedWith(Value *) {
   59   for (Value *PhiOp : Phi->incoming_values()) {
   88       for (Value *Op : ComponentPhi->incoming_values()) {
  106     for (const Value *V : Reachable)
  123 void PhiValues::invalidateValue(const Value *V) {
  131     for (const Value *V : ReachableMap[N])
  164         for (Value *V : It->second)
lib/Analysis/ScalarEvolution.cpp
  477 void SCEVUnknown::allUsesReplacedWith(Value *New) {
  574 CompareValueComplexity(EquivalenceClasses<const Value *> &EqCacheValue,
  575                        const LoopInfo *const LI, Value *LV, Value *RV,
  575                        const LoopInfo *const LI, Value *LV, Value *RV,
  653     EquivalenceClasses<const Value *> &EqCacheValue,
  807   EquivalenceClasses<const Value *> EqCacheValue;
 3736 const SCEV *ScalarEvolution::getUnknown(Value *V) {
 3859 void ScalarEvolution::eraseValueFromMap(Value *V) {
 3882 static bool SCEVLostPoisonFlags(const SCEV *S, const Value *V) {
 3899 const SCEV *ScalarEvolution::getSCEV(Value *V) {
 3931 const SCEV *ScalarEvolution::getExistingSCEV(Value *V) {
 4327     Value *BECond = nullptr;
 4372   explicit SCEVBackedgeConditionFolder(const Loop *L, Value *BECond,
 4377   Optional<const SCEV *> compareWithBackedgeCondition(Value *IC);
 4381   Value *BackedgeCond = nullptr;
 4387 SCEVBackedgeConditionFolder::compareWithBackedgeCondition(Value *IC) {
 4472   Value *LHS;
 4473   Value *RHS;
 4490   explicit BinaryOp(unsigned Opcode, Value *LHS, Value *RHS, bool IsNSW = false,
 4490   explicit BinaryOp(unsigned Opcode, Value *LHS, Value *RHS, bool IsNSW = false,
 4498 static Optional<BinaryOp> MatchBinaryOp(Value *V, DominatorTree &DT) {
 4697   Value *BEValueV = nullptr, *StartValueV = nullptr;
 4699     Value *V = PN->getIncomingValue(i);
 4960                                                       Value *BEValueV,
 4961                                                       Value *StartValueV) {
 5011   Value *BEValueV = nullptr, *StartValueV = nullptr;
 5013     Value *V = PN->getIncomingValue(i);
 5206         Value *V = SU->getValue();
 5239                           Value *&C, Value *&LHS, Value *&RHS) {
 5239                           Value *&C, Value *&LHS, Value *&RHS) {
 5239                           Value *&C, Value *&LHS, Value *&RHS) {
 5295     Value *Cond = nullptr, *LHS = nullptr, *RHS = nullptr;
 5318   if (Value *V = SimplifyInstruction(PN, {getDataLayout(), &TLI, &DT, &AC}))
 5327                                                       Value *Cond,
 5328                                                       Value *TrueVal,
 5329                                                       Value *FalseVal) {
 5340   Value *LHS = ICI->getOperand(0);
 5341   Value *RHS = ICI->getOperand(1);
 5525 static Optional<ConstantRange> GetRangeFromMetadata(Value *V) {
 5859     Value *Condition = nullptr;
 5966 SCEV::NoWrapFlags ScalarEvolution::getNoWrapFlagsFromUB(const Value *V) {
 6134 const SCEV *ScalarEvolution::createSCEV(Value *V) {
 6500     if (Value *RV = CallSite(U).getReturnedArgOperand())
 6859 void ScalarEvolution::forgetValue(Value *V) {
 7170     const Loop *L, Value *ExitCond, bool ExitIfTrue,
 7178 ScalarEvolution::ExitLimitCache::find(const Loop *L, Value *ExitCond,
 7194 void ScalarEvolution::ExitLimitCache::insert(const Loop *L, Value *ExitCond,
 7210     ExitLimitCacheTy &Cache, const Loop *L, Value *ExitCond, bool ExitIfTrue,
 7224     ExitLimitCacheTy &Cache, const Loop *L, Value *ExitCond, bool ExitIfTrue,
 7512   Value *VarIdx = nullptr;
 7567     Value *LHS, Value *RHSV, const Loop *L, ICmpInst::Predicate Pred) {
 7567     Value *LHS, Value *RHSV, const Loop *L, ICmpInst::Predicate Pred) {
 7614       Value *V;
 7635     Value *BEValue = PNOut->getIncomingValueForBlock(Latch);
 7636     Value *OpLHS;
 7673     Value *FirstValue = PN->getIncomingValueForBlock(Predecessor);
 7752   for (Value *Op : UseInst->operands()) {
 7785 static PHINode *getConstantEvolvingPHI(Value *V, const Loop *L) {
 7801 static Constant *EvaluateExpression(Value *V, const Loop *L,
 7902   Value *BEValue = PN->getIncomingValueForBlock(Latch);
 7941         Value *BEValue = PHI->getIncomingValueForBlock(Latch);
 7958                                                           Value *Cond,
 8014       Value *BEValue = PHI->getIncomingValueForBlock(Latch);
 8165             Value *InitValue = nullptr;
 8218         for (Value *Op : I->operands()) {
 8373 const SCEV *ScalarEvolution::getSCEVAtScope(Value *V, const Loop *L) {
 9441     Value *Condition;
 9539     Value *Condition = ContinuePredicate->getCondition();
 9674                                     Value *FoundCondValue,
10280     Value *LL, *LR;
11364 void ScalarEvolution::SCEVCallbackVH::allUsesReplacedWith(Value *V) {
11370   Value *Old = getValPtr();
11393 ScalarEvolution::SCEVCallbackVH::SCEVCallbackVH(Value *V, ScalarEvolution *se)
12381 const SCEV *PredicatedScalarEvolution::getSCEV(Value *V) {
12431     Value *V, SCEVWrapPredicate::IncrementWrapFlags Flags) {
12447     Value *V, SCEVWrapPredicate::IncrementWrapFlags Flags) {
12462 const SCEVAddRecExpr *PredicatedScalarEvolution::getAsAddRec(Value *V) {
lib/Analysis/ScalarEvolutionAliasAnalysis.cpp
   80   Value *AO = GetBaseValue(AS);
   81   Value *BO = GetBaseValue(BS);
   99 Value *SCEVAAResult::GetBaseValue(const SCEV *S) {
lib/Analysis/ScalarEvolutionExpander.cpp
   37 Value *SCEVExpander::ReuseOrCreateCast(Value *V, Type *Ty,
   37 Value *SCEVExpander::ReuseOrCreateCast(Value *V, Type *Ty,
  109 Value *SCEVExpander::InsertNoopCastOfTo(Value *V, Type *Ty) {
  109 Value *SCEVExpander::InsertNoopCastOfTo(Value *V, Type *Ty) {
  169 Value *SCEVExpander::InsertBinop(Instruction::BinaryOps Opcode,
  170                                  Value *LHS, Value *RHS,
  170                                  Value *LHS, Value *RHS,
  402 Value *SCEVExpander::expandAddToGEP(const SCEV *const *op_begin,
  406                                     Value *V) {
  409   SmallVector<Value *, 4> GepIndices;
  458     Value *Scaled = ScaledOps.empty() ?
  515     Value *Idx = expandCodeFor(SE.getAddExpr(Ops), Ty);
  556     Value *GEP = Builder.CreateGEP(Builder.getInt8Ty(), V, Idx, "uglygep");
  585     Value *Casted = V;
  588     Value *GEP = Builder.CreateGEP(OriginalElTy, Casted, GepIndices, "scevgep");
  596 Value *SCEVExpander::expandAddToGEP(const SCEV *Op, PointerType *PTy, Type *Ty,
  597                                     Value *V) {
  688 Value *SCEVExpander::visitAddExpr(const SCEVAddExpr *S) {
  706   Value *Sum = nullptr;
  740       Value *W = expandCodeFor(SE.getNegativeSCEV(Op), Ty);
  747       Value *W = expandCodeFor(Op, Ty);
  760 Value *SCEVExpander::visitMulExpr(const SCEVMulExpr *S) {
  775   Value *Prod = nullptr;
  799     Value *P = expandCodeFor(I->second, Ty);
  800     Value *Result = nullptr;
  830       Value *W = ExpandOpBinPowN();
  855 Value *SCEVExpander::visitUDivExpr(const SCEVUDivExpr *S) {
  858   Value *LHS = expandCodeFor(S->getLHS(), Ty);
  867   Value *RHS = expandCodeFor(S->getRHS(), Ty);
 1052 Value *SCEVExpander::expandIVInc(PHINode *PN, Value *StepV, const Loop *L,
 1052 Value *SCEVExpander::expandIVInc(PHINode *PN, Value *StepV, const Loop *L,
 1055   Value *IncV;
 1265   Value *StartV = expandCodeFor(Normalized->getStart(), ExpandTy,
 1284   Value *StepV = expandCodeFor(Step, IntTy, &L->getHeader()->front());
 1316     Value *IncV = expandIVInc(PN, StepV, L, ExpandTy, IntTy, useSubtract);
 1337 Value *SCEVExpander::expandAddRecExprLiterally(const SCEVAddRecExpr *S) {
 1398   Value *Result;
 1426       Value *StepV;
 1469         Value *Base = expandCodeFor(PostLoopOffset, ExpandTy);
 1485 Value *SCEVExpander::visitAddRecExpr(const SCEVAddRecExpr *S) {
 1516     Value *V = expand(SE.getAddRecExpr(NewOps, S->getLoop(),
 1544         Value *StartV = expand(Base);
 1634 Value *SCEVExpander::visitTruncateExpr(const SCEVTruncateExpr *S) {
 1636   Value *V = expandCodeFor(S->getOperand(),
 1638   Value *I = Builder.CreateTrunc(V, Ty);
 1643 Value *SCEVExpander::visitZeroExtendExpr(const SCEVZeroExtendExpr *S) {
 1645   Value *V = expandCodeFor(S->getOperand(),
 1647   Value *I = Builder.CreateZExt(V, Ty);
 1652 Value *SCEVExpander::visitSignExtendExpr(const SCEVSignExtendExpr *S) {
 1654   Value *V = expandCodeFor(S->getOperand(),
 1656   Value *I = Builder.CreateSExt(V, Ty);
 1661 Value *SCEVExpander::visitSMaxExpr(const SCEVSMaxExpr *S) {
 1662   Value *LHS = expand(S->getOperand(S->getNumOperands()-1));
 1672     Value *RHS = expandCodeFor(S->getOperand(i), Ty);
 1673     Value *ICmp = Builder.CreateICmpSGT(LHS, RHS);
 1675     Value *Sel = Builder.CreateSelect(ICmp, LHS, RHS, "smax");
 1686 Value *SCEVExpander::visitUMaxExpr(const SCEVUMaxExpr *S) {
 1687   Value *LHS = expand(S->getOperand(S->getNumOperands()-1));
 1697     Value *RHS = expandCodeFor(S->getOperand(i), Ty);
 1698     Value *ICmp = Builder.CreateICmpUGT(LHS, RHS);
 1700     Value *Sel = Builder.CreateSelect(ICmp, LHS, RHS, "umax");
 1711 Value *SCEVExpander::visitSMinExpr(const SCEVSMinExpr *S) {
 1712   Value *LHS = expand(S->getOperand(S->getNumOperands() - 1));
 1722     Value *RHS = expandCodeFor(S->getOperand(i), Ty);
 1723     Value *ICmp = Builder.CreateICmpSLT(LHS, RHS);
 1725     Value *Sel = Builder.CreateSelect(ICmp, LHS, RHS, "smin");
 1736 Value *SCEVExpander::visitUMinExpr(const SCEVUMinExpr *S) {
 1737   Value *LHS = expand(S->getOperand(S->getNumOperands() - 1));
 1747     Value *RHS = expandCodeFor(S->getOperand(i), Ty);
 1748     Value *ICmp = Builder.CreateICmpULT(LHS, RHS);
 1750     Value *Sel = Builder.CreateSelect(ICmp, LHS, RHS, "umin");
 1761 Value *SCEVExpander::expandCodeFor(const SCEV *SH, Type *Ty,
 1767 Value *SCEVExpander::expandCodeFor(const SCEV *SH, Type *Ty) {
 1769   Value *V = expand(SH);
 1791         Value *V = VOPair.first;
 1813 Value *SCEVExpander::expand(const SCEV *S) {
 1877   Value *V = VO.first;
 1913 void SCEVExpander::rememberInstruction(Value *I) {
 1972       if (Value *V = SimplifyInstruction(PN, {DL, &SE.TLI, &SE.DT, &SE.AC}))
 1984     if (Value *V = SimplifyPHINode(Phi)) {
 2051           Value *NewInc = OrigInc;
 2072     Value *NewIV = OrigPhiRef;
 2084 Value *SCEVExpander::getExactExistingExpansion(const SCEV *S,
 2212 Value *SCEVExpander::expandCodeForPredicate(const SCEVPredicate *Pred,
 2228 Value *SCEVExpander::expandEqualPredicate(const SCEVEqualPredicate *Pred,
 2230   Value *Expr0 = expandCodeFor(Pred->getLHS(), Pred->getLHS()->getType(), IP);
 2231   Value *Expr1 = expandCodeFor(Pred->getRHS(), Pred->getRHS()->getType(), IP);
 2234   auto *I = Builder.CreateICmpNE(Expr0, Expr1, "ident.check");
 2238 Value *SCEVExpander::generateOverflowCheck(const SCEVAddRecExpr *AR,
 2263   Value *TripCountVal = expandCodeFor(ExitCount, CountTy, Loc);
 2269   Value *StepValue = expandCodeFor(Step, Ty, Loc);
 2270   Value *NegStepValue = expandCodeFor(SE.getNegativeSCEV(Step), Ty, Loc);
 2271   Value *StartValue = expandCodeFor(Start, ARExpandTy, Loc);
 2278   Value *StepCompare = Builder.CreateICmp(ICmpInst::ICMP_SLT, StepValue, Zero);
 2279   Value *AbsStep = Builder.CreateSelect(StepCompare, NegStepValue, StepValue);
 2282   Value *TruncTripCount = Builder.CreateZExtOrTrunc(TripCountVal, Ty);
 2288   Value *MulV = Builder.CreateExtractValue(Mul, 0, "mul.result");
 2289   Value *OfMul = Builder.CreateExtractValue(Mul, 1, "mul.overflow");
 2294   Value *Add = nullptr, *Sub = nullptr;
 2307   Value *EndCompareGT = Builder.CreateICmp(
 2310   Value *EndCompareLT = Builder.CreateICmp(
 2314   Value *EndCheck =
 2322     auto *BackedgeCheck =
 2335 Value *SCEVExpander::expandWrapPredicate(const SCEVWrapPredicate *Pred,
 2338   Value *NSSWCheck = nullptr, *NUSWCheck = nullptr;
 2360 Value *SCEVExpander::expandUnionPredicate(const SCEVUnionPredicate *Union,
 2363   Value *Check = ConstantInt::getNullValue(BoolType);
 2367     auto *NextCheck = expandCodeForPredicate(Pred, IP);
 2446       for (const Value *V : InsertionPoint->operand_values())
lib/Analysis/StackSafetyAnalysis.cpp
   30   const Value *AllocaPtr;
   33   AllocaOffsetRewriter(ScalarEvolution &SE, const Value *AllocaPtr)
  210   ConstantRange offsetFromAlloca(Value *Addr, const Value *AllocaPtr);
  210   ConstantRange offsetFromAlloca(Value *Addr, const Value *AllocaPtr);
  211   ConstantRange getAccessRange(Value *Addr, const Value *AllocaPtr,
  211   ConstantRange getAccessRange(Value *Addr, const Value *AllocaPtr,
  214                                            const Value *AllocaPtr);
  216   bool analyzeAllUses(const Value *Ptr, UseInfo &AS);
  233 StackSafetyLocalAnalysis::offsetFromAlloca(Value *Addr,
  234                                            const Value *AllocaPtr) {
  245 ConstantRange StackSafetyLocalAnalysis::getAccessRange(Value *Addr,
  246                                                        const Value *AllocaPtr,
  263     const MemIntrinsic *MI, const Use &U, const Value *AllocaPtr) {
  281 bool StackSafetyLocalAnalysis::analyzeAllUses(const Value *Ptr, UseInfo &US) {
  282   SmallPtrSet<const Value *, 16> Visited;
  283   SmallVector<const Value *, 8> WorkList;
  288     const Value *V = WorkList.pop_back_val();
lib/Analysis/TargetTransformInfo.cpp
  163                                      ArrayRef<const Value *> Arguments,
  178 int TargetTransformInfo::getGEPCost(Type *PointeeType, const Value *Ptr,
  179                                     ArrayRef<const Value *> Operands) const {
  184                                     const Value *Src) const {
  189     Intrinsic::ID IID, Type *RetTy, ArrayRef<const Value *> Arguments,
  203     ArrayRef<const Value *> Operands) const {
  213 bool TargetTransformInfo::isSourceOfDivergence(const Value *V) const {
  217 bool llvm::TargetTransformInfo::isAlwaysUniform(const Value *V) const {
  231   IntrinsicInst *II, Value *OldV, Value *NewV) const {
  231   IntrinsicInst *II, Value *OldV, Value *NewV) const {
  385 getOperandsScalarizationOverhead(ArrayRef<const Value *> Args,
  536 TargetTransformInfo::getOperandInfo(Value *V, OperandValueProperties &OpProps) {
  553   const Value *Splat = getSplatValue(V);
  588     ArrayRef<const Value *> Args) const {
  662                                                 Value *Ptr, bool VariableMask,
  692            ArrayRef<Value *> Args, FastMathFlags FMF, unsigned VF) const {
  753 Value *TargetTransformInfo::getOrCreateResultFromMemIntrinsic(
  759                                                      Value *Length,
  880   ReductionData(ReductionKind Kind, unsigned Opcode, Value *LHS, Value *RHS)
  880   ReductionData(ReductionKind Kind, unsigned Opcode, Value *LHS, Value *RHS)
  885   Value *LHS = nullptr;
  886   Value *RHS = nullptr;
  895   Value *L, *R;
  947   Value *NextLevelOpL = LS ? LS->getOperand(0) : nullptr;
  948   Value *NextLevelOpR = RS ? RS->getOperand(0) : nullptr;
  949   Value *NextLevelOp = nullptr;
 1053 static std::pair<Value *, ShuffleVectorInst *>
 1054 getShuffleAndOtherOprd(Value *L, Value *R) {
 1054 getShuffleAndOtherOprd(Value *L, Value *R) {
 1113     Value *NextRdxOp;
 1176     SmallVector<const Value *, 2> Operands(I->operand_values());
 1186     SmallVector<const Value *, 2> Operands(I->operand_values());
 1322       SmallVector<Value *, 4> Args(II->arg_operands());
lib/Analysis/TypeMetadataUtils.cpp
   25                           bool *HasNonCallUses, Value *FPtr, uint64_t Offset,
   52     const Module *M, SmallVectorImpl<DevirtCallSite> &DevirtCalls, Value *VPtr,
   55     Value *User = U.getUser();
   63         SmallVector<Value *, 8> Indices(GEP->op_begin() + 1, GEP->op_end());
  126   for (Value *LoadedPtr : LoadedPtrs)
lib/Analysis/ValueTracking.cpp
  118   std::array<const Value *, MaxDepth> Excluded;
  130   Query(const Query &Q, const Value *NewExcl)
  138   bool isExcluded(const Value *Value) const {
  150 static const Instruction *safeCxtI(const Value *V, const Instruction *CxtI) {
  164 static void computeKnownBits(const Value *V, KnownBits &Known,
  167 void llvm::computeKnownBits(const Value *V, KnownBits &Known,
  176 static KnownBits computeKnownBits(const Value *V, unsigned Depth,
  179 KnownBits llvm::computeKnownBits(const Value *V, const DataLayout &DL,
  189 bool llvm::haveNoCommonBitsSet(const Value *LHS, const Value *RHS,
  189 bool llvm::haveNoCommonBitsSet(const Value *LHS, const Value *RHS,
  198   Value *M;
  225 static bool isKnownToBeAPowerOfTwo(const Value *V, bool OrZero, unsigned Depth,
  228 bool llvm::isKnownToBeAPowerOfTwo(const Value *V, const DataLayout &DL,
  236 static bool isKnownNonZero(const Value *V, unsigned Depth, const Query &Q);
  238 bool llvm::isKnownNonZero(const Value *V, const DataLayout &DL, unsigned Depth,
  245 bool llvm::isKnownNonNegative(const Value *V, const DataLayout &DL,
  254 bool llvm::isKnownPositive(const Value *V, const DataLayout &DL, unsigned Depth,
  266 bool llvm::isKnownNegative(const Value *V, const DataLayout &DL, unsigned Depth,
  274 static bool isKnownNonEqual(const Value *V1, const Value *V2, const Query &Q);
  274 static bool isKnownNonEqual(const Value *V1, const Value *V2, const Query &Q);
  276 bool llvm::isKnownNonEqual(const Value *V1, const Value *V2,
  276 bool llvm::isKnownNonEqual(const Value *V1, const Value *V2,
  285 static bool MaskedValueIsZero(const Value *V, const APInt &Mask, unsigned Depth,
  288 bool llvm::MaskedValueIsZero(const Value *V, const APInt &Mask,
  296 static unsigned ComputeNumSignBits(const Value *V, unsigned Depth,
  299 unsigned llvm::ComputeNumSignBits(const Value *V, const DataLayout &DL,
  307 static void computeKnownBitsAddSub(bool Add, const Value *Op0, const Value *Op1,
  307 static void computeKnownBitsAddSub(bool Add, const Value *Op0, const Value *Op1,
  322 static void computeKnownBitsMul(const Value *Op0, const Value *Op1, bool NSW,
  322 static void computeKnownBitsMul(const Value *Op0, const Value *Op1, bool NSW,
  464 static bool isEphemeralValueOf(const Instruction *I, const Value *E) {
  465   SmallVector<const Value *, 16> WorkSet(1, I);
  466   SmallPtrSet<const Value *, 32> Visited;
  467   SmallPtrSet<const Value *, 16> EphValues;
  476     const Value *V = WorkSet.pop_back_val();
  578 static void computeKnownBitsFromAssume(const Value *V, KnownBits &Known,
  606     Value *Arg = I->getArgOperand(0);
  628     Value *A, *B;
 1005     Value *X = nullptr, *Y = nullptr;
 1058     const Value *LHS = nullptr, *RHS = nullptr;
 1310       Value *Index = I->getOperand(i);
 1354         Value *L = P->getIncomingValue(i);
 1355         Value *R = P->getIncomingValue(!i);
 1368           Value *LL = LU->getOperand(0);
 1369           Value *LR = LU->getOperand(1);
 1439       for (Value *IncValue : P->incoming_values()) {
 1465     if (const Value *RV = ImmutableCallSite(I).getReturnedArgOperand()) {
 1613 KnownBits computeKnownBits(const Value *V, unsigned Depth, const Query &Q) {
 1634 void computeKnownBits(const Value *V, KnownBits &Known, unsigned Depth,
 1742 bool isKnownToBeAPowerOfTwo(const Value *V, bool OrZero, unsigned Depth,
 1766   Value *X = nullptr, *Y = nullptr;
 1902 static bool isKnownNonNullFromDominatingCondition(const Value *V,
 2000 bool isKnownNonZero(const Value *V, unsigned Depth, const Query &Q) {
 2076       if (const auto *RP = getArgumentAliasingToReturnedPointer(Call, true))
 2117   Value *X = nullptr, *Y = nullptr;
 2220       Value *Start = PN->getIncomingValue(0);
 2221       Value *Induction = PN->getIncomingValue(1);
 2249 static bool isAddOfNonZero(const Value *V1, const Value *V2, const Query &Q) {
 2249 static bool isAddOfNonZero(const Value *V1, const Value *V2, const Query &Q) {
 2253   Value *Op = nullptr;
 2264 static bool isKnownNonEqual(const Value *V1, const Value *V2, const Query &Q) {
 2264 static bool isKnownNonEqual(const Value *V1, const Value *V2, const Query &Q) {
 2295 bool MaskedValueIsZero(const Value *V, const APInt &Mask, unsigned Depth,
 2304 static bool isSignedMinMaxClamp(const Value *Select, const Value *&In,
 2304 static bool isSignedMinMaxClamp(const Value *Select, const Value *&In,
 2310   const Value *LHS = nullptr, *RHS = nullptr;
 2318   const Value *LHS2 = nullptr, *RHS2 = nullptr;
 2337 static unsigned computeNumSignBitsVectorConstant(const Value *V,
 2357 static unsigned ComputeNumSignBitsImpl(const Value *V, unsigned Depth,
 2360 static unsigned ComputeNumSignBits(const Value *V, unsigned Depth,
 2373 static unsigned ComputeNumSignBitsImpl(const Value *V, unsigned Depth,
 2496       const Value *X;
 2667 bool llvm::ComputeMultiple(Value *V, unsigned Base, Value *&Multiple,
 2667 bool llvm::ComputeMultiple(Value *V, unsigned Base, Value *&Multiple,
 2714     Value *Op0 = I->getOperand(0);
 2715     Value *Op1 = I->getOperand(1);
 2728     Value *Mul0 = nullptr;
 2752     Value *Mul1 = nullptr;
 2895 bool llvm::CannotBeNegativeZero(const Value *V, const TargetLibraryInfo *TLI,
 2942 static bool cannotBeOrderedLessThanZeroImpl(const Value *V,
 3089 bool llvm::CannotBeOrderedLessThanZero(const Value *V,
 3094 bool llvm::SignBitMustBeZero(const Value *V, const TargetLibraryInfo *TLI) {
 3098 bool llvm::isKnownNeverNaN(const Value *V, const TargetLibraryInfo *TLI,
 3186 Value *llvm::isBytewiseValue(Value *V, const DataLayout &DL) {
 3186 Value *llvm::isBytewiseValue(Value *V, const DataLayout &DL) {
 3267     Value *Val = UndefInt8;
 3275     Value *Val = UndefInt8;
 3292 static Value *BuildSubAggregate(Value *From, Value* To, Type *IndexedType,
 3292 static Value *BuildSubAggregate(Value *From, Value* To, Type *IndexedType,
 3292 static Value *BuildSubAggregate(Value *From, Value* To, Type *IndexedType,
 3299     Value *OrigTo = To;
 3304       Value *PrevTo = To;
 3329   Value *V = FindInsertedValue(From, Idxs);
 3351 static Value *BuildSubAggregate(Value *From, ArrayRef<unsigned> idx_range,
 3351 static Value *BuildSubAggregate(Value *From, ArrayRef<unsigned> idx_range,
 3356   Value *To = UndefValue::get(IndexedType);
 3369 Value *llvm::FindInsertedValue(Value *V, ArrayRef<unsigned> idx_range,
 3369 Value *llvm::FindInsertedValue(Value *V, ArrayRef<unsigned> idx_range,
 3474 bool llvm::getConstantDataArrayInfo(const Value *V,
 3551 bool llvm::getConstantStringInfo(const Value *V, StringRef &Str,
 3591 static uint64_t GetStringLengthH(const Value *V,
 3605     for (Value *IncValue : PN->incoming_values()) {
 3652 uint64_t llvm::GetStringLength(const Value *V, unsigned CharSize) {
 3663 const Value *
 3668   if (const Value *RV = Call->getReturnedArgOperand())
 3714 Value *llvm::GetUnderlyingObject(Value *V, const DataLayout &DL,
 3714 Value *llvm::GetUnderlyingObject(Value *V, const DataLayout &DL,
 3742         if (auto *RP = getArgumentAliasingToReturnedPointer(Call, false)) {
 3751         if (Value *Simplified = SimplifyInstruction(I, {DL, I})) {
 3763 void llvm::GetUnderlyingObjects(const Value *V,
 3764                                 SmallVectorImpl<const Value *> &Objects,
 3767   SmallPtrSet<const Value *, 4> Visited;
 3768   SmallVector<const Value *, 4> Worklist;
 3771     const Value *P = Worklist.pop_back_val();
 3796         for (Value *IncValue : PN->incoming_values())
 3807 static const Value *getUnderlyingObjectFromInt(const Value *V) {
 3807 static const Value *getUnderlyingObjectFromInt(const Value *V) {
 3836 bool llvm::getUnderlyingObjectsForCodeGen(const Value *V,
 3837                           SmallVectorImpl<Value *> &Objects,
 3839   SmallPtrSet<const Value *, 16> Visited;
 3840   SmallVector<const Value *, 4> Working(1, V);
 3844     SmallVector<const Value *, 4> Objs;
 3847     for (const Value *V : Objs) {
 3851         const Value *O =
 3871 bool llvm::onlyUsedByLifetimeMarkers(const Value *V) {
 3894 bool llvm::isSafeToSpeculativelyExecute(const Value *V,
 3999     const Value *V, bool ForSigned, const DataLayout &DL, unsigned Depth,
 4012     const Value *LHS, const Value *RHS, const DataLayout &DL,
 4012     const Value *LHS, const Value *RHS, const DataLayout &DL,
 4025 llvm::computeOverflowForSignedMul(const Value *LHS, const Value *RHS,
 4025 llvm::computeOverflowForSignedMul(const Value *LHS, const Value *RHS,
 4068     const Value *LHS, const Value *RHS, const DataLayout &DL,
 4068     const Value *LHS, const Value *RHS, const DataLayout &DL,
 4080 static OverflowResult computeOverflowForSignedAdd(const Value *LHS,
 4081                                                   const Value *RHS,
 4143 OverflowResult llvm::computeOverflowForUnsignedSub(const Value *LHS,
 4144                                                    const Value *RHS,
 4156 OverflowResult llvm::computeOverflowForSignedSub(const Value *LHS,
 4157                                                  const Value *RHS,
 4235 OverflowResult llvm::computeOverflowForSignedAdd(const Value *LHS,
 4236                                                  const Value *RHS,
 4353 const Value *llvm::getGuaranteedNonFullPoisonOp(const Instruction *I) {
 4383                          const SmallSet<const Value *, 16>& KnownPoison) {
 4401   SmallSet<const Value *, 16> YieldsPoison;
 4442 static bool isKnownNonNaN(const Value *V, FastMathFlags FMF) {
 4462 static bool isKnownNonZero(const Value *V) {
 4484                                                Value *CmpLHS, Value *CmpRHS,
 4484                                                Value *CmpLHS, Value *CmpRHS,
 4485                                                Value *TrueVal, Value *FalseVal,
 4485                                                Value *TrueVal, Value *FalseVal,
 4486                                                Value *&LHS, Value *&RHS) {
 4486                                                Value *&LHS, Value *&RHS) {
 4538                                       Value *CmpLHS, Value *CmpRHS,
 4538                                       Value *CmpLHS, Value *CmpRHS,
 4539                                       Value *TrueVal, Value *FalseVal) {
 4539                                       Value *TrueVal, Value *FalseVal) {
 4574                                                Value *CmpLHS, Value *CmpRHS,
 4574                                                Value *CmpLHS, Value *CmpRHS,
 4575                                                Value *TVal, Value *FVal,
 4575                                                Value *TVal, Value *FVal,
 4580   Value *A = nullptr, *B = nullptr;
 4585   Value *C = nullptr, *D = nullptr;
 4668                                        Value *CmpLHS, Value *CmpRHS,
 4668                                        Value *CmpLHS, Value *CmpRHS,
 4669                                        Value *TrueVal, Value *FalseVal,
 4669                                        Value *TrueVal, Value *FalseVal,
 4670                                        Value *&LHS, Value *&RHS,
 4670                                        Value *&LHS, Value *&RHS,
 4740 bool llvm::isKnownNegation(const Value *X, const Value *Y, bool NeedNSW) {
 4740 bool llvm::isKnownNegation(const Value *X, const Value *Y, bool NeedNSW) {
 4754   Value *A, *B;
 4763                                               Value *CmpLHS, Value *CmpRHS,
 4763                                               Value *CmpLHS, Value *CmpRHS,
 4764                                               Value *TrueVal, Value *FalseVal,
 4764                                               Value *TrueVal, Value *FalseVal,
 4765                                               Value *&LHS, Value *&RHS,
 4765                                               Value *&LHS, Value *&RHS,
 4772     Value *OutputZeroVal = nullptr;
 4958 static Value *lookThroughCast(CmpInst *CmpI, Value *V1, Value *V2,
 4958 static Value *lookThroughCast(CmpInst *CmpI, Value *V1, Value *V2,
 4958 static Value *lookThroughCast(CmpInst *CmpI, Value *V1, Value *V2,
 5051 SelectPatternResult llvm::matchSelectPattern(Value *V, Value *&LHS, Value *&RHS,
 5051 SelectPatternResult llvm::matchSelectPattern(Value *V, Value *&LHS, Value *&RHS,
 5051 SelectPatternResult llvm::matchSelectPattern(Value *V, Value *&LHS, Value *&RHS,
 5063   Value *TrueVal = SI->getTrueValue();
 5064   Value *FalseVal = SI->getFalseValue();
 5071     CmpInst *CmpI, Value *TrueVal, Value *FalseVal, Value *&LHS, Value *&RHS,
 5071     CmpInst *CmpI, Value *TrueVal, Value *FalseVal, Value *&LHS, Value *&RHS,
 5071     CmpInst *CmpI, Value *TrueVal, Value *FalseVal, Value *&LHS, Value *&RHS,
 5071     CmpInst *CmpI, Value *TrueVal, Value *FalseVal, Value *&LHS, Value *&RHS,
 5074   Value *CmpLHS = CmpI->getOperand(0);
 5075   Value *CmpRHS = CmpI->getOperand(1);
 5086     if (Value *C = lookThroughCast(CmpI, TrueVal, FalseVal, CastOp)) {
 5095     if (Value *C = lookThroughCast(CmpI, FalseVal, TrueVal, CastOp)) {
 5134 static bool isTruePredicate(CmpInst::Predicate Pred, const Value *LHS,
 5135                             const Value *RHS, const DataLayout &DL,
 5182     const Value *X;
 5195 isImpliedCondOperands(CmpInst::Predicate Pred, const Value *ALHS,
 5196                       const Value *ARHS, const Value *BLHS, const Value *BRHS,
 5196                       const Value *ARHS, const Value *BLHS, const Value *BRHS,
 5196                       const Value *ARHS, const Value *BLHS, const Value *BRHS,
 5220 static bool isMatchingOps(const Value *ALHS, const Value *ARHS,
 5220 static bool isMatchingOps(const Value *ALHS, const Value *ARHS,
 5221                           const Value *BLHS, const Value *BRHS,
 5221                           const Value *BLHS, const Value *BRHS,
 5274   Value *ALHS = LHS->getOperand(0);
 5275   Value *ARHS = LHS->getOperand(1);
 5281   Value *BLHS = RHS->getOperand(0);
 5282   Value *BRHS = RHS->getOperand(1);
 5329   Value *ALHS, *ARHS;
 5344 Optional<bool> llvm::isImpliedCondition(const Value *LHS, const Value *RHS,
 5344 Optional<bool> llvm::isImpliedCondition(const Value *LHS, const Value *RHS,
 5386 Optional<bool> llvm::isImpliedByDomCondition(const Value *Cond,
 5401   Value *PredCond;
 5636   const Value *LHS = nullptr, *RHS = nullptr;
 5687 ConstantRange llvm::computeConstantRange(const Value *V, bool UseInstrInfo) {
 5745 Optional<int64_t> llvm::isPointerOffset(const Value *Ptr1, const Value *Ptr2,
 5745 Optional<int64_t> llvm::isPointerOffset(const Value *Ptr1, const Value *Ptr2,
lib/Analysis/VectorUtils.cpp
  152 Value *llvm::stripGetElementPtr(Value *Ptr, ScalarEvolution *SE, Loop *Lp) {
  152 Value *llvm::stripGetElementPtr(Value *Ptr, ScalarEvolution *SE, Loop *Lp) {
  169 Value *llvm::getUniqueCastUse(Value *Ptr, Loop *Lp, Type *Ty) {
  169 Value *llvm::getUniqueCastUse(Value *Ptr, Loop *Lp, Type *Ty) {
  170   Value *UniqueCast = nullptr;
  185 Value *llvm::getStrideFromPointer(Value *Ptr, ScalarEvolution *SE, Loop *Lp) {
  185 Value *llvm::getStrideFromPointer(Value *Ptr, ScalarEvolution *SE, Loop *Lp) {
  193   Value *OrigPtr = Ptr;
  246   Value *Stride = U->getValue();
  261 Value *llvm::findScalarElement(Value *V, unsigned EltNo) {
  261 Value *llvm::findScalarElement(Value *V, unsigned EltNo) {
  299   Value *Val; Constant *C;
  313 const llvm::Value *llvm::getSplatValue(const Value *V) {
  313 const llvm::Value *llvm::getSplatValue(const Value *V) {
  319   Value *Splat;
  332 bool llvm::isSplatValue(const Value *V, unsigned Depth) {
  353   Value *X, *Y, *Z;
  374   EquivalenceClasses<Value *> ECs;
  375   SmallVector<Value *, 16> Worklist;
  376   SmallPtrSet<Value *, 4> Roots;
  377   SmallPtrSet<Value *, 16> Visited;
  378   DenseMap<Value *, uint64_t> DBits;
  411     Value *Val = Worklist.pop_back_val();
  412     Value *Leader = ECs.getOrInsertLeaderValue(Val);
  457     for (Value *O : cast<User>(I)->operands()) {
  594 Instruction *llvm::propagateMetadata(Instruction *Inst, ArrayRef<Value *> VL) {
  702 static Value *concatenateTwoVectors(IRBuilder<> &Builder, Value *V1,
  702 static Value *concatenateTwoVectors(IRBuilder<> &Builder, Value *V1,
  703                                     Value *V2) {
  725 Value *llvm::concatenateVectors(IRBuilder<> &Builder, ArrayRef<Value *> Vecs) {
  725 Value *llvm::concatenateVectors(IRBuilder<> &Builder, ArrayRef<Value *> Vecs) {
  729   SmallVector<Value *, 8> ResList;
  732     SmallVector<Value *, 8> TmpList;
  734       Value *V0 = ResList[i], *V1 = ResList[i + 1];
  752 bool llvm::maskIsAllZeroOrUndef(Value *Mask) {
  769 bool llvm::maskIsAllOneOrUndef(Value *Mask) {
  787 APInt llvm::possiblyDemandedEltsInMask(Value *Mask) {
  823       Value *Ptr = getLoadStorePointerOperand(&I);
 1084     Value *FirstMemberPtr = getLoadStorePointerOperand(Group->getMember(0));
 1095       Value *LastMemberPtr = getLoadStorePointerOperand(LastMember);
 1156   SmallVector<Value *, 4> VL;
lib/AsmParser/LLParser.cpp
  126     Value *V = RAG.first;
 1376 Value *LLParser::checkValidVariableType(LocTy Loc, const Twine &Name, Type *Ty,
 1377                                         Value *Val, bool IsCall) {
 2085   if (Value > Value::MaximumAlignment)
 2457     Value *V;
 2525     std::vector<Value *> Inputs;
 2533       Value *Input = nullptr;
 2874 Value *LLParser::PerFunctionState::GetVal(const std::string &Name, Type *Ty,
 2877   Value *Val = F.getValueSymbolTable()->lookup(Name);
 2898   Value *FwdVal;
 2909 Value *LLParser::PerFunctionState::GetVal(unsigned ID, Type *Ty, LocTy Loc,
 2912   Value *Val = ID < NumberedVals.size() ? NumberedVals[ID] : nullptr;
 2932   Value *FwdVal;
 2968       Value *Sentinel = FI->second.first;
 2985     Value *Sentinel = FI->second.first;
 3662   Value *V = nullptr;
 5052 bool LLParser::ParseMetadataAsValue(Value *&V, PerFunctionState &PFS) {
 5075   Value *V;
 5133 bool LLParser::ConvertValIDToValue(Type *Ty, ValID &ID, Value *&V,
 5260     Value *V;
 5275 bool LLParser::ParseValue(Type *Ty, Value *&V, PerFunctionState *PFS) {
 5282 bool LLParser::ParseTypeAndValue(Value *&V, PerFunctionState *PFS) {
 5290   Value *V;
 5910   Value *RV;
 5926   Value *Op0;
 5955   Value *Cond;
 5967   SmallPtrSet<Value*, 32> SeenCases;
 5970     Value *Constant;
 6000   Value *Address;
 6084   Value *Callee;
 6090   SmallVector<Value *, 8> Args;
 6135   Value *Exn; LocTy ExnLoc;
 6144 bool LLParser::ParseExceptionArgs(SmallVectorImpl<Value *> &Args,
 6161     Value *V;
 6179   Value *CleanupPad = nullptr;
 6208   Value *CatchPad = nullptr;
 6228   Value *ParentPad;
 6278   Value *CatchSwitch = nullptr;
 6289   SmallVector<Value *, 8> Args;
 6300   Value *ParentPad = nullptr;
 6312   SmallVector<Value *, 8> Args;
 6331   LocTy Loc; Value *LHS;
 6411   Value *Callee;
 6420   SmallVector<Value *, 8> Args;
 6474   LocTy Loc; Value *LHS, *RHS;
 6494   LocTy Loc; Value *LHS, *RHS;
 6515   Value *LHS, *RHS;
 6546   Value *Op;
 6567   Value *Op0, *Op1, *Op2;
 6585   Value *Op;
 6604   Value *Op0, *Op1;
 6621   Value *Op0, *Op1, *Op2;
 6640   Value *Op0, *Op1, *Op2;
 6659   Value *Op0, *Op1;
 6670   SmallVector<std::pair<Value*, BasicBlock*>, 16> PHIVals;
 6725     Value *V;
 6813   Value *Callee;
 6821   SmallVector<Value*, 8> Args;
 6872   Value *Size = nullptr;
 6934   Value *Val; LocTy Loc;
 6983   Value *Val, *Ptr; LocTy Loc, PtrLoc;
 7028   Value *Ptr, *Cmp, *New; LocTy PtrLoc, CmpLoc, NewLoc;
 7081   Value *Ptr, *Val; LocTy PtrLoc, ValLoc;
 7182   Value *Ptr = nullptr;
 7183   Value *Val = nullptr;
 7204   SmallVector<Value*, 16> Indices;
 7245   Value *Val; LocTy Loc;
 7264   Value *Val0, *Val1; LocTy Loc0, Loc1;
 7322 bool LLParser::sortUseListOrder(Value *V, ArrayRef<unsigned> Indexes,
 7395   Value *V;
 7442   Value *V = F->getValueSymbolTable()->lookup(Label.StrVal);
lib/AsmParser/LLParser.h
  142     std::map<Value*, std::vector<unsigned> > ForwardRefAttrGroups;
  416       std::map<std::string, std::pair<Value*, LocTy> > ForwardRefVals;
  417       std::map<unsigned, std::pair<Value*, LocTy> > ForwardRefValIDs;
  418       std::vector<Value*> NumberedVals;
  434       Value *GetVal(const std::string &Name, Type *Ty, LocTy Loc, bool IsCall);
  435       Value *GetVal(unsigned ID, Type *Ty, LocTy Loc, bool IsCall);
  456     bool ConvertValIDToValue(Type *Ty, ValID &ID, Value *&V,
  459     Value *checkValidVariableType(LocTy Loc, const Twine &Name, Type *Ty,
  460                                   Value *Val, bool IsCall);
  463     bool ParseValue(Type *Ty, Value *&V, PerFunctionState *PFS);
  464     bool ParseValue(Type *Ty, Value *&V, PerFunctionState &PFS) {
  468     bool ParseValue(Type *Ty, Value *&V, LocTy &Loc,
  474     bool ParseTypeAndValue(Value *&V, PerFunctionState *PFS);
  475     bool ParseTypeAndValue(Value *&V, PerFunctionState &PFS) {
  478     bool ParseTypeAndValue(Value *&V, LocTy &Loc, PerFunctionState &PFS) {
  492       Value *V;
  494       ParamInfo(LocTy loc, Value *v, AttributeSet attrs)
  506     bool ParseExceptionArgs(SmallVectorImpl<Value *> &Args,
  516     bool ParseMetadataAsValue(Value *&V, PerFunctionState &PFS);
  608     bool sortUseListOrder(Value *V, ArrayRef<unsigned> Indexes, SMLoc Loc);
lib/Bitcode/Reader/BitcodeReader.cpp
  628   Value *getFnValueByID(unsigned ID, Type *Ty, Type **FullTy = nullptr) {
  653                         unsigned InstNum, Value *&ResVal,
  680                 unsigned InstNum, Type *Ty, Value *&ResVal) {
  690                 unsigned InstNum, Type *Ty, Value *&ResVal) {
  697   Value *getValue(SmallVectorImpl<uint64_t> &Record, unsigned Slot,
  708   Value *getValueSigned(SmallVectorImpl<uint64_t> &Record, unsigned Slot,
  742   Expected<Value *> recordValue(SmallVectorImpl<uint64_t> &Record,
 1550   if (Exponent > Value::MaxAlignmentExponent + 1)
 2009 Expected<Value *> BitcodeReader::recordValue(SmallVectorImpl<uint64_t> &Record,
 2017   Value *V = ValueList[ValueID];
 2183       Expected<Value *> ValOrErr = recordValue(Record, 1, TT);
 2191       Expected<Value *> ValOrErr = recordValue(Record, 2, TT);
 2194       Value *V = ValOrErr.get();
 2360     Value *V = nullptr;
 2633         if (Value *V = ValueList[Record[0]])
 2873       Value *V;
 3867       Value *LHS;
 3888       Value *LHS, *RHS;
 3925       Value *Op;
 3967       Value *BasePtr;
 3979       SmallVector<Value*, 16> GEPIdx;
 3981         Value *Op;
 3999       Value *Agg;
 4037       Value *Agg;
 4040       Value *Val;
 4083       Value *TrueVal, *FalseVal, *Cond;
 4098       Value *TrueVal, *FalseVal, *Cond;
 4128       Value *Vec, *Idx;
 4142       Value *Vec, *Elt, *Idx;
 4158       Value *Vec1, *Vec2, *Mask;
 4182       Value *LHS, *RHS;
 4221         Value *Op = nullptr;
 4244         Value *Cond = getValue(Record, 2, NextValueNo,
 4257       Value *CleanupPad =
 4276       Value *CatchPad =
 4295       Value *ParentPad =
 4334       Value *ParentPad =
 4339       SmallVector<Value *, 2> Args;
 4341         Value *Val;
 4368         Value *Cond = getValue(Record, 2, NextValueNo, OpTy);
 4424       Value *Cond = getValue(Record, 1, NextValueNo, OpTy);
 4448       Value *Address = getValue(Record, 1, NextValueNo, OpTy);
 4486       Value *Callee;
 4505       SmallVector<Value*, 16> Ops;
 4521           Value *Op;
 4544       Value *Val = nullptr;
 4573       Value *Callee;
 4592       SmallVector<Value*, 16> Args;
 4610           Value *Op;
 4651         Value *V;
 4694         Value *PersFn = nullptr;
 4711         Value *Val;
 4752       Value *Size = getFnValueByID(Record[2], OpTy);
 4774       Value *Op;
 4802       Value *Op;
 4839       Value *Val, *Ptr;
 4862       Value *Val, *Ptr;
 4896       Value *Ptr, *Cmp, *New;
 4953       Value *Ptr, *Val;
 5014       Value *Callee;
 5033       SmallVector<Value*, 16> Args;
 5053           Value *Op;
 5090       Value *Op = getValue(Record, 1, NextValueNo, OpTy);
 5108       std::vector<Value *> Inputs;
 5112         Value *Op;
lib/Bitcode/Reader/ValueList.cpp
   49   static bool classof(const Value *V) {
   68 void BitcodeReaderValueList::assignValue(Value *V, unsigned Idx, Type *FullTy) {
   93     Value *PrevVal = OldV;
  107   if (Value *V = ValuePtrs[Idx]) {
  119 Value *BitcodeReaderValueList::getValueFwdRef(unsigned Idx, Type *Ty,
  128   if (Value *V = ValuePtrs[Idx]) {
  142   Value *V = new Argument(Ty);
  161     Value *RealVal = operator[](ResolveConstants.back().second);
  184         Value *NewOp;
lib/Bitcode/Reader/ValueList.h
   69   void push_back(Value *V, Type *Ty) {
   80   Value *operator[](unsigned i) const {
   85   Value *back() const { return ValuePtrs.back(); }
   99   Value *getValueFwdRef(unsigned Idx, Type *Ty, Type **FullTy = nullptr);
  101   void assignValue(Value *V, unsigned Idx, Type *FullTy);
lib/Bitcode/Writer/BitcodeWriter.cpp
  374   bool pushValueAndType(const Value *V, unsigned InstID,
  377   void pushValue(const Value *V, unsigned InstID,
  379   void pushValueSigned(const Value *V, unsigned InstID,
 1389 static uint64_t getOptimizationFlags(const Value *V) {
 1423   Value *V = MD->getValue();
 2310     const Value *V = Vals[i].first;
 2424       for (const Value *Op : C->operands())
 2555 bool ModuleBitcodeWriter::pushValueAndType(const Value *V, unsigned InstID,
 2586 void ModuleBitcodeWriter::pushValue(const Value *V, unsigned InstID,
 2592 void ModuleBitcodeWriter::pushValueSigned(const Value *V, unsigned InstID,
 2757     const Value *Callee = II->getCalledValue();
 2833     const Value *Callee = CBI->getCalledValue();
lib/Bitcode/Writer/ValueEnumerator.cpp
   57   DenseMap<const Value *, std::pair<unsigned, bool>> IDs;
   72   std::pair<unsigned, bool> &operator[](const Value *V) { return IDs[V]; }
   74   std::pair<unsigned, bool> lookup(const Value *V) const {
   78   void index(const Value *V) {
   87 static void orderValue(const Value *V, OrderMap &OM) {
   93       for (const Value *Op : C->operands())
  159         for (const Value *Op : I.operands())
  170 static void predictValueUseListOrderImpl(const Value *V, const Function *F,
  239 static void predictValueUseListOrder(const Value *V, const Function *F,
  255       for (const Value *Op : C->operands())
  283         for (const Value *Op : I.operands())
  316 static bool isIntOrIntVectorValue(const std::pair<const Value*, unsigned> &V) {
  457 unsigned ValueEnumerator::getValueID(const Value *V) const {
  481     const Value *V = I->first;
  804 void ValueEnumerator::EnumerateValue(const Value *V) {
  892 void ValueEnumerator::EnumerateOperandType(const Value *V) {
  908   for (const Value *Op : C->operands()) {
lib/Bitcode/Writer/ValueEnumerator.h
   49   using ValueList = std::vector<std::pair<const Value *, unsigned>>;
   62   using ValueMapType = DenseMap<const Value *, unsigned>;
  151   unsigned getValueID(const Value *V) const;
  292   void EnumerateValue(const Value *V);
  294   void EnumerateOperandType(const Value *V);
lib/CodeGen/Analysis.cpp
  158 GlobalValue *llvm::ExtractTypeInfo(Value *V) {
  166     Value *Init = Var->getInitializer();
  273 static const Value *getNoopInput(const Value *V,
  273 static const Value *getNoopInput(const Value *V,
  283     const Value *NoopInput = nullptr;
  285     Value *Op = I->getOperand(0);
  316       const Value *ReturnedOp = CS.getReturnedArgOperand();
  354 static bool slotOnlyDiscardsData(const Value *RetVal, const Value *CallVal,
  354 static bool slotOnlyDiscardsData(const Value *RetVal, const Value *CallVal,
  631   const Value *RetVal = Ret->getOperand(0), *CallVal = I;
lib/CodeGen/AsmPrinter/AsmPrinter.cpp
 1584         for (const Value *Op : A->operands()) {
 2004   for (Value *O : InitList->operands()) {
 2340 static int isRepeatedByteSequence(const Value *V, const DataLayout &DL) {
lib/CodeGen/AtomicExpandPass.cpp
   80     Value *
   81     insertRMWLLSCLoop(IRBuilder<> &Builder, Type *ResultTy, Value *Addr,
   83                       function_ref<Value *(IRBuilder<> &, Value *)> PerformOp);
   83                       function_ref<Value *(IRBuilder<> &, Value *)> PerformOp);
   85         Instruction *I, Type *ResultTy, Value *Addr, AtomicOrdering MemOpOrder,
   86         function_ref<Value *(IRBuilder<> &, Value *)> PerformOp);
   86         function_ref<Value *(IRBuilder<> &, Value *)> PerformOp);
   96     static Value *insertRMWCmpXchgLoop(
   97         IRBuilder<> &Builder, Type *ResultType, Value *Addr,
   99         function_ref<Value *(IRBuilder<> &, Value *)> PerformOp,
   99         function_ref<Value *(IRBuilder<> &, Value *)> PerformOp,
  108                                  Value *PointerOperand, Value *ValueOperand,
  108                                  Value *PointerOperand, Value *ValueOperand,
  109                                  Value *CASExpected, AtomicOrdering Ordering,
  379   Value *Addr = LI->getPointerOperand();
  382   Value *NewAddr = Builder.CreateBitCast(Addr, PT);
  390   Value *NewVal = Builder.CreateBitCast(NewLI, LI->getType());
  420   Value *Val =
  436   Value *Addr = LI->getPointerOperand();
  440   Value *Pair = Builder.CreateAtomicCmpXchg(
  443   Value *Loaded = Builder.CreateExtractValue(Pair, 0, "loaded");
  464   Value *NewVal = Builder.CreateBitCast(SI->getValueOperand(), NewTy);
  466   Value *Addr = SI->getPointerOperand();
  469   Value *NewAddr = Builder.CreateBitCast(Addr, PT);
  497 static void createCmpXchgInstFun(IRBuilder<> &Builder, Value *Addr,
  498                                  Value *Loaded, Value *NewVal,
  498                                  Value *Loaded, Value *NewVal,
  500                                  Value *&Success, Value *&NewLoaded) {
  500                                  Value *&Success, Value *&NewLoaded) {
  513   Value* Pair = Builder.CreateAtomicCmpXchg(
  525 static Value *performAtomicOp(AtomicRMWInst::BinOp Op, IRBuilder<> &Builder,
  526                               Value *Loaded, Value *Inc) {
  526                               Value *Loaded, Value *Inc) {
  527   Value *NewVal;
  614   Value *AlignedAddr;
  615   Value *ShiftAmt;
  616   Value *Mask;
  617   Value *Inv_Mask;
  639                                            Type *ValueType, Value *Addr,
  660   Value *AddrInt = Builder.CreatePtrToInt(Addr, DL.getIntPtrType(Ctx));
  665   Value *PtrLSB = Builder.CreateAnd(AddrInt, WordSize - 1, "PtrLSB");
  687 static Value *performMaskedAtomicOp(AtomicRMWInst::BinOp Op,
  688                                     IRBuilder<> &Builder, Value *Loaded,
  689                                     Value *Shifted_Inc, Value *Inc,
  689                                     Value *Shifted_Inc, Value *Inc,
  696     Value *Loaded_MaskOut = Builder.CreateAnd(Loaded, PMV.Inv_Mask);
  697     Value *FinalVal = Builder.CreateOr(Loaded_MaskOut, Shifted_Inc);
  708     Value *NewVal = performAtomicOp(Op, Builder, Loaded, Shifted_Inc);
  709     Value *NewVal_Masked = Builder.CreateAnd(NewVal, PMV.Mask);
  710     Value *Loaded_MaskOut = Builder.CreateAnd(Loaded, PMV.Inv_Mask);
  711     Value *FinalVal = Builder.CreateOr(Loaded_MaskOut, NewVal_Masked);
  721     Value *Loaded_Shiftdown = Builder.CreateTrunc(
  723     Value *NewVal = performAtomicOp(Op, Builder, Loaded_Shiftdown, Inc);
  724     Value *NewVal_Shiftup = Builder.CreateShl(
  726     Value *Loaded_MaskOut = Builder.CreateAnd(Loaded, PMV.Inv_Mask);
  727     Value *FinalVal = Builder.CreateOr(Loaded_MaskOut, NewVal_Shiftup);
  754   Value *ValOperand_Shifted =
  765   Value *OldResult =
  768   Value *FinalOldResult = Builder.CreateTrunc(
  787   Value *ValOperand_Shifted =
  791   Value *NewOperand;
  802   Value *FinalOldResult = Builder.CreateTrunc(
  845   Value *Addr = CI->getPointerOperand();
  846   Value *Cmp = CI->getCompareOperand();
  847   Value *NewVal = CI->getNewValOperand();
  871   Value *NewVal_Shifted =
  873   Value *Cmp_Shifted =
  880   Value *InitLoaded_MaskOut = Builder.CreateAnd(InitLoaded, PMV.Inv_Mask);
  889   Value *FullWord_NewVal = Builder.CreateOr(Loaded_MaskOut, NewVal_Shifted);
  890   Value *FullWord_Cmp = Builder.CreateOr(Loaded_MaskOut, Cmp_Shifted);
  902   Value *OldVal = Builder.CreateExtractValue(NewCI, 0);
  903   Value *Success = Builder.CreateExtractValue(NewCI, 1);
  915   Value *OldVal_MaskOut = Builder.CreateAnd(OldVal, PMV.Inv_Mask);
  916   Value *ShouldContinue = Builder.CreateICmpNE(Loaded_MaskOut, OldVal_MaskOut);
  925   Value *FinalOldVal = Builder.CreateTrunc(
  927   Value *Res = UndefValue::get(CI->getType());
  936     Instruction *I, Type *ResultType, Value *Addr, AtomicOrdering MemOpOrder,
  937     function_ref<Value *(IRBuilder<> &, Value *)> PerformOp) {
  937     function_ref<Value *(IRBuilder<> &, Value *)> PerformOp) {
  939   Value *Loaded =
  961   Value *ValOperand_Shifted = Builder.CreateShl(
  964   Value *OldResult = TLI->emitMaskedAtomicRMWIntrinsic(
  967   Value *FinalOldResult = Builder.CreateTrunc(
  980   Value *CmpVal_Shifted = Builder.CreateShl(
  983   Value *NewVal_Shifted = Builder.CreateShl(
  986   Value *OldVal = TLI->emitMaskedAtomicCmpXchgIntrinsic(
  989   Value *FinalOldVal = Builder.CreateTrunc(
  992   Value *Res = UndefValue::get(CI->getType());
  994   Value *Success = Builder.CreateICmpEQ(
 1002 Value *AtomicExpand::insertRMWLLSCLoop(
 1003     IRBuilder<> &Builder, Type *ResultTy, Value *Addr,
 1005     function_ref<Value *(IRBuilder<> &, Value *)> PerformOp) {
 1005     function_ref<Value *(IRBuilder<> &, Value *)> PerformOp) {
 1034   Value *Loaded = TLI->emitLoadLinked(Builder, Addr, MemOpOrder);
 1036   Value *NewVal = PerformOp(Builder, Loaded);
 1038   Value *StoreSuccess =
 1040   Value *TryAgain = Builder.CreateICmpNE(
 1060   Value *Addr = CI->getPointerOperand();
 1063   Value *NewAddr = Builder.CreateBitCast(Addr, PT);
 1065   Value *NewCmp = Builder.CreatePtrToInt(CI->getCompareOperand(), NewTy);
 1066   Value *NewNewVal = Builder.CreatePtrToInt(CI->getNewValOperand(), NewTy);
 1077   Value *OldVal = Builder.CreateExtractValue(NewCI, 0);
 1078   Value *Succ = Builder.CreateExtractValue(NewCI, 1);
 1082   Value *Res = UndefValue::get(CI->getType());
 1094   Value *Addr = CI->getPointerOperand();
 1193   Value *UnreleasedLoad = TLI->emitLoadLinked(Builder, Addr, MemOpOrder);
 1194   Value *ShouldStore = Builder.CreateICmpEQ(
 1207   Value *StoreSuccess = TLI->emitStoreConditional(
 1216   Value *SecondLoad;
 1257   Value *Loaded;
 1305     Value *Res;
 1344 Value *AtomicExpand::insertRMWCmpXchgLoop(
 1345     IRBuilder<> &Builder, Type *ResultTy, Value *Addr,
 1347     function_ref<Value *(IRBuilder<> &, Value *)> PerformOp,
 1347     function_ref<Value *(IRBuilder<> &, Value *)> PerformOp,
 1387   Value *NewVal = PerformOp(Builder, Loaded);
 1389   Value *NewLoaded = nullptr;
 1390   Value *Success = nullptr;
 1433   Value *Loaded = AtomicExpand::insertRMWCmpXchgLoop(
 1610     Instruction *I, unsigned Size, unsigned Align, Value *PointerOperand,
 1611     Value *ValueOperand, Value *CASExpected, AtomicOrdering Ordering,
 1611     Value *ValueOperand, Value *CASExpected, AtomicOrdering Ordering,
 1684   Value *AllocaCASExpected_i8 = nullptr;
 1686   Value *AllocaValue_i8 = nullptr;
 1688   Value *AllocaResult_i8 = nullptr;
 1691   SmallVector<Value *, 6> Args;
 1706   Value *PtrVal = Builder.CreateBitCast(PointerOperand,
 1728       Value *IntValue =
 1771   for (Value *Arg : Args)
 1778   Value *Result = Call;
 1788     Value *V = UndefValue::get(FinalResultTy);
 1789     Value *ExpectedOut = Builder.CreateAlignedLoad(
 1796     Value *V;
lib/CodeGen/CodeGenPrepare.cpp
  240 using ValueToSExts = DenseMap<Value *, SExts>;
  264     ValueMap<Value*, WeakTrackingVH> SunkAddrs;
  277     DenseMap<Value *, Instruction *> SeenChainsForSExt;
  283         AssertingVH<Value>,
  288     SmallSet<AssertingVH<Value>, 2> NewGEPBases;
  331       Value *CurValue = &*CurInstIterator;
  360     bool optimizeMemoryInst(Instruction *MemoryInst, Value *Addr,
  800         const Value *V1 = PN.getIncomingValueForBlock(Pred);
  801         const Value *V2 = PN.getIncomingValueForBlock(BB);
  845     Value *InVal = PN.removeIncomingValue(BB, false);
  915                                           SmallVectorImpl<Value *> &OffsetV) {
  965     Value *Base = ToReplace->getBasePtr();
  970     SmallVector<Value *, 2> OffsetV;
 1003     Value *ActualRelocatedBase = RelocatedBase;
 1008     Value *Replacement = Builder.CreateGEP(
 1013     Value *ActualReplacement = Replacement;
 1079   for (Value::user_iterator UI = CI->user_begin(), E = CI->user_end();
 1197   Value *Arg0 = BO->getOperand(0);
 1198   Value *Arg1 = BO->getOperand(1);
 1216   Value *MathOV = Builder.CreateBinaryIntrinsic(IID, Arg0, Arg1);
 1217   Value *Math = Builder.CreateExtractValue(MathOV, 0, "math");
 1218   Value *OV = Builder.CreateExtractValue(MathOV, 1, "ov");
 1231   Value *A = Cmp->getOperand(0), *B = Cmp->getOperand(1);
 1260   Value *A, *B;
 1287   Value *A = Cmp->getOperand(0), *B = Cmp->getOperand(1);
 1313   Value *CmpVariableOperand = isa<Constant>(A) ? B : A;
 1363   for (Value::user_iterator UI = Cmp->user_begin(), E = Cmp->user_end();
 1471   for (Value::user_iterator UI = AndI->user_begin(), E = AndI->user_end();
 1530   for (Value::user_iterator TruncUI = TruncI->user_begin(),
 1622   for (Value::user_iterator UI = ShiftI->user_begin(), E = ShiftI->user_end();
 1752   Value *Zero = Constant::getNullValue(Ty);
 1753   Value *Cmp = Builder.CreateICmpEQ(CountZeros->getOperand(0), Zero, "cmpz");
 1762   Value *BitWidth = Builder.getInt(APInt(SizeInBits, SizeInBits));
 1808       Value *Val = Arg->stripAndAccumulateInBoundsConstantOffsets(*DL, Offset);
 1891       Value *ArgVal = II->getArgOperand(0);
 1913       SmallVector<Value*, 2> PtrOps;
 1917           Value *PtrVal = PtrOps.pop_back_val();
 1933   if (Value *V = Simplifier.optimizeCall(CI)) {
 1982   Value *V = RetI->getReturnValue();
 2018       Value *IncomingVal = PN->getIncomingValue(I)->stripPointerCasts();
 2077   Value *BaseReg = nullptr;
 2078   Value *ScaledReg = nullptr;
 2079   Value *OriginalValue = nullptr;
 2146   Value *GetFieldAsValue(FieldName Field, Type *IntPtrTy) {
 2161   void SetCombinedField(FieldName Field, Value *V,
 2350     Value *Origin;
 2357     OperandSetter(Instruction *Inst, unsigned Idx, Value *NewVal)
 2379     SmallVector<Value *, 4> OriginalValues;
 2389         Value *Val = Inst->getOperand(It);
 2408     Value *Val;
 2421     Value *getBuiltValue() { return Val; }
 2433     Value *Val;
 2439     SExtBuilder(Instruction *InsertPt, Value *Opnd, Type *Ty)
 2447     Value *getBuiltValue() { return Val; }
 2459     Value *Val;
 2465     ZExtBuilder(Instruction *InsertPt, Value *Opnd, Type *Ty)
 2473     Value *getBuiltValue() { return Val; }
 2528     UsesReplacer(Instruction *Inst, Value *New) : TypePromotionAction(Inst) {
 2633   void setOperand(Instruction *Inst, unsigned Idx, Value *NewVal);
 2636   void eraseInstruction(Instruction *Inst, Value *NewVal = nullptr);
 2639   void replaceAllUsesWith(Instruction *Inst, Value *New);
 2645   Value *createTrunc(Instruction *Opnd, Type *Ty);
 2648   Value *createSExt(Instruction *Inst, Value *Opnd, Type *Ty);
 2648   Value *createSExt(Instruction *Inst, Value *Opnd, Type *Ty);
 2651   Value *createZExt(Instruction *Inst, Value *Opnd, Type *Ty);
 2651   Value *createZExt(Instruction *Inst, Value *Opnd, Type *Ty);
 2669                                           Value *NewVal) {
 2675                                                 Value *NewVal) {
 2682                                                   Value *New) {
 2692 Value *TypePromotionTransaction::createTrunc(Instruction *Opnd,
 2695   Value *Val = Ptr->getBuiltValue();
 2700 Value *TypePromotionTransaction::createSExt(Instruction *Inst,
 2701                                             Value *Opnd, Type *Ty) {
 2703   Value *Val = Ptr->getBuiltValue();
 2708 Value *TypePromotionTransaction::createZExt(Instruction *Inst,
 2709                                             Value *Opnd, Type *Ty) {
 2711   Value *Val = Ptr->getBuiltValue();
 2802   Match(Value *V, Type *AccessTy, unsigned AS, Instruction *MemoryInst,
 2819   bool matchScaledValue(Value *ScaleReg, int64_t Scale, unsigned Depth);
 2820   bool matchAddr(Value *Addr, unsigned Depth);
 2826   bool valueAlreadyLiveAtInst(Value *Val, Value *KnownLive1, Value *KnownLive2);
 2826   bool valueAlreadyLiveAtInst(Value *Val, Value *KnownLive1, Value *KnownLive2);
 2826   bool valueAlreadyLiveAtInst(Value *Val, Value *KnownLive1, Value *KnownLive2);
 2828                              Value *PromotedOperand) const;
 2979   DenseMap<Value *, Value *> Storage;
 2979   DenseMap<Value *, Value *> Storage;
 2991   Value *Get(Value *V) {
 2991   Value *Get(Value *V) {
 3000   Value *Simplify(Value *Val) {
 3000   Value *Simplify(Value *Val) {
 3001     SmallVector<Value *, 32> WorkList;
 3002     SmallPtrSet<Value *, 32> Visited;
 3009         if (Value *V = SimplifyInstruction(cast<Instruction>(PI), SQ)) {
 3011             WorkList.push_back(cast<Value>(U));
 3024   void Put(Value *From, Value *To) {
 3024   void Put(Value *From, Value *To) {
 3029     Value* OldReplacement = Get(From);
 3070   typedef DenseMap<Value *, Value *> FoldAddrToValueMapping;
 3070   typedef DenseMap<Value *, Value *> FoldAddrToValueMapping;
 3090   Value *Original;
 3093   AddressingModeCombiner(const SimplifyQuery &_SQ, Value *OriginalValue)
 3182     Value *CommonValue = findCommon(Map);
 3197     SmallVector<Value *, 2> NullValue;
 3200       Value *DV = AM.GetFieldAsValue(DifferentField, IntPtrTy);
 3212     for (auto *V : NullValue)
 3240   Value *findCommon(FoldAddrToValueMapping &Map) {
 3252     SmallVector<Value *, 32> TraverseOrder;
 3270     auto *Result = ST.Get(Map.find(Original)->second);
 3299         Value *FirstValue = Item.first->getIncomingValueForBlock(B);
 3300         Value *SecondValue = Item.second->getIncomingValueForBlock(B);
 3381                         SmallVectorImpl<Value *> &TraverseOrder,
 3384       Value *Current = TraverseOrder.pop_back_val();
 3386       Value *V = Map[Current];
 3391         auto *TrueValue = CurrentSelect->getTrueValue();
 3394         auto *FalseValue = CurrentSelect->getFalseValue();
 3402           Value *PV = cast<PHINode>(Current)->getIncomingValueForBlock(B);
 3417                           SmallVectorImpl<Value *> &TraverseOrder,
 3419     SmallVector<Value *, 32> Worklist;
 3425       Value *Current = Worklist.pop_back_val();
 3452         for (Value *P : CurrentPhi->incoming_values())
 3480 bool AddressingModeMatcher::matchScaledValue(Value *ScaleReg, int64_t Scale,
 3513   ConstantInt *CI = nullptr; Value *AddLHS = nullptr;
 3569                                        const DataLayout &DL, Value *Val) {
 3650   static Value *promoteOperandForTruncAndAnyExt(
 3665   static Value *promoteOperandForOther(Instruction *Ext,
 3674   static Value *signExtendOperandForOther(
 3684   static Value *zeroExtendOperandForOther(
 3695   using Action = Value *(*)(Instruction *Ext, TypePromotionTransaction &TPT,
 3788   Value *OpndVal = Inst->getOperand(0);
 3853 Value *TypePromotionHelper::promoteOperandForTruncAndAnyExt(
 3861   Value *ExtVal = SExt;
 3867     Value *ZExt =
 3896   Value *NextVal = ExtInst->getOperand(0);
 3901 Value *TypePromotionHelper::promoteOperandForOther(
 3916     Value *Trunc = TPT.createTrunc(Ext, ExtOpnd->getType());
 3955     Value *Opnd = ExtOpnd->getOperand(OpIdx);
 3976       Value *ValForExtOpnd = IsSExt ? TPT.createSExt(Ext, Opnd, Ext->getType())
 4011     unsigned NewCost, unsigned OldCost, Value *PromotedOperand) const {
 4180         Value *Base = AddrInst->getOperand(0);
 4259     Value *PromotedOperand =
 4306 bool AddressingModeMatcher::matchAddr(Value *Addr, unsigned Depth) {
 4387 static bool IsOperandAMemoryOperand(CallInst *CI, InlineAsm *IA, Value *OpVal,
 4498 bool AddressingModeMatcher::valueAlreadyLiveAtInst(Value *Val,Value *KnownLive1,
 4498 bool AddressingModeMatcher::valueAlreadyLiveAtInst(Value *Val,Value *KnownLive1,
 4499                                                    Value *KnownLive2) {
 4555   Value *BaseReg = AMAfter.BaseReg, *ScaledReg = AMAfter.ScaledReg;
 4594     Value *Address = User->getOperand(OpNo);
 4633 static bool IsNonLocalValue(Value *V, BasicBlock *BB) {
 4658 bool CodeGenPrepare::optimizeMemoryInst(Instruction *MemoryInst, Value *Addr,
 4660   Value *Repl = Addr;
 4664   SmallVector<Value*, 8> worklist;
 4665   SmallPtrSet<Value*, 16> Visited;
 4679     Value *V = worklist.back();
 4696       for (Value *IncValue : P->incoming_values())
 4771   Value * SunkAddr = SunkAddrVH.pointsToAliveValue() ? SunkAddrVH : nullptr;
 4784     Value *ResultPtr = nullptr, *ResultIndex = nullptr;
 4854         Value *V = AddrMode.BaseReg;
 4863         Value *V = AddrMode.ScaledReg;
 4884         Value *V = ConstantInt::get(IntPtrTy, AddrMode.BaseOffs);
 4932     Value *Result = nullptr;
 4940       Value *V = AddrMode.BaseReg;
 4950       Value *V = AddrMode.ScaledReg;
 4980       Value *V = Builder.CreatePtrToInt(AddrMode.BaseGV, IntPtrTy, "sunkaddr");
 4989       Value *V = ConstantInt::get(IntPtrTy, AddrMode.BaseOffs);
 5012     Value *CurValue = &*CurInstIterator;
 5047       Value *OpVal = CS->getArgOperand(ArgNo++);
 5058 static bool hasSameExtUse(Value *Val, const TargetLowering &TLI) {
 5149     Value *PromotedVal = TPH(I, TPT, PromotedInsts, NewCreatedInstsCost,
 5181       Value *ExtOperand = MovedExt->getOperand(0);
 5284     Value *OldBase = Entry.first;
 5306     Value *NewBaseGEP = nullptr;
 5361         Value *BaseIndex = ConstantInt::get(IntPtrTy, BaseOffset);
 5371       Value *NewGEP = NewBaseGEP;
 5377         Value *Index = ConstantInt::get(IntPtrTy, Offset - BaseOffset);
 5521     Value *HeadOfChain = I->getOperand(0);
 5522     DenseMap<Value *, Instruction *>::iterator AlreadySeen =
 5539       Value *HeadOfChain = I->getOperand(0);
 5550       Value *HeadOfChain = I->getOperand(0);
 5569         Value *HeadOfChain = I->getOperand(0);
 5583   Value *Src = I->getOperand(0);
 5829 static bool sinkSelectOperand(const TargetTransformInfo *TTI, Value *V) {
 5882 static Value *getTrueOrFalseValue(
 5885   Value *V = nullptr;
 5914   Value *Cond, *TVal, *FVal;
 5923   Value *NewTVal = Builder.CreateBinOp(Opcode, Shift->getOperand(0), TVal);
 5924   Value *NewFVal = Builder.CreateBinOp(Opcode, Shift->getOperand(0), FVal);
 5925   Value *NewSel = Builder.CreateSelect(Cond, NewTVal, NewFVal);
 6228   Value *Cond = SI->getCondition();
 6355     Value *ValIdx = Transition->getOperand(getTransitionOriginalValueIdx());
 6384       Value *Arg0 = Inst->getOperand(0);
 6412   Value *getConstantVector(Constant *Val, bool UseSplat) const {
 6417       Value *ValExtractIdx = Transition->getOperand(getTransitionIdx());
 6483       const Value *Val = U.get();
 6566     Value *Val = U.get();
 6567     Value *NewVal = nullptr;
 6699   Value *LValue, *HValue;
 6738     Value *Addr = Builder.CreateBitCast(
 6838   Value *GEPIOp = GEPI->getOperand(0);
 6932     if (Value *V = SimplifyInstruction(P, {*DL, TLInfo})) {
 7205     Value *Cond1, *Cond2;
 7262       auto *Val = PN.getIncomingValueForBlock(&BB);
lib/CodeGen/DwarfEHPrepare.cpp
   54     Value *GetExceptionObject(ResumeInst *RI);
  102 Value *DwarfEHPrepare::GetExceptionObject(ResumeInst *RI) {
  103   Value *V = RI->getOperand(0);
  104   Value *ExnObj = nullptr;
  222     Value *ExnObj = GetExceptionObject(RI);
  243     Value *ExnObj = GetExceptionObject(RI);
lib/CodeGen/ExpandMemCmp.cpp
   93   Value *getCompareLoadPairs(unsigned BlockIndex, unsigned &LoadIndex);
   99   Value *getMemCmpExpansionZeroCase();
  100   Value *getMemCmpEqZeroOneBlock();
  101   Value *getMemCmpOneBlock();
  102   Value *getPtrToElementAtOffset(Value *Source, Type *LoadSizeType,
  102   Value *getPtrToElementAtOffset(Value *Source, Type *LoadSizeType,
  121   Value *getMemCmpExpansion();
  262 Value *MemCmpExpansion::getPtrToElementAtOffset(Value *Source,
  262 Value *MemCmpExpansion::getPtrToElementAtOffset(Value *Source,
  282   Value *Source1 =
  284   Value *Source2 =
  287   Value *LoadSrc1 = Builder.CreateLoad(LoadSizeType, Source1);
  288   Value *LoadSrc2 = Builder.CreateLoad(LoadSizeType, Source2);
  292   Value *Diff = Builder.CreateSub(LoadSrc1, LoadSrc2);
  299     Value *Cmp = Builder.CreateICmp(ICmpInst::ICMP_NE, Diff,
  314 Value *MemCmpExpansion::getCompareLoadPairs(unsigned BlockIndex,
  318   std::vector<Value *> XorList, OrList;
  319   Value *Diff = nullptr;
  330   Value *Cmp = nullptr;
  343     Value *Source1 = getPtrToElementAtOffset(CI->getArgOperand(0), LoadSizeType,
  345     Value *Source2 = getPtrToElementAtOffset(CI->getArgOperand(1), LoadSizeType,
  349     Value *LoadSrc1 = nullptr;
  355     Value *LoadSrc2 = nullptr;
  378     std::vector<Value *> OutList;
  380       Value *Or = Builder.CreateOr(InList[i], InList[i + 1]);
  406   Value *Cmp = getCompareLoadPairs(BlockIndex, LoadIndex);
  420     Value *Zero = ConstantInt::get(Type::getInt32Ty(CI->getContext()), 0);
  450   Value *Source1 = getPtrToElementAtOffset(CI->getArgOperand(0), LoadSizeType,
  452   Value *Source2 = getPtrToElementAtOffset(CI->getArgOperand(1), LoadSizeType,
  456   Value *LoadSrc1 = Builder.CreateLoad(LoadSizeType, Source1);
  457   Value *LoadSrc2 = Builder.CreateLoad(LoadSizeType, Source2);
  478   Value *Cmp = Builder.CreateICmp(ICmpInst::ICMP_EQ, LoadSrc1, LoadSrc2);
  491     Value *Zero = ConstantInt::get(Type::getInt32Ty(CI->getContext()), 0);
  505     Value *Res = ConstantInt::get(Type::getInt32Ty(CI->getContext()), 1);
  514   Value *Cmp = Builder.CreateICmp(ICmpInst::ICMP_ULT, ResBlock.PhiSrc1,
  517   Value *Res =
  541 Value *MemCmpExpansion::getMemCmpExpansionZeroCase() {
  556 Value *MemCmpExpansion::getMemCmpEqZeroOneBlock() {
  558   Value *Cmp = getCompareLoadPairs(0, LoadIndex);
  565 Value *MemCmpExpansion::getMemCmpOneBlock() {
  567   Value *Source1 = CI->getArgOperand(0);
  568   Value *Source2 = CI->getArgOperand(1);
  577   Value *LoadSrc1 = Builder.CreateLoad(LoadSizeType, Source1);
  578   Value *LoadSrc2 = Builder.CreateLoad(LoadSizeType, Source2);
  601   Value *CmpUGT = Builder.CreateICmpUGT(LoadSrc1, LoadSrc2);
  602   Value *CmpULT = Builder.CreateICmpULT(LoadSrc1, LoadSrc2);
  603   Value *ZextUGT = Builder.CreateZExt(CmpUGT, Builder.getInt32Ty());
  604   Value *ZextULT = Builder.CreateZExt(CmpULT, Builder.getInt32Ty());
  610 Value *MemCmpExpansion::getMemCmpExpansion() {
  768   Value *Res = Expansion.getMemCmpExpansion();
lib/CodeGen/ExpandReductions.cpp
   94     Value *Rdx = nullptr;
  103       Value *Acc = II->getArgOperand(0);
  104       Value *Vec = II->getArgOperand(1);
  124       Value *Vec = II->getArgOperand(0);
lib/CodeGen/GCRootLowering.cpp
  207         Value *St = new StoreInst(CI->getArgOperand(0),
  216         Value *Ld = new LoadInst(CI->getType(), CI->getArgOperand(1), "", CI);
lib/CodeGen/GlobalISel/IRTranslator.cpp
  161 IRTranslator::allocateVRegs(const Value &Val) {
  173 ArrayRef<Register> IRTranslator::getOrCreateVRegs(const Value &Val) {
  364   const Value *Ret = RI.getReturnValue();
  529   const Value &SValue = *JTH.SValue;
  715                                             Value *Cond,
  723   const Value *RHS, *LHS, *MHS;
  749                                        Value *Cond,
  851 static bool isSwiftError(const Value *V) {
  943   const Value *Src = U.getOperand(0);
  948   SmallVector<Value *, 1> Indices;
  968   const Value *Src = U.getOperand(0);
  983   const Value *Src = U.getOperand(0);
 1055   Value &Op0 = *U.getOperand(0);
 1065     const Value *Idx = GTI.getOperand();
 1173   Value *Global = TLI.getSDagStackGuard(*MF->getFunction().getParent());
 1300     SmallVector<const Value *, 4> Allocas;
 1305     for (const Value *V : Allocas) {
 1321     const Value *Address = DI.getAddress();
 1361     Value *Ptr = CI.getArgOperand(0);
 1374     const Value *V = DI.getValue();
 1677   const Value *Callee = I.getCalledValue();
 2080 bool IRTranslator::valueIsSplit(const Value &V,
lib/CodeGen/HardwareLoops.cpp
  124     Value *InitLoopCount();
  127     void InsertIterationSetup(Value *LoopCountInit);
  133     Instruction *InsertLoopRegDec(Value *EltsRem);
  138     PHINode *InsertPHICounter(Value *NumElts, Value *EltsRem);
  138     PHINode *InsertPHICounter(Value *NumElts, Value *EltsRem);
  142     void UpdateBranch(Value *EltsRem);
  165     Value *LoopDecrement    = nullptr;
  261   Value *LoopCountInit = InitLoopCount();
  269     Value *EltsRem = InsertPHICounter(LoopCountInit, LoopDec);
  281 static bool CanGenerateTest(Loop *L, Value *Count) {
  317 Value *HardwareLoop::InitLoopCount() {
  351   Value *Count = SCEVE.expandCodeFor(ExitCount, CountType,
  370 void HardwareLoop::InsertIterationSetup(Value *LoopCountInit) {
  376   Value *SetCount = Builder.CreateCall(LoopIter, LoopCountInit);
  398   Value *Ops[] = { LoopDecrement };
  399   Value *NewCond = CondBuilder.CreateCall(DecFunc, Ops);
  400   Value *OldCond = ExitBranch->getCondition();
  414 Instruction* HardwareLoop::InsertLoopRegDec(Value *EltsRem) {
  422   Value *Ops[] = { EltsRem, LoopDecrement };
  423   Value *Call = CondBuilder.CreateCall(DecFunc, Ops);
  429 PHINode* HardwareLoop::InsertPHICounter(Value *NumElts, Value *EltsRem) {
  429 PHINode* HardwareLoop::InsertPHICounter(Value *NumElts, Value *EltsRem) {
  441 void HardwareLoop::UpdateBranch(Value *EltsRem) {
  443   Value *NewCond =
  445   Value *OldCond = ExitBranch->getCondition();
lib/CodeGen/IndirectBrExpandPass.cpp
  168   Value *SwitchValue;
lib/CodeGen/InterleavedAccessPass.cpp
  363   DenseMap<ExtractElementInst *, std::pair<Value *, int>> ReplacementMap;
  407     auto *Vector = Replacement.second.first;
lib/CodeGen/InterleavedLoadCombinePass.cpp
  177   Value *V;
  186   Polynomial(Value *V) : ErrorMSBs((unsigned)-1), V(V), B(), A() {
  660   Value *PV;
  711   static bool compute(Value *V, VectorInfo &Result, const DataLayout &DL) {
  869     Value *BasePtr;
  887       Value *Idx[2] = {
  903     Value *LHS = BO.getOperand(0);
  904     Value *RHS = BO.getOperand(1);
  942   static void computePolynomial(Value &V, Polynomial &Result) {
  955   static void computePolynomialFromPointer(Value &Ptr, Polynomial &Result,
  956                                            Value *&BasePtr,
  996         SmallVector<Value *, 4> Indices;
lib/CodeGen/IntrinsicLowering.cpp
   45   SmallVector<Value *, 8> Args(ArgBegin, ArgEnd);
   62 static Value *LowerBSWAP(LLVMContext &Context, Value *V, Instruction *IP) {
   62 static Value *LowerBSWAP(LLVMContext &Context, Value *V, Instruction *IP) {
   72     Value *Tmp1 = Builder.CreateShl(V, ConstantInt::get(V->getType(), 8),
   74     Value *Tmp2 = Builder.CreateLShr(V, ConstantInt::get(V->getType(), 8),
   80     Value *Tmp4 = Builder.CreateShl(V, ConstantInt::get(V->getType(), 24),
   82     Value *Tmp3 = Builder.CreateShl(V, ConstantInt::get(V->getType(), 8),
   84     Value *Tmp2 = Builder.CreateLShr(V, ConstantInt::get(V->getType(), 8),
   86     Value *Tmp1 = Builder.CreateLShr(V,ConstantInt::get(V->getType(), 24),
  100     Value *Tmp8 = Builder.CreateShl(V, ConstantInt::get(V->getType(), 56),
  102     Value *Tmp7 = Builder.CreateShl(V, ConstantInt::get(V->getType(), 40),
  104     Value *Tmp6 = Builder.CreateShl(V, ConstantInt::get(V->getType(), 24),
  106     Value *Tmp5 = Builder.CreateShl(V, ConstantInt::get(V->getType(), 8),
  108     Value* Tmp4 = Builder.CreateLShr(V, ConstantInt::get(V->getType(), 8),
  110     Value* Tmp3 = Builder.CreateLShr(V,
  113     Value* Tmp2 = Builder.CreateLShr(V,
  116     Value* Tmp1 = Builder.CreateLShr(V,
  157 static Value *LowerCTPOP(LLVMContext &Context, Value *V, Instruction *IP) {
  157 static Value *LowerCTPOP(LLVMContext &Context, Value *V, Instruction *IP) {
  170   Value *Count = ConstantInt::get(V->getType(), 0);
  173     Value *PartValue = V;
  176       Value *MaskCst = ConstantInt::get(V->getType(), MaskValues[ct]);
  177       Value *LHS = Builder.CreateAnd(PartValue, MaskCst, "cppop.and1");
  178       Value *VShift = Builder.CreateLShr(PartValue,
  181       Value *RHS = Builder.CreateAnd(VShift, MaskCst, "cppop.and2");
  196 static Value *LowerCTLZ(LLVMContext &Context, Value *V, Instruction *IP) {
  196 static Value *LowerCTLZ(LLVMContext &Context, Value *V, Instruction *IP) {
  202     Value *ShVal = ConstantInt::get(V->getType(), i);
  252     Value *V = CI->getArgOperand(0);
  262     Value *V = ReplaceCallWith("setjmp", CI, CS.arg_begin(), CS.arg_end(),
  299     Value *Src = CI->getArgOperand(0);
  300     Value *NotSrc = Builder.CreateNot(Src);
  302     Value *SrcM1 = ConstantInt::get(Src->getType(), 1);
  376     Value *Size = Builder.CreateIntCast(CI->getArgOperand(2), IntPtr,
  378     Value *Ops[3];
  387     Value *Size = Builder.CreateIntCast(CI->getArgOperand(2), IntPtr,
  389     Value *Ops[3];
  397     Value *Op0 = CI->getArgOperand(0);
  399     Value *Size = Builder.CreateIntCast(CI->getArgOperand(2), IntPtr,
  401     Value *Ops[3];
  503   Value *Op = CI->getArgOperand(0);
lib/CodeGen/MIRParser/MIParser.cpp
  374   DenseMap<unsigned, const Value *> Slots2Values;
  466   bool parseIRValue(const Value *&V);
  511   const Value *getIRValue(unsigned Slot);
 2595 bool MIParser::parseIRValue(const Value *&V) {
 2777   const Value *V = nullptr;
 2997 static void mapValueToSlot(const Value *V, ModuleSlotTracker &MST,
 2998                            DenseMap<unsigned, const Value *> &Slots2Values) {
 3007                              DenseMap<unsigned, const Value *> &Slots2Values) {
 3019 const Value *MIParser::getIRValue(unsigned Slot) {
lib/CodeGen/MachineFunction.cpp
  670       Value *Val = LPI->getClause(I - 1);
  688       Value *TypeInfo = CPI->getArgOperand(I - 1)->stripPointerCasts();
lib/CodeGen/MachineInstr.cpp
 1238   const Value *ValA = MMOa->getValue();
 1239   const Value *ValB = MMOb->getValue();
 1336     if (const Value *V = MMO->getValue()) {
lib/CodeGen/MachineModuleInfo.cpp
   49   MMIAddrLabelMapCallbackPtr(Value *V) : CallbackVH(V) {}
   58   void allUsesReplacedWith(Value *V2) override;
  187 void MMIAddrLabelMapCallbackPtr::allUsesReplacedWith(Value *V2) {
lib/CodeGen/MachineOperand.cpp
  461 static void printIRValueReference(raw_ostream &OS, const Value &V,
  974   if (!V.is<const Value *>())
  977   const Value *BasePtr = V.get<const Value *>();
  977   const Value *BasePtr = V.get<const Value *>();
 1112   if (const Value *Val = getValue()) {
lib/CodeGen/MachinePipeliner.cpp
  639                                  SmallVectorImpl<const Value *> &Objs,
  647   for (const Value *V : Objs) {
  661   MapVector<const Value *, SmallVector<SUnit *, 4>> PendingLoads;
  662   Value *UnknownValue =
  669       SmallVector<const Value *, 4> Objs;
  678       SmallVector<const Value *, 4> Objs;
  683         MapVector<const Value *, SmallVector<SUnit *, 4>>::iterator I =
lib/CodeGen/PreISelIntrinsicLowering.cpp
   44     Value *OffsetPtr =
   46     Value *OffsetPtrI32 = B.CreateBitCast(OffsetPtr, Int32PtrTy);
   47     Value *OffsetI32 = B.CreateAlignedLoad(Int32Ty, OffsetPtrI32, 4);
   49     Value *ResultPtr = B.CreateGEP(Int8Ty, CI->getArgOperand(0), OffsetI32);
   84     SmallVector<Value *, 8> Args(CI->arg_begin(), CI->arg_end());
lib/CodeGen/SafeStack.cpp
  106   const Value *AllocaPtr;
  109   AllocaOffsetRewriter(ScalarEvolution &SE, const Value *AllocaPtr)
  135   Value *UnsafeStackPtr = nullptr;
  146   Value *getStackGuard(IRBuilder<> &IRB, Function &F);
  150                        AllocaInst *StackGuardSlot, Value *StackGuard);
  171   Value *moveStaticAllocasToUnsafeStack(IRBuilder<> &IRB, Function &F,
  186                            Value *StaticTop, bool NeedDynamicTop);
  191   void moveDynamicAllocasToUnsafeStack(Function &F, Value *UnsafeStackPtr,
  195   bool IsSafeStackAlloca(const Value *AllocaPtr, uint64_t AllocaSize);
  198                           const Value *AllocaPtr, uint64_t AllocaSize);
  199   bool IsAccessSafe(Value *Addr, uint64_t Size, const Value *AllocaPtr,
  199   bool IsAccessSafe(Value *Addr, uint64_t Size, const Value *AllocaPtr,
  230 bool SafeStack::IsAccessSafe(Value *Addr, uint64_t AccessSize,
  231                              const Value *AllocaPtr, uint64_t AllocaSize) {
  260                                    const Value *AllocaPtr,
  279 bool SafeStack::IsSafeStackAlloca(const Value *AllocaPtr, uint64_t AllocaSize) {
  283   SmallPtrSet<const Value *, 16> Visited;
  284   SmallVector<const Value *, 8> WorkList;
  289     const Value *V = WorkList.pop_back_val();
  369 Value *SafeStack::getStackGuard(IRBuilder<> &IRB, Function &F) {
  370   Value *StackGuardVar = TL.getIRStackGuard(IRB);
  429                                     Value *StaticTop, bool NeedDynamicTop) {
  455     Value *CurrentTop =
  464                                 AllocaInst *StackGuardSlot, Value *StackGuard) {
  465   Value *V = IRB.CreateLoad(StackPtrTy, StackGuardSlot);
  466   Value *Cmp = IRB.CreateICmpNE(StackGuard, V);
  486 Value *SafeStack::moveStaticAllocasToUnsafeStack(
  553     Value *Off = IRB.CreateGEP(Int8Ty, BasePointer, // BasePointer is i8*
  555     Value *NewAI =
  572     Value *Off = IRB.CreateGEP(Int8Ty, BasePointer, // BasePointer is i8*
  574     Value *NewArg = IRB.CreateBitCast(Off, Arg->getType(),
  608       Value *Off = IRBUser.CreateGEP(Int8Ty, BasePointer, // BasePointer is i8*
  610       Value *Replacement = IRBUser.CreateBitCast(Off, AI->getType(), Name);
  631   Value *StaticTop =
  639     Function &F, Value *UnsafeStackPtr, AllocaInst *DynamicTop,
  647     Value *ArraySize = AI->getArraySize();
  653     Value *Size = IRB.CreateMul(ArraySize, ConstantInt::get(IntPtrTy, TySize));
  655     Value *SP = IRB.CreatePtrToInt(IRB.CreateLoad(StackPtrTy, UnsafeStackPtr),
  665     Value *NewTop = IRB.CreateIntToPtr(
  674     Value *NewAI = IRB.CreatePointerCast(NewTop, AI->getType());
  796     Value *StackGuard = getStackGuard(IRB, F);
  808   Value *StaticTop =
lib/CodeGen/SafeStackLayout.cpp
   41 void StackLayout::addObject(const Value *V, unsigned Size, unsigned Alignment,
lib/CodeGen/SafeStackLayout.h
   41     const Value *Handle;
   48   DenseMap<const Value *, unsigned> ObjectOffsets;
   49   DenseMap<const Value *, unsigned> ObjectAlignments;
   58   void addObject(const Value *V, unsigned Size, unsigned Alignment,
   65   unsigned getObjectOffset(const Value *V) { return ObjectOffsets[V]; }
   68   unsigned getObjectAlignment(const Value *V) { return ObjectAlignments[V]; }
lib/CodeGen/ScalarizeMaskedMemIntrin.cpp
   79 static bool isConstantIntVector(Value *Mask) {
  127   Value *Ptr = CI->getArgOperand(0);
  128   Value *Alignment = CI->getArgOperand(1);
  129   Value *Mask = CI->getArgOperand(2);
  130   Value *Src0 = CI->getArgOperand(3);
  146     Value *NewI = Builder.CreateAlignedLoad(VecType, Ptr, AlignVal);
  157   Value *FirstEltPtr = Builder.CreateBitCast(Ptr, NewPtrType);
  161   Value *VResult = Src0;
  167       Value *Gep = Builder.CreateConstInBoundsGEP1_32(EltTy, FirstEltPtr, Idx);
  178   Value *SclrMask;
  192     Value *Predicate;
  194       Value *Mask = Builder.getInt(APInt::getOneBitSet(VectorWidth, Idx));
  211     Value *Gep = Builder.CreateConstInBoundsGEP1_32(EltTy, FirstEltPtr, Idx);
  213     Value *NewVResult = Builder.CreateInsertElement(VResult, Load, Idx);
  265   Value *Src = CI->getArgOperand(0);
  266   Value *Ptr = CI->getArgOperand(1);
  267   Value *Alignment = CI->getArgOperand(2);
  268   Value *Mask = CI->getArgOperand(3);
  293   Value *FirstEltPtr = Builder.CreateBitCast(Ptr, NewPtrType);
  300       Value *OneElt = Builder.CreateExtractElement(Src, Idx);
  301       Value *Gep = Builder.CreateConstInBoundsGEP1_32(EltTy, FirstEltPtr, Idx);
  310   Value *SclrMask;
  323     Value *Predicate;
  325       Value *Mask = Builder.getInt(APInt::getOneBitSet(VectorWidth, Idx));
  342     Value *OneElt = Builder.CreateExtractElement(Src, Idx);
  343     Value *Gep = Builder.CreateConstInBoundsGEP1_32(EltTy, FirstEltPtr, Idx);
  390   Value *Ptrs = CI->getArgOperand(0);
  391   Value *Alignment = CI->getArgOperand(1);
  392   Value *Mask = CI->getArgOperand(2);
  393   Value *Src0 = CI->getArgOperand(3);
  407   Value *VResult = Src0;
  415       Value *Ptr = Builder.CreateExtractElement(Ptrs, Idx, "Ptr" + Twine(Idx));
  428   Value *SclrMask;
  442     Value *Predicate;
  444       Value *Mask = Builder.getInt(APInt::getOneBitSet(VectorWidth, Idx));
  460     Value *Ptr = Builder.CreateExtractElement(Ptrs, Idx, "Ptr" + Twine(Idx));
  463     Value *NewVResult =
  514   Value *Src = CI->getArgOperand(0);
  515   Value *Ptrs = CI->getArgOperand(1);
  516   Value *Alignment = CI->getArgOperand(2);
  517   Value *Mask = CI->getArgOperand(3);
  539       Value *OneElt =
  541       Value *Ptr = Builder.CreateExtractElement(Ptrs, Idx, "Ptr" + Twine(Idx));
  550   Value *SclrMask;
  563     Value *Predicate;
  565       Value *Mask = Builder.getInt(APInt::getOneBitSet(VectorWidth, Idx));
  581     Value *OneElt = Builder.CreateExtractElement(Src, Idx, "Elt" + Twine(Idx));
  582     Value *Ptr = Builder.CreateExtractElement(Ptrs, Idx, "Ptr" + Twine(Idx));
  599   Value *Ptr = CI->getArgOperand(0);
  600   Value *Mask = CI->getArgOperand(1);
  601   Value *PassThru = CI->getArgOperand(2);
  617   Value *VResult = PassThru;
  625       Value *NewPtr = Builder.CreateConstInBoundsGEP1_32(EltTy, Ptr, MemIndex);
  639   Value *SclrMask;
  653     Value *Predicate;
  655       Value *Mask = Builder.getInt(APInt::getOneBitSet(VectorWidth, Idx));
  673     Value *NewVResult = Builder.CreateInsertElement(VResult, Load, Idx);
  676     Value *NewPtr;
  712   Value *Src = CI->getArgOperand(0);
  713   Value *Ptr = CI->getArgOperand(1);
  714   Value *Mask = CI->getArgOperand(2);
  735       Value *OneElt =
  737       Value *NewPtr = Builder.CreateConstInBoundsGEP1_32(EltTy, Ptr, MemIndex);
  747   Value *SclrMask;
  759     Value *Predicate;
  761       Value *Mask = Builder.getInt(APInt::getOneBitSet(VectorWidth, Idx));
  778     Value *OneElt = Builder.CreateExtractElement(Src, Idx);
  782     Value *NewPtr;
lib/CodeGen/ScheduleDAGInstrs.cpp
  154       } else if (const Value *V = MMO->getValue()) {
  155         SmallVector<Value *, 4> Objs;
  159         for (Value *V : Objs) {
 1023     if (Itr.first.is<const Value*>()) {
 1024       const Value *V = Itr.first.get<const Value*>();
 1024       const Value *V = Itr.first.get<const Value*>();
lib/CodeGen/SelectionDAG/FastISel.cpp
  159     DenseMap<const Value *, unsigned>::iterator VI = LocalValueMap.find(&*I);
  330 bool FastISel::hasTrivialKill(const Value *V) {
  362 unsigned FastISel::getRegForValue(const Value *V) {
  403 unsigned FastISel::materializeConstant(const Value *V, MVT VT) {
  455 unsigned FastISel::materializeRegForValue(const Value *V, MVT VT) {
  475 unsigned FastISel::lookUpRegForValue(const Value *V) {
  480   DenseMap<const Value *, unsigned>::iterator I = FuncInfo.ValueMap.find(V);
  486 void FastISel::updateValueMap(const Value *I, unsigned Reg, unsigned NumRegs) {
  507 std::pair<unsigned, bool> FastISel::getRegForGEPIndex(const Value *Idx) {
  689     const Value *Idx = GTI.getOperand();
  763     Value *Val = CI->getArgOperand(i);
  868                                  unsigned NumArgs, const Value *Callee,
  876     Value *V = CI->getOperand(ArgI);
  913   Value *Callee = I->getOperand(PatchPointOpers::TargetPos)->stripPointerCasts();
 1118     Value *V = CI->getOperand(ArgI);
 1260     Value *V = *i;
 1353     const Value *Address = DI->getAddress();
 1408     const Value *V = DI->getValue();
 1708 bool FastISel::selectFNeg(const User *I, const Value *In) {
 1765   const Value *Op0 = EVI->getOperand(0);
 1770   DenseMap<const Value *, unsigned>::iterator I = FuncInfo.ValueMap.find(Op0);
 1801     Value *X;
 2295       const Value *PHIOp = PN.getIncomingValueForBlock(LLVMBB);
 2372 bool FastISel::canFoldAddIntoGEP(const User *GEP, const Value *Add) {
 2390   const Value *Ptr;
lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
   59 static ISD::NodeType getPreferredExtendForValue(const Value *V) {
  382 unsigned FunctionLoweringInfo::CreateRegs(const Value *V) {
  433   Value *V = PN->getIncomingValue(0);
  466     Value *V = PN->getIncomingValue(i);
  519     const Value *CPI, const TargetRegisterClass *RC) {
  529 const Value *
lib/CodeGen/SelectionDAG/InstrEmitter.cpp
  731     const Value *V = SD->getConst();
lib/CodeGen/SelectionDAG/SDNodeDbgValue.h
   44     const Value *Const;     ///< Valid for constants.
   68   SDDbgValue(DIVariable *Var, DIExpression *Expr, const Value *C, DebugLoc dl,
  105   const Value *getConst() const { assert (kind==CONST); return u.Const; }
lib/CodeGen/SelectionDAG/SelectionDAG.cpp
 1825 SDValue SelectionDAG::getSrcValue(const Value *V) {
 1899   const Value *V = cast<SrcValueSDNode>(Node->getOperand(2))->getValue();
 1935   const Value *VD = cast<SrcValueSDNode>(Node->getOperand(3))->getValue();
 1936   const Value *VS = cast<SrcValueSDNode>(Node->getOperand(4))->getValue();
 7991                                               const Value *C,
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
  167 static Optional<CallingConv::ID> getABIRegCopyCC(const Value *V) {
  192                                       MVT PartVT, EVT ValueVT, const Value *V,
  202                                 MVT PartVT, EVT ValueVT, const Value *V,
  338 static void diagnosePossiblyInvalidConstraint(LLVMContext &Ctx, const Value *V,
  359                                       MVT PartVT, EVT ValueVT, const Value *V,
  492                                  MVT PartVT, const Value *V,
  500                            const Value *V,
  660                                  MVT PartVT, const Value *V,
  802                                       SDValue *Flag, const Value *V) const {
  888                                  const Value *V,
 1159 void SelectionDAGBuilder::resolveDanglingDebugInfo(const Value *V,
 1214   Value *V = DDI.getDI()->getValue();
 1268 bool SelectionDAGBuilder::handleDebugValue(const Value *V, DILocalVariable *Var,
 1370 SDValue SelectionDAGBuilder::getCopyFromRegs(const Value *V, Type *Ty) {
 1371   DenseMap<const Value *, unsigned>::iterator It = FuncInfo.ValueMap.find(V);
 1390 SDValue SelectionDAGBuilder::getValue(const Value *V) {
 1410 bool SelectionDAGBuilder::findValue(const Value *V) const {
 1417 SDValue SelectionDAGBuilder::getNonRegisterValue(const Value *V) {
 1440 SDValue SelectionDAGBuilder::getValueImpl(const Value *V) {
 1617   Value *ParentPad = I.getCatchSwitchParentPad();
 1931 void SelectionDAGBuilder::CopyToExportRegsIfNeeded(const Value *V) {
 1936   DenseMap<const Value *, unsigned>::iterator VMI = FuncInfo.ValueMap.find(V);
 1946 void SelectionDAGBuilder::ExportFromCurrentBlock(const Value *V) {
 1957 bool SelectionDAGBuilder::isExportableFromCurrentBlock(const Value *V,
 2012 static bool InBlock(const Value *V, const BasicBlock *BB) {
 2022 SelectionDAGBuilder::EmitBranchForMergedCondition(const Value *Cond,
 2069 void SelectionDAGBuilder::FindMergedConditions(const Value *Cond,
 2080   Value *NotCond;
 2244   const Value *CondVal = I.getCondition();
 2480   Value *Global = TLI.getSDagStackGuard(*MF.getFunction().getParent());
 2561     const Value *IRGuard = TLI.getSDagStackGuard(M);
 2754   const Value *Callee(I.getCalledValue());
 3244 static bool hasOnlySelectUsers(const Value *Cond) {
 3284     Value *LHS, *RHS;
 3505   const Value *SV = I.getOperand(0);
 3747   const Value *Op0 = I.getOperand(0);
 3748   const Value *Op1 = I.getOperand(1);
 3801   const Value *Op0 = I.getOperand(0);
 3835   Value *Op0 = I.getOperand(0);
 3858     const Value *Idx = GTI.getOperand();
 4004   const Value *SV = I.getOperand(0);
 4132   const Value *SrcV = I.getOperand(0);
 4158   const Value *SV = I.getOperand(0);
 4188   const Value *SrcV = I.getOperand(0);
 4189   const Value *PtrV = I.getOperand(1);
 4286   Value  *PtrOperand, *MaskOperand, *Src0Operand;
 4331 static bool getUniformBase(const Value *&Ptr, SDValue &Base, SDValue &Index,
 4342   const Value *GEPPtr = GEP->getPointerOperand();
 4349   Value *IndexVal = GEP->getOperand(FinalIndex);
 4388   const Value *Ptr = I.getArgOperand(1);
 4404   const Value *BasePtr = Ptr;
 4408   const Value *MemOpBasePtr = UniformBase ? BasePtr : nullptr;
 4446   Value  *PtrOperand, *MaskOperand, *Src0Operand;
 4494   const Value *Ptr = I.getArgOperand(0);
 4513   const Value *BasePtr = Ptr;
 4795     const Value *Arg = I.getArgOperand(i);
 5422     const Value *V, DILocalVariable *Variable, DIExpression *Expr,
 5550     DenseMap<const Value *, unsigned>::const_iterator
 5673     Value *Reg = I.getArgOperand(0);
 5685     Value *Reg = I.getArgOperand(0);
 5686     Value *RegValue = I.getArgOperand(1);
 5814     const Value *Address = DI.getVariableLocation();
 5902     const Value *V = DI.getValue();
 6374       const Value *Global = TLI.getSDagStackGuard(M);
 6469     const Value *Alloca = I.getArgOperand(0)->stripPointerCasts();
 6575     Value *const ObjectPtr = I.getArgOperand(1);
 6576     SmallVector<const Value *, 4> Allocas;
 6579     for (SmallVectorImpl<const Value*>::iterator Object = Allocas.begin(),
 6646       Value *Arg = I.getArgOperand(Idx)->stripPointerCasts();
 6686     Value *FP = I.getArgOperand(1);
 7106   const Value *SwiftErrorVal = nullptr;
 7120     const Value *V = *i;
 7153     Value *V = Bundle->Inputs[0];
 7198 static SDValue getMemCmpLoad(const Value *PtrVal, MVT LoadVT,
 7261   const Value *LHS = I.getArgOperand(0), *RHS = I.getArgOperand(1);
 7262   const Value *Size = I.getArgOperand(2);
 7353   const Value *Src = I.getArgOperand(0);
 7354   const Value *Char = I.getArgOperand(1);
 7355   const Value *Length = I.getArgOperand(2);
 7417   const Value *Arg0 = I.getArgOperand(0), *Arg1 = I.getArgOperand(1);
 7440   const Value *Arg0 = I.getArgOperand(0), *Arg1 = I.getArgOperand(1);
 7463   const Value *Arg0 = I.getArgOperand(0);
 7484   const Value *Arg0 = I.getArgOperand(0), *Arg1 = I.getArgOperand(1);
 7849   const Value *OpVal = OpInfo.CallOperandVal;
 8480         const Value *Ptr = OpInfo.CallOperandVal;
 8631     const Value *V = Call->getOperand(ArgI);
 9369 SelectionDAGBuilder::CopyValueToVirtualRegister(const Value *V, unsigned Reg) {
 9470     const Value *Dst = SI->getPointerOperand()->stripPointerCasts();
 9482     const Value *Val = SI->getValueOperand()->stripPointerCasts();
 9572   for (const Value *U : Arg.users()) {
 9959       const Value *PHIOp = PN.getIncomingValueForBlock(LLVMBB);
 9969         DenseMap<const Value *, unsigned>::iterator I =
10042 void SelectionDAGBuilder::lowerWorkItem(SwitchWorkListItem W, Value *Cond,
10242         const Value *RHS, *LHS, *MHS;
10292                                         Value *Cond,
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
  100   DenseMap<const Value*, SDValue> NodeMap;
  104   DenseMap<const Value*, SDValue> UnusedArgNodeMap;
  127   MapVector<const Value*, DanglingDebugInfoVector> DanglingDebugInfoMap;
  158                      const SwitchCG::SwitchWorkListItem &W, Value *Cond,
  162   void lowerWorkItem(SwitchCG::SwitchWorkListItem W, Value *Cond,
  466   void CopyValueToVirtualRegister(const Value *V, unsigned Reg);
  474   SDValue getCopyFromRegs(const Value *V, Type *Ty);
  484   void resolveDanglingDebugInfo(const Value *V, SDValue Val);
  493   bool handleDebugValue(const Value *V, DILocalVariable *Var,
  500   SDValue getValue(const Value *V);
  501   bool findValue(const Value *V) const;
  504   SDNode *getNodeForIRValue(const Value *V) {
  510   SDValue getNonRegisterValue(const Value *V);
  511   SDValue getValueImpl(const Value *V);
  513   void setValue(const Value *V, SDValue NewN) {
  519   void setUnusedArgValue(const Value *V, SDValue NewN) {
  525   void FindMergedConditions(const Value *Cond, MachineBasicBlock *TBB,
  530   void EmitBranchForMergedCondition(const Value *Cond, MachineBasicBlock *TBB,
  537   bool isExportableFromCurrentBlock(const Value *V, const BasicBlock *FromBB);
  538   void CopyToExportRegsIfNeeded(const Value *V);
  539   void ExportFromCurrentBlock(const Value *V);
  566     SmallVector<const Value *, 16> Bases;
  567     SmallVector<const Value *, 16> Ptrs;
  782   bool EmitFuncArgumentDbgValue(const Value *V, DILocalVariable *Variable,
  863                           const Value *V = nullptr) const;
  871                      SDValue &Chain, SDValue *Flag, const Value *V = nullptr,
lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp
  616     const Value *LBB = (const Value*)BBDN->getBasicBlock()->getBasicBlock();
lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
 1211           Value *IndexArg = Call->getArgOperand(1);
 1304       const Value *Address = DI->getAddress();
lib/CodeGen/SelectionDAG/StatepointLowering.cpp
  144 static Optional<int> findPreviousSpillSlot(const Value *Val,
  223 static void reservePreviousStackSlotForValue(const Value *IncomingValue,
  276 removeDuplicateGCPtrs(SmallVectorImpl<const Value *> &Bases,
  277                       SmallVectorImpl<const Value *> &Ptrs,
  281   DenseMap<SDValue, const Value *> Seen;
  283   SmallVector<const Value *, 64> NewBases, NewPtrs;
  490     for (const Value *V : SI.Bases) {
  497     for (const Value *V : SI.Ptrs) {
  533   for (const Value *V : SI.DeoptState) {
  550   for (const Value *V : SI.DeoptState) {
  571     const Value *Base = SI.Bases[i];
  575     const Value *Ptr = SI.Ptrs[i];
  585   for (Value *V : SI.GCArgs) {
  607     const Value *V = Relocate->getDerivedPtr();
  706     for (const Value *V : SI.GCTransitionArgs) {
  797     for (const Value *V : SI.GCTransitionArgs) {
 1004   const Value *DerivedPtr = Relocate.getDerivedPtr();
lib/CodeGen/SelectionDAG/TargetLowering.cpp
 4411   Value *CallOperandVal = info.CallOperandVal;
 4542     Value *v = OpInfo.CallOperandVal;
lib/CodeGen/ShadowStackGCLowering.cpp
   72   bool IsNullValue(Value *V);
   78                                       Type *Ty, Value *BasePtr, int Idx1,
   81                                       Type *Ty, Value *BasePtr, int Idx1, int Idx2,
  221 bool ShadowStackGCLowering::IsNullValue(Value *V) {
  257                                                     Value *BasePtr, int Idx,
  260   Value *Indices[] = {ConstantInt::get(Type::getInt32Ty(Context), 0),
  263   Value *Val = B.CreateGEP(Ty, BasePtr, Indices, Name);
  271                                             IRBuilder<> &B, Type *Ty, Value *BasePtr,
  273   Value *Indices[] = {ConstantInt::get(Type::getInt32Ty(Context), 0),
  275   Value *Val = B.CreateGEP(Ty, BasePtr, Indices, Name);
  300   Value *FrameMap = GetFrameMap(F);
  324     Value *SlotPtr = CreateGEP(Context, AtEntry, ConcreteStackEntryTy,
  357     Value *SavedHead = AtExit->CreateLoad(StackEntryTy->getPointerTo(),
lib/CodeGen/SjLjEHPrepare.cpp
   66   void substituteLPadValues(LandingPadInst *LPI, Value *ExnVal, Value *SelVal);
   66   void substituteLPadValues(LandingPadInst *LPI, Value *ExnVal, Value *SelVal);
   67   Value *setupFunctionContext(Function &F, ArrayRef<LandingPadInst *> LPads);
  107   Value *Zero = ConstantInt::get(Int32Ty, 0);
  108   Value *One = ConstantInt::get(Int32Ty, 1);
  109   Value *Idxs[2] = { Zero, One };
  110   Value *CallSite =
  135 void SjLjEHPrepare::substituteLPadValues(LandingPadInst *LPI, Value *ExnVal,
  136                                          Value *SelVal) {
  137   SmallVector<Value *, 8> UseWorkList(LPI->user_begin(), LPI->user_end());
  139     Value *Val = UseWorkList.pop_back_val();
  159   Value *LPadVal = UndefValue::get(LPadType);
  170 Value *SjLjEHPrepare::setupFunctionContext(Function &F,
  188     Value *FCData =
  193     Value *ExceptionAddr = Builder.CreateConstGEP2_32(doubleUnderDataTy, FCData,
  195     Value *ExnVal = Builder.CreateLoad(Int32Ty, ExceptionAddr, true, "exn_val");
  198     Value *SelectorAddr = Builder.CreateConstGEP2_32(doubleUnderDataTy, FCData,
  200     Value *SelVal =
  208   Value *PersonalityFn = F.getPersonalityFn();
  209   Value *PersonalityFieldPtr = Builder.CreateConstGEP2_32(
  216   Value *LSDA = Builder.CreateCall(LSDAAddrFn, {}, "lsda_addr");
  217   Value *LSDAFieldPtr =
  246     Value *TrueValue = ConstantInt::getTrue(F.getContext());
  247     Value *UndefValue = UndefValue::get(Ty);
  383   Value *FuncCtx =
  389   Value *JBufPtr =
  393   Value *FramePtr = Builder.CreateConstGEP2_32(doubleUnderJBufTy, JBufPtr, 0, 0,
  396   Value *Val = Builder.CreateCall(FrameAddrFn, Builder.getInt32(0), "fp");
  400   Value *StackPtr = Builder.CreateConstGEP2_32(doubleUnderJBufTy, JBufPtr, 0, 2,
  411   Value *FuncCtxArg = Builder.CreateBitCast(FuncCtx, Builder.getInt8PtrTy());
lib/CodeGen/StackColoring.cpp
 1031           if (const Value *MMOV = MMO->getValue()) {
 1032             SmallVector<Value *, 4> Objs;
 1038               for (Value *V : Objs) {
lib/CodeGen/StackProtector.cpp
  349 static Value *getStackGuard(const TargetLoweringBase *TLI, Module *M,
  352   if (Value *Guard = TLI->getIRStackGuard(B))
  389   Value *GuardSlot = getStackGuard(TLI, M, B, &SupportsSelectionDAGSP);
  502       Value *Guard = getStackGuard(TLI, M, B);
  504       Value *Cmp = B.CreateICmpEQ(Guard, LI2);
lib/CodeGen/SwiftErrorValueTracking.cpp
   27                                                   const Value *Val) {
   46                                              const Value *Val, Register VReg) {
   51     const Instruction *I, const MachineBasicBlock *MBB, const Value *Val) {
   66     const Instruction *I, const MachineBasicBlock *MBB, const Value *Val) {
  128   for (const auto *SwiftErrorVal : SwiftErrorVals) {
  160     for (const auto *SwiftErrorVal : SwiftErrorVals) {
  270       const Value *SwiftErrorAddr = nullptr;
  289       const Value *V = LI->getOperand(0);
  297       const Value *SwiftErrorAddr = SI->getOperand(1);
lib/CodeGen/TargetLoweringBase.cpp
 1677 Value *TargetLoweringBase::getDefaultSafeStackPointerLocation(IRBuilder<> &IRB,
 1709 Value *TargetLoweringBase::getSafeStackPointerLocation(IRBuilder<> &IRB) const {
 1769 Value *TargetLoweringBase::getIRStackGuard(IRBuilder<> &IRB) const {
 1789 Value *TargetLoweringBase::getSDagStackGuard(const Module &M) const {
lib/CodeGen/WasmEHPrepare.cpp
  103   Value *LPadIndexField = nullptr; // lpad_index field
  104   Value *LSDAField = nullptr;      // lsda field
  105   Value *SelectorField = nullptr;  // selector
lib/CodeGen/WinEHPrepare.cpp
   76   insertPHIStore(BasicBlock *PredBlock, Value *PredVal, AllocaInst *SpillSlot,
   77                  SmallVectorImpl<std::pair<BasicBlock *, Value *>> &Worklist);
   79   void replaceUseWithLoad(Value *V, Use &U, AllocaInst *&SpillSlot,
   80                           DenseMap<BasicBlock *, Value *> &Loads, Function &F);
  219                                                  Value *ParentPad) {
  509     const Value *ParentPad;
  634         const Value *UserUnwindParent;
  729     Value *FuncletToken;
  874           Value *IV = SuccPN.getIncomingValue(OldBlockIdx);
  947         Value *FuncletBundleOperand = nullptr;
 1082     Value *V = new LoadInst(PN->getType(), SpillSlot,
 1091   DenseMap<BasicBlock *, Value *> Loads;
 1092   for (Value::use_iterator UI = PN->use_begin(), UE = PN->use_end();
 1114   SmallVector<std::pair<BasicBlock *, Value *>, 4> Worklist;
 1120     Value *InVal;
 1129         Value *PredVal = PN->getIncomingValue(i);
 1148     BasicBlock *PredBlock, Value *PredVal, AllocaInst *SpillSlot,
 1149     SmallVectorImpl<std::pair<BasicBlock *, Value *>> &Worklist) {
 1161 void WinEHPrepare::replaceUseWithLoad(Value *V, Use &U, AllocaInst *&SpillSlot,
 1162                                       DenseMap<BasicBlock *, Value *> &Loads,
 1222     Value *&Load = Loads[IncomingBlock];
lib/ExecutionEngine/Interpreter/Execution.cpp
   41 static void SetValue(Value *V, GenericValue Val, ExecutionContext &SF) {
  940     Value *Cond = I.getCondition();
  949   Value* Cond = I.getCondition();
  997     Value *IncomingValue = PN->getIncomingValue(i);
 1046 GenericValue Interpreter::executeGEPOperation(Value *Ptr, gep_type_iterator I,
 1167     Value *V = *i;
 1270 GenericValue Interpreter::executeTruncInst(Value *SrcVal, Type *DstTy,
 1290 GenericValue Interpreter::executeSExtInst(Value *SrcVal, Type *DstTy,
 1310 GenericValue Interpreter::executeZExtInst(Value *SrcVal, Type *DstTy,
 1331 GenericValue Interpreter::executeFPTruncInst(Value *SrcVal, Type *DstTy,
 1354 GenericValue Interpreter::executeFPExtInst(Value *SrcVal, Type *DstTy,
 1376 GenericValue Interpreter::executeFPToUIInst(Value *SrcVal, Type *DstTy,
 1414 GenericValue Interpreter::executeFPToSIInst(Value *SrcVal, Type *DstTy,
 1451 GenericValue Interpreter::executeUIToFPInst(Value *SrcVal, Type *DstTy,
 1483 GenericValue Interpreter::executeSIToFPInst(Value *SrcVal, Type *DstTy,
 1517 GenericValue Interpreter::executePtrToIntInst(Value *SrcVal, Type *DstTy,
 1527 GenericValue Interpreter::executeIntToPtrInst(Value *SrcVal, Type *DstTy,
 1540 GenericValue Interpreter::executeBitCastInst(Value *SrcVal, Type *DstTy,
 1934   Value *Agg = I.getAggregateOperand();
 1977   Value *Agg = I.getAggregateOperand();
 2104 GenericValue Interpreter::getOperandValue(Value *V, ExecutionContext &SF) {
lib/ExecutionEngine/Interpreter/Interpreter.h
   66   std::map<Value *, GenericValue> Values; // LLVM values used in this invocation
  188   GenericValue executeGEPOperation(Value *Ptr, gep_type_iterator I,
  202   GenericValue getOperandValue(Value *V, ExecutionContext &SF);
  203   GenericValue executeTruncInst(Value *SrcVal, Type *DstTy,
  205   GenericValue executeSExtInst(Value *SrcVal, Type *DstTy,
  207   GenericValue executeZExtInst(Value *SrcVal, Type *DstTy,
  209   GenericValue executeFPTruncInst(Value *SrcVal, Type *DstTy,
  211   GenericValue executeFPExtInst(Value *SrcVal, Type *DstTy,
  213   GenericValue executeFPToUIInst(Value *SrcVal, Type *DstTy,
  215   GenericValue executeFPToSIInst(Value *SrcVal, Type *DstTy,
  217   GenericValue executeUIToFPInst(Value *SrcVal, Type *DstTy,
  219   GenericValue executeSIToFPInst(Value *SrcVal, Type *DstTy,
  221   GenericValue executePtrToIntInst(Value *SrcVal, Type *DstTy,
  223   GenericValue executeIntToPtrInst(Value *SrcVal, Type *DstTy,
  225   GenericValue executeBitCastInst(Value *SrcVal, Type *DstTy,
  227   GenericValue executeCastOperation(Instruction::CastOps opcode, Value *SrcVal,
lib/ExecutionEngine/Orc/ExecutionUtils.cpp
   72   Value *Data = CS->getNumOperands() == 3 ? CS->getOperand(2) : nullptr;
lib/ExecutionEngine/Orc/IndirectionUtils.cpp
  237 void makeStub(Function &F, Value &ImplPointer) {
  244   std::vector<Value*> CallArgs;
lib/FuzzMutate/IRMutator.cpp
   96 InjectorIRStrategy::chooseOperation(Value *Src, RandomIRBuilder &IB) {
  120   SmallVector<Value *, 2> Srcs;
  133   if (Value *Op = OpDesc->BuilderFunc(Srcs, Insts[IP])) {
  185   auto RS = makeSampler<Value *>(IB.Rand);
lib/FuzzMutate/RandomIRBuilder.cpp
   21 Value *RandomIRBuilder::findOrCreateSource(BasicBlock &BB,
   26 Value *RandomIRBuilder::findOrCreateSource(BasicBlock &BB,
   28                                            ArrayRef<Value *> Srcs,
   41 Value *RandomIRBuilder::newSource(BasicBlock &BB, ArrayRef<Instruction *> Insts,
   42                                   ArrayRef<Value *> Srcs, SourcePred Pred) {
   44   auto RS = makeSampler<Value *>(Rand);
   48   Value *Ptr = findPointer(BB, Insts, Srcs, Pred);
   71                                     const Value *Replacement) {
   96                                     ArrayRef<Instruction *> Insts, Value *V) {
  121                               Value *V) {
  122   Value *Ptr = findPointer(BB, Insts, {V}, matchFirstType());
  133 Value *RandomIRBuilder::findPointer(BasicBlock &BB,
  135                                     ArrayRef<Value *> Srcs, SourcePred Pred) {
lib/IR/AsmWriter.cpp
  101   DenseMap<const Value *, std::pair<unsigned, bool>> IDs;
  104   std::pair<unsigned, bool> &operator[](const Value *V) { return IDs[V]; }
  106   std::pair<unsigned, bool> lookup(const Value *V) const {
  110   void index(const Value *V) {
  119 static void orderValue(const Value *V, OrderMap &OM) {
  125       for (const Value *Op : C->operands())
  170         for (const Value *Op : I.operands())
  181 static void predictValueUseListOrderImpl(const Value *V, const Function *F,
  244 static void predictValueUseListOrder(const Value *V, const Function *F,
  260       for (const Value *Op : C->operands())
  287         for (const Value *Op : I.operands())
  318 static const Module *getModuleFromVal(const Value *V) {
  457 static void PrintLLVMName(raw_ostream &OS, const Value *V) {
  673   using ValueMap = DenseMap<const Value *, unsigned>;
  740   int getLocalSlot(const Value *V);
  794   void CreateFunctionSlot(const Value *V);
  859 int ModuleSlotTracker::getLocalSlot(const Value *V) {
  864 static SlotTracker *createSlotTracker(const Value *V) {
 1115 int SlotTracker::getLocalSlot(const Value *V) {
 1180 void SlotTracker::CreateFunctionSlot(const Value *V) {
 1240 static void WriteAsOperandInternal(raw_ostream &Out, const Value *V,
 1561       Value *V = MDV->getValue();
 2225 static void WriteAsOperandInternal(raw_ostream &Out, const Value *V,
 2384   void writeOperand(const Value *Op, bool PrintType);
 2385   void writeParamOperand(const Value *Operand, AttributeSet Attrs);
 2442   void printInfoComment(const Value &V);
 2469 void AssemblyWriter::writeOperand(const Value *Operand, bool PrintType) {
 2521 void AssemblyWriter::writeParamOperand(const Value *Operand,
 3632 void AssemblyWriter::printInfoComment(const Value &V) {
 3640 static void maybePrintCallAddrSpace(const Value *Operand, const Instruction *I,
 3716   const Value *Operand = I.getNumOperands() ? I.getOperand(0) : nullptr;
 4335 static bool printWithoutType(const Value &V, raw_ostream &O,
 4345 static void printAsOperandImpl(const Value &V, raw_ostream &O, bool PrintType,
lib/IR/AutoUpgrade.cpp
  870 static Value *UpgradeX86PSLLDQIntrinsics(IRBuilder<> &Builder,
  871                                          Value *Op, unsigned Shift) {
  880   Value *Res = Constant::getNullValue(VecTy);
  904 static Value *UpgradeX86PSRLDQIntrinsics(IRBuilder<> &Builder, Value *Op,
  904 static Value *UpgradeX86PSRLDQIntrinsics(IRBuilder<> &Builder, Value *Op,
  914   Value *Res = Constant::getNullValue(VecTy);
  936 static Value *getX86MaskVec(IRBuilder<> &Builder, Value *Mask,
  936 static Value *getX86MaskVec(IRBuilder<> &Builder, Value *Mask,
  956 static Value *EmitX86Select(IRBuilder<> &Builder, Value *Mask,
  956 static Value *EmitX86Select(IRBuilder<> &Builder, Value *Mask,
  957                             Value *Op0, Value *Op1) {
  957                             Value *Op0, Value *Op1) {
  967 static Value *EmitX86ScalarSelect(IRBuilder<> &Builder, Value *Mask,
  967 static Value *EmitX86ScalarSelect(IRBuilder<> &Builder, Value *Mask,
  968                                   Value *Op0, Value *Op1) {
  968                                   Value *Op0, Value *Op1) {
  985 static Value *UpgradeX86ALIGNIntrinsics(IRBuilder<> &Builder, Value *Op0,
  985 static Value *UpgradeX86ALIGNIntrinsics(IRBuilder<> &Builder, Value *Op0,
  986                                         Value *Op1, Value *Shift,
  986                                         Value *Op1, Value *Shift,
  987                                         Value *Passthru, Value *Mask,
  987                                         Value *Passthru, Value *Mask,
 1024   Value *Align = Builder.CreateShuffleVector(Op1, Op0,
 1031 static Value *UpgradeX86VPERMT2Intrinsics(IRBuilder<> &Builder, CallInst &CI,
 1077   Value *Args[] = { CI.getArgOperand(0) , CI.getArgOperand(1),
 1084   Value *V = Builder.CreateCall(Intrinsic::getDeclaration(CI.getModule(), IID),
 1086   Value *PassThru = ZeroMask ? ConstantAggregateZero::get(Ty)
 1092 static Value *UpgradeX86AddSubSatIntrinsics(IRBuilder<> &Builder, CallInst &CI,
 1095   Value *Op0 = CI.getOperand(0);
 1096   Value *Op1 = CI.getOperand(1);
 1102   Value *Res = Builder.CreateCall(Intrin, {Op0, Op1});
 1105     Value *VecSrc = CI.getOperand(2);
 1106     Value *Mask = CI.getOperand(3);
 1112 static Value *upgradeX86Rotate(IRBuilder<> &Builder, CallInst &CI,
 1115   Value *Src = CI.getArgOperand(0);
 1116   Value *Amt = CI.getArgOperand(1);
 1129   Value *Res = Builder.CreateCall(Intrin, {Src, Src, Amt});
 1132     Value *VecSrc = CI.getOperand(2);
 1133     Value *Mask = CI.getOperand(3);
 1139 static Value *upgradeX86vpcom(IRBuilder<> &Builder, CallInst &CI, unsigned Imm,
 1142   Value *LHS = CI.getArgOperand(0);
 1143   Value *RHS = CI.getArgOperand(1);
 1173   Value *Cmp = Builder.CreateICmp(Pred, LHS, RHS);
 1174   Value *Ext = Builder.CreateSExt(Cmp, Ty);
 1178 static Value *upgradeX86ConcatShift(IRBuilder<> &Builder, CallInst &CI,
 1181   Value *Op0 = CI.getArgOperand(0);
 1182   Value *Op1 = CI.getArgOperand(1);
 1183   Value *Amt = CI.getArgOperand(2);
 1199   Value *Res = Builder.CreateCall(Intrin, {Op0, Op1, Amt});
 1203     Value *VecSrc = NumArgs == 5 ? CI.getArgOperand(3) :
 1206     Value *Mask = CI.getOperand(NumArgs - 1);
 1212 static Value *UpgradeMaskedStore(IRBuilder<> &Builder,
 1213                                  Value *Ptr, Value *Data, Value *Mask,
 1213                                  Value *Ptr, Value *Data, Value *Mask,
 1213                                  Value *Ptr, Value *Data, Value *Mask,
 1232 static Value *UpgradeMaskedLoad(IRBuilder<> &Builder,
 1233                                 Value *Ptr, Value *Passthru, Value *Mask,
 1233                                 Value *Ptr, Value *Passthru, Value *Mask,
 1233                                 Value *Ptr, Value *Passthru, Value *Mask,
 1252 static Value *upgradeAbs(IRBuilder<> &Builder, CallInst &CI) {
 1253   Value *Op0 = CI.getArgOperand(0);
 1255   Value *Zero = llvm::Constant::getNullValue(Ty);
 1256   Value *Cmp = Builder.CreateICmp(ICmpInst::ICMP_SGT, Op0, Zero);
 1257   Value *Neg = Builder.CreateNeg(Op0);
 1258   Value *Res = Builder.CreateSelect(Cmp, Op0, Neg);
 1266 static Value *upgradeIntMinMax(IRBuilder<> &Builder, CallInst &CI,
 1268   Value *Op0 = CI.getArgOperand(0);
 1269   Value *Op1 = CI.getArgOperand(1);
 1270   Value *Cmp = Builder.CreateICmp(Pred, Op0, Op1);
 1271   Value *Res = Builder.CreateSelect(Cmp, Op0, Op1);
 1279 static Value *upgradePMULDQ(IRBuilder<> &Builder, CallInst &CI, bool IsSigned) {
 1283   Value *LHS = Builder.CreateBitCast(CI.getArgOperand(0), Ty);
 1284   Value *RHS = Builder.CreateBitCast(CI.getArgOperand(1), Ty);
 1300   Value *Res = Builder.CreateMul(LHS, RHS);
 1309 static Value *ApplyX86MaskOn1BitsVec(IRBuilder<> &Builder, Value *Vec,
 1309 static Value *ApplyX86MaskOn1BitsVec(IRBuilder<> &Builder, Value *Vec,
 1310                                      Value *Mask) {
 1331 static Value *upgradeMaskedCompare(IRBuilder<> &Builder, CallInst &CI,
 1333   Value *Op0 = CI.getArgOperand(0);
 1336   Value *Cmp;
 1355   Value *Mask = CI.getArgOperand(CI.getNumArgOperands() - 1);
 1361 static Value *UpgradeX86MaskedShift(IRBuilder<> &Builder, CallInst &CI,
 1364   Value *Rep = Builder.CreateCall(Intrin,
 1369 static Value* upgradeMaskedMove(IRBuilder<> &Builder, CallInst &CI) {
 1370   Value* A = CI.getArgOperand(0);
 1371   Value* B = CI.getArgOperand(1);
 1372   Value* Src = CI.getArgOperand(2);
 1373   Value* Mask = CI.getArgOperand(3);
 1375   Value* AndNode = Builder.CreateAnd(Mask, APInt(8, 1));
 1376   Value* Cmp = Builder.CreateIsNotNull(AndNode);
 1377   Value* Extract1 = Builder.CreateExtractElement(B, (uint64_t)0);
 1378   Value* Extract2 = Builder.CreateExtractElement(Src, (uint64_t)0);
 1379   Value* Select = Builder.CreateSelect(Cmp, Extract1, Extract2);
 1384 static Value* UpgradeMaskToInt(IRBuilder<> &Builder, CallInst &CI) {
 1385   Value* Op = CI.getArgOperand(0);
 1388   Value *Mask = getX86MaskVec(Builder, Op, NumElts);
 1394                                       CallInst &CI, Value *&Rep) {
 1620   SmallVector<Value *, 4> Args(CI.arg_operands().begin(),
 1675       Value *Arg0 = CI->getArgOperand(0);
 1676       Value *Arg1 = CI->getArgOperand(1);
 1682       Value *Addr = Builder.CreateBitCast(Arg0, EltPtrTy, "cast");
 1683       Value *Extract =
 1702       Value *Arg0 = CI->getArgOperand(0);
 1703       Value *Arg1 = CI->getArgOperand(1);
 1706       Value *BC = Builder.CreateBitCast(Arg0,
 1720       Value *Arg0 = CI->getArgOperand(0);
 1721       Value *Arg1 = CI->getArgOperand(1);
 1724       Value *BC0 = Builder.CreateBitCast(Arg1, NewVecTy, "cast");
 1725       Value *Elt = Builder.CreateExtractElement(BC0, (uint64_t)0);
 1726       Value *BC = Builder.CreateBitCast(Arg0,
 1739       Value *Arg0 = CI->getArgOperand(0);
 1740       Value *Arg1 = CI->getArgOperand(1);
 1753       Value *Mask = Builder.CreateAnd(CI->getArgOperand(2), Builder.getInt8(1));
 1773     Value *Rep;
 1792       Value *Vec = CI->getArgOperand(0);
 1793       Value *Elt0 = Builder.CreateExtractElement(Vec, (uint64_t)0);
 1812         Value *Args[] = { CI->getArgOperand(0), CI->getArgOperand(3) };
 1825       Value *Op0 = CI->getArgOperand(0);
 1826       Value *Op1 = CI->getArgOperand(1);
 1827       Value *Mask = CI->getArgOperand(2);
 1830       Value *Zero = llvm::Constant::getNullValue(Ty);
 1843       Value *LHS = getX86MaskVec(Builder, CI->getArgOperand(0), NumElts);
 1844       Value *RHS = getX86MaskVec(Builder, CI->getArgOperand(1), NumElts);
 1861       Value *LHS = getX86MaskVec(Builder, CI->getArgOperand(0), 16);
 1862       Value *RHS = getX86MaskVec(Builder, CI->getArgOperand(1), 16);
 1866       Value *LHS = getX86MaskVec(Builder, CI->getArgOperand(0), 16);
 1867       Value *RHS = getX86MaskVec(Builder, CI->getArgOperand(1), 16);
 1872       Value *LHS = getX86MaskVec(Builder, CI->getArgOperand(0), 16);
 1873       Value *RHS = getX86MaskVec(Builder, CI->getArgOperand(1), 16);
 1877       Value *LHS = getX86MaskVec(Builder, CI->getArgOperand(0), 16);
 1878       Value *RHS = getX86MaskVec(Builder, CI->getArgOperand(1), 16);
 1882       Value *LHS = getX86MaskVec(Builder, CI->getArgOperand(0), 16);
 1883       Value *RHS = getX86MaskVec(Builder, CI->getArgOperand(1), 16);
 1893       Value *LHS = getX86MaskVec(Builder, CI->getArgOperand(0), 16);
 1894       Value *RHS = getX86MaskVec(Builder, CI->getArgOperand(1), 16);
 1897       Value *C;
 1909       Value *Elt0 = Builder.CreateExtractElement(CI->getArgOperand(0),
 1911       Value *Elt1 = Builder.CreateExtractElement(CI->getArgOperand(1),
 1913       Value *EltOp;
 1985       SmallVector<Value *, 4> Args;
 2007       Value *Op = CI->getArgOperand(0);
 2008       Value *Zero = llvm::Constant::getNullValue(Op->getType());
 2128       Value *Ptr = Builder.CreateBitCast(CI->getOperand(0),
 2131       Value *MaskVec = getX86MaskVec(Builder, CI->getArgOperand(2),
 2143       Value *Ptr = Builder.CreateBitCast(CI->getOperand(0),
 2146       Value *MaskVec = getX86MaskVec(Builder, CI->getArgOperand(2),
 2157       Value *MaskVec = getX86MaskVec(Builder, CI->getArgOperand(2),
 2204       Value *Sel = CI->getArgOperand(2);
 2205       Value *NotSel = Builder.CreateNot(Sel);
 2206       Value *Sel0 = Builder.CreateAnd(CI->getArgOperand(0), Sel);
 2207       Value *Sel1 = Builder.CreateAnd(CI->getArgOperand(1), NotSel);
 2229       Value *Trunc0 = Builder.CreateTrunc(CI->getArgOperand(0), Type::getInt32Ty(C));
 2238       Value *Cast = Builder.CreateBitCast(CI->getArgOperand(0),
 2240       Value *Load = Builder.CreateLoad(EltTy, Cast);
 2261       Value *SV = Builder.CreateShuffleVector(
 2285       Value *Op = Builder.CreatePointerCast(CI->getArgOperand(0),
 2287       Value *Load = Builder.CreateAlignedLoad(VT, Op, 1);
 2336       Value *Op = CI->getArgOperand(0);
 2406       Value *Op0 = CI->getArgOperand(0);
 2407       Value *Op1 = CI->getArgOperand(1);
 2420       Value *Op0 = CI->getArgOperand(0);
 2421       Value *Op1 = CI->getArgOperand(1);
 2431       Value *UndefV = UndefValue::get(Op1->getType());
 2465       Value *Op0 = CI->getArgOperand(0);
 2489       Value *Op0 = CI->getArgOperand(0);
 2520       Value *V0 = (Imm & 0x02) ? CI->getArgOperand(1) : CI->getArgOperand(0);
 2521       Value *V1 = (Imm & 0x20) ? CI->getArgOperand(1) : CI->getArgOperand(0);
 2543       Value *Op0 = CI->getArgOperand(0);
 2565       Value *Op0 = CI->getArgOperand(0);
 2584       Value *Op0 = CI->getArgOperand(0);
 2602       Value *Op0 = CI->getArgOperand(0);
 2603       Value *Op1 = CI->getArgOperand(1);
 2629       Value *Op0 = CI->getArgOperand(0);
 2650       Value *Op0 = CI->getArgOperand(0);
 2651       Value *Op1 = CI->getArgOperand(1);
 2666       Value *Op0 = CI->getArgOperand(0);
 2667       Value *Op1 = CI->getArgOperand(1);
 3027       Value *Ptr = CI->getArgOperand(0);
 3031       Value *BC =
 3044       Value *Ops[] = { CI->getArgOperand(0), CI->getArgOperand(1),
 3069       Value *Ops[] = { CI->getArgOperand(0), CI->getArgOperand(1),
 3095       Value *A = CI->getArgOperand(0);
 3096       Value *B = CI->getArgOperand(1);
 3097       Value *C = CI->getArgOperand(2);
 3112         Value *Ops[] = { A, B, C, CI->getArgOperand(4) };
 3128       Value *PassThru = IsMaskZ ? Constant::getNullValue(Rep->getType()) :
 3155       Value *A = CI->getArgOperand(0);
 3156       Value *B = CI->getArgOperand(1);
 3157       Value *C = CI->getArgOperand(2);
 3185       Value *PassThru = IsMaskZ ? llvm::Constant::getNullValue(CI->getType()) :
 3195       Value *Ops[] = { CI->getArgOperand(0), CI->getArgOperand(1),
 3200       Value *Odd = Builder.CreateCall(FMA, Ops);
 3202       Value *Even = Builder.CreateCall(FMA, Ops);
 3231         Value *Ops[] = { CI->getArgOperand(0), CI->getArgOperand(1),
 3242         Value *Ops[] = { CI->getArgOperand(0), CI->getArgOperand(1),
 3247         Value *Odd = Builder.CreateCall(FMA, Ops);
 3249         Value *Even = Builder.CreateCall(FMA, Ops);
 3261       Value *PassThru = IsMaskZ ? llvm::Constant::getNullValue(CI->getType()) :
 3287       Value *Args[] = { CI->getArgOperand(0) , CI->getArgOperand(1),
 3291       Value *PassThru = ZeroMask ? ConstantAggregateZero::get(CI->getType())
 3315       Value *Args[] = { CI->getArgOperand(0) , CI->getArgOperand(1),
 3319       Value *PassThru = ZeroMask ? ConstantAggregateZero::get(CI->getType())
 3351       Value *Args[] = { CI->getArgOperand(0), CI->getArgOperand(1),
 3355       Value *PassThru = ZeroMask ? ConstantAggregateZero::get(CI->getType())
 3381       Value *Args[] = { CI->getArgOperand(0), CI->getArgOperand(1),
 3385       Value *PassThru = ZeroMask ? ConstantAggregateZero::get(CI->getType())
 3404       Value *Args[] = { CI->getArgOperand(0), CI->getArgOperand(1),
 3406       Value *NewCall = Builder.CreateCall(
 3411       Value *Data = Builder.CreateExtractValue(NewCall, 1);
 3413       Value *Ptr = Builder.CreateBitCast(CI->getArgOperand(3),
 3417       Value *CF = Builder.CreateExtractValue(NewCall, 0);
 3425       Value *Arg = CI->getArgOperand(0);
 3426       Value *Neg = Builder.CreateNeg(Arg, "neg");
 3427       Value *Cmp = Builder.CreateICmpSGE(
 3432       Value *Ptr = CI->getArgOperand(0);
 3433       Value *Val = CI->getArgOperand(1);
 3438       Value *Arg0 = CI->getArgOperand(0);
 3439       Value *Arg1 = CI->getArgOperand(1);
 3440       Value *Cmp = Name.endswith(".ui") || Name.endswith(".ull")
 3446       Value *Arg0 = CI->getArgOperand(0);
 3447       Value *Arg1 = CI->getArgOperand(1);
 3448       Value *Cmp = Name.endswith(".ui") || Name.endswith(".ull")
 3454       Value *Arg = CI->getArgOperand(0);
 3455       Value *Ctlz = Builder.CreateCall(
 3463       Value *Arg = CI->getArgOperand(0);
 3464       Value *Popc = Builder.CreateCall(
 3498     SmallVector<Value *, 2> Args;
 3509     SmallVector<Value *, 2> Args;
 3533     SmallVector<Value *, 4> Args(CI->arg_operands().begin(),
 3552     Value *NullIsUnknownSize = CI->getNumArgOperands() == 2
 3555     Value *Dynamic =
 3593     SmallVector<Value *, 4> Args(CI->arg_operands().begin(),
 3609     Value *Arg0 = CI->getArgOperand(0);
 3614     Value *Arg1 = CI->getArgOperand(1);
 3618     Value *BC0 = Builder.CreateBitCast(Arg0, NewVecTy, "cast");
 3619     Value *BC1 = Builder.CreateBitCast(Arg1, NewVecTy, "cast");
 3633     Value *Data = Builder.CreateExtractValue(NewCall, 1);
 3635     Value *Ptr = Builder.CreateBitCast(CI->getArgOperand(0),
 3639     Value *TSC = Builder.CreateExtractValue(NewCall, 0);
 3659     SmallVector<Value *, 4> Args(CI->arg_operands().begin(),
 3679     SmallVector<Value *, 4> Args(CI->arg_operands().begin(),
 3701     Value *Args[4] = {CI->getArgOperand(0), CI->getArgOperand(1),
 3765 Instruction *llvm::UpgradeBitCastInst(unsigned Opc, Value *V, Type *DestTy,
 3787 Value *llvm::UpgradeBitCastExpr(unsigned Opc, Constant *C, Type *DestTy) {
 3878       SmallVector<Value *, 2> Args;
 3890         Value *Arg = CI->getArgOperand(I);
 3916       Value *NewRetVal = Builder.CreateBitCast(NewCall, CI->getType());
lib/IR/BasicBlock.cpp
   42   : Value(Type::getLabelTy(C), Value::BasicBlockVal), Parent(nullptr) {
  161   if (Value *RV = RI->getReturnValue()) {
  368       Value* PNV = nullptr;
lib/IR/ConstantFold.cpp
  112         SmallVector<Value*, 8> IdxList;
  113         Value *Zero =
 2167                                           ArrayRef<Value *> Idxs) {
 2257         SmallVector<Value*, 16> NewIndices;
lib/IR/ConstantFold.h
   53                                       ArrayRef<Value *> Idxs);
lib/IR/Constants.cpp
  254 bool Constant::isElementWiseEqual(Value *Y) const {
  407     Value *V = user_back();
  476     for (const Value *Op : WorkItem->operands()) {
  572   Value::const_user_iterator I = user_begin(), E = user_end();
  573   Value::const_user_iterator LastNonDeadUser = E;
 1476 : Constant(Type::getInt8PtrTy(F->getContext()), Value::BlockAddressVal,
 1502 Value *BlockAddress::handleOperandChangeImpl(Value *From, Value *To) {
 1502 Value *BlockAddress::handleOperandChangeImpl(Value *From, Value *To) {
 1502 Value *BlockAddress::handleOperandChangeImpl(Value *From, Value *To) {
 2008                                          ArrayRef<Value *> Idxs, bool InBounds,
 2829 void Constant::handleOperandChange(Value *From, Value *To) {
 2829 void Constant::handleOperandChange(Value *From, Value *To) {
 2830   Value *Replacement = nullptr;
 2856 Value *ConstantArray::handleOperandChangeImpl(Value *From, Value *To) {
 2856 Value *ConstantArray::handleOperandChangeImpl(Value *From, Value *To) {
 2856 Value *ConstantArray::handleOperandChangeImpl(Value *From, Value *To) {
 2897 Value *ConstantStruct::handleOperandChangeImpl(Value *From, Value *To) {
 2897 Value *ConstantStruct::handleOperandChangeImpl(Value *From, Value *To) {
 2897 Value *ConstantStruct::handleOperandChangeImpl(Value *From, Value *To) {
 2933 Value *ConstantVector::handleOperandChangeImpl(Value *From, Value *To) {
 2933 Value *ConstantVector::handleOperandChangeImpl(Value *From, Value *To) {
 2933 Value *ConstantVector::handleOperandChangeImpl(Value *From, Value *To) {
 2959 Value *ConstantExpr::handleOperandChangeImpl(Value *From, Value *ToV) {
 2959 Value *ConstantExpr::handleOperandChangeImpl(Value *From, Value *ToV) {
 2959 Value *ConstantExpr::handleOperandChangeImpl(Value *From, Value *ToV) {
 2986   SmallVector<Value *, 4> ValueOperands(op_begin(), op_end());
 2987   ArrayRef<Value*> Ops(ValueOperands);
lib/IR/ConstantsContext.h
  195   static bool classof(const Value *V) {
  227   static bool classof(const Value *V) {
  260   static bool classof(const Value *V) {
  290   static bool classof(const Value *V) {
  674                                         ConstantClass *CP, Value *From,
lib/IR/Core.cpp
  820   auto *V = unwrap(Val);
  949   Value *V = unwrap(Val);
  950   Value::use_iterator I = V->use_begin();
  984   Value *V = unwrap(Val);
  998   Value *V = unwrap(Val);
 1007   Value *V = unwrap(Val);
 1074     Value *V = unwrap(OV);
 1105   auto *V = unwrap(Val);
 1994   Value *P = unwrap<Value>(V);
 1994   Value *P = unwrap<Value>(V);
 2009   Value *P = unwrap<Value>(V);
 2009   Value *P = unwrap<Value>(V);
 2959   auto *I = unwrap(Inst);
 2973   auto *I = unwrap(Inst);
 3112   Value *V = unwrap(Fn);
 3483   Value *V = unwrap(PointerVal);
 3586   ArrayRef<Value *> IdxList(unwrap(Indices), NumIndices);
 3587   Value *Val = unwrap(Pointer);
 3596   ArrayRef<Value *> IdxList(unwrap(Indices), NumIndices);
 3603   ArrayRef<Value *> IdxList(unwrap(Indices), NumIndices);
 3604   Value *Val = unwrap(Pointer);
 3613   ArrayRef<Value *> IdxList(unwrap(Indices), NumIndices);
 3620   Value *Val = unwrap(Pointer);
 3644   Value *P = unwrap<Value>(MemAccessInst);
 3644   Value *P = unwrap<Value>(MemAccessInst);
 3655   Value *P = unwrap<Value>(MemAccessInst);
 3655   Value *P = unwrap<Value>(MemAccessInst);
 3674   Value *P = unwrap<Value>(MemAccessInst);
 3674   Value *P = unwrap<Value>(MemAccessInst);
 3686   Value *P = unwrap<Value>(MemAccessInst);
 3686   Value *P = unwrap<Value>(MemAccessInst);
 3841   Value *V = unwrap(Fn);
 3940   Value *P = unwrap<Value>(AtomicInst);
 3940   Value *P = unwrap<Value>(AtomicInst);
 3949   Value *P = unwrap<Value>(AtomicInst);
 3949   Value *P = unwrap<Value>(AtomicInst);
 3958   Value *P = unwrap<Value>(CmpXchgInst);
 3958   Value *P = unwrap<Value>(CmpXchgInst);
 3964   Value *P = unwrap<Value>(CmpXchgInst);
 3964   Value *P = unwrap<Value>(CmpXchgInst);
 3971   Value *P = unwrap<Value>(CmpXchgInst);
 3971   Value *P = unwrap<Value>(CmpXchgInst);
 3977   Value *P = unwrap<Value>(CmpXchgInst);
 3977   Value *P = unwrap<Value>(CmpXchgInst);
lib/IR/DIBuilder.cpp
  849 Instruction *DIBuilder::insertDeclare(Value *Storage, DILocalVariable *VarInfo,
  856 Instruction *DIBuilder::insertDeclare(Value *Storage, DILocalVariable *VarInfo,
  877 Instruction *DIBuilder::insertDbgValueIntrinsic(Value *V,
  887 Instruction *DIBuilder::insertDbgValueIntrinsic(Value *V,
  909 static Value *getDbgIntrinsicValueImpl(LLVMContext &VMContext, Value *V) {
  909 static Value *getDbgIntrinsicValueImpl(LLVMContext &VMContext, Value *V) {
  919 Instruction *DIBuilder::insertDeclare(Value *Storage, DILocalVariable *VarInfo,
  932   Value *Args[] = {getDbgIntrinsicValueImpl(VMContext, Storage),
  941     Value *V, DILocalVariable *VarInfo, DIExpression *Expr,
  954   Value *Args[] = {getDbgIntrinsicValueImpl(VMContext, V),
  974   Value *Args[] = {MetadataAsValue::get(VMContext, LabelInfo)};
lib/IR/DataLayout.cpp
  807                                            ArrayRef<Value *> Indices) const {
  810   generic_gep_type_iterator<Value* const*>
  814     Value *Idx = GTI.getOperand();
lib/IR/DiagnosticInfo.cpp
  163 DiagnosticInfoOptimizationBase::Argument::Argument(StringRef Key, const Value *V)
  234                                        const Value *CodeRegion)
  268     const Value *CodeRegion)
  289     const Value *CodeRegion)
  304     const DiagnosticLocation &Loc, const Value *CodeRegion)
  322     const Value *CodeRegion)
lib/IR/DiagnosticPrinter.cpp
   99 DiagnosticPrinter &DiagnosticPrinterRawOStream::operator<<(const Value &V) {
lib/IR/Function.cpp
   67     : Value(Ty, Value::ArgumentVal), Parent(Par), ArgNo(ArgNo) {
  244     : GlobalObject(Ty, Value::FunctionVal,
lib/IR/Globals.cpp
   59 Value *GlobalValue::handleOperandChangeImpl(Value *From, Value *To) {
   59 Value *GlobalValue::handleOperandChangeImpl(Value *From, Value *To) {
   59 Value *GlobalValue::handleOperandChangeImpl(Value *From, Value *To) {
  340     : GlobalObject(Ty, Value::GlobalVariableVal,
  360     : GlobalObject(Ty, Value::GlobalVariableVal,
  479     : GlobalIndirectSymbol(Ty, Value::GlobalAliasVal, AddressSpace, Link, Name,
  535     : GlobalIndirectSymbol(Ty, Value::GlobalIFuncVal, AddressSpace, Link, Name,
lib/IR/IRBuilder.cpp
   61 Value *IRBuilderBase::getCastedInt8PtrValue(Value *Ptr) {
   61 Value *IRBuilderBase::getCastedInt8PtrValue(Value *Ptr) {
   74 static CallInst *createCallHelper(Function *Callee, ArrayRef<Value *> Ops,
   88                                       ArrayRef<Value *> Ops,
  100 CreateMemSet(Value *Ptr, Value *Val, Value *Size, unsigned Align,
  100 CreateMemSet(Value *Ptr, Value *Val, Value *Size, unsigned Align,
  100 CreateMemSet(Value *Ptr, Value *Val, Value *Size, unsigned Align,
  104   Value *Ops[] = {Ptr, Val, Size, getInt1(isVolatile)};
  128     Value *Ptr, Value *Val, Value *Size, unsigned Align, uint32_t ElementSize,
  128     Value *Ptr, Value *Val, Value *Size, unsigned Align, uint32_t ElementSize,
  128     Value *Ptr, Value *Val, Value *Size, unsigned Align, uint32_t ElementSize,
  134   Value *Ops[] = {Ptr, Val, Size, getInt32(ElementSize)};
  158 CreateMemCpy(Value *Dst, unsigned DstAlign, Value *Src, unsigned SrcAlign,
  158 CreateMemCpy(Value *Dst, unsigned DstAlign, Value *Src, unsigned SrcAlign,
  159              Value *Size, bool isVolatile, MDNode *TBAATag,
  166   Value *Ops[] = {Dst, Src, Size, getInt1(isVolatile)};
  197     Value *Dst, unsigned DstAlign, Value *Src, unsigned SrcAlign, Value *Size,
  197     Value *Dst, unsigned DstAlign, Value *Src, unsigned SrcAlign, Value *Size,
  197     Value *Dst, unsigned DstAlign, Value *Src, unsigned SrcAlign, Value *Size,
  207   Value *Ops[] = {Dst, Src, Size, getInt32(ElementSize)};
  238 CreateMemMove(Value *Dst, unsigned DstAlign, Value *Src, unsigned SrcAlign,
  238 CreateMemMove(Value *Dst, unsigned DstAlign, Value *Src, unsigned SrcAlign,
  239               Value *Size, bool isVolatile, MDNode *TBAATag, MDNode *ScopeTag,
  246   Value *Ops[] = {Dst, Src, Size, getInt1(isVolatile)};
  273     Value *Dst, unsigned DstAlign, Value *Src, unsigned SrcAlign, Value *Size,
  273     Value *Dst, unsigned DstAlign, Value *Src, unsigned SrcAlign, Value *Size,
  273     Value *Dst, unsigned DstAlign, Value *Src, unsigned SrcAlign, Value *Size,
  283   Value *Ops[] = {Dst, Src, Size, getInt32(ElementSize)};
  315                                     Value *Src) {
  317   Value *Ops[] = {Src};
  323 CallInst *IRBuilderBase::CreateFAddReduce(Value *Acc, Value *Src) {
  323 CallInst *IRBuilderBase::CreateFAddReduce(Value *Acc, Value *Src) {
  325   Value *Ops[] = {Acc, Src};
  332 CallInst *IRBuilderBase::CreateFMulReduce(Value *Acc, Value *Src) {
  332 CallInst *IRBuilderBase::CreateFMulReduce(Value *Acc, Value *Src) {
  334   Value *Ops[] = {Acc, Src};
  341 CallInst *IRBuilderBase::CreateAddReduce(Value *Src) {
  346 CallInst *IRBuilderBase::CreateMulReduce(Value *Src) {
  351 CallInst *IRBuilderBase::CreateAndReduce(Value *Src) {
  356 CallInst *IRBuilderBase::CreateOrReduce(Value *Src) {
  361 CallInst *IRBuilderBase::CreateXorReduce(Value *Src) {
  366 CallInst *IRBuilderBase::CreateIntMaxReduce(Value *Src, bool IsSigned) {
  372 CallInst *IRBuilderBase::CreateIntMinReduce(Value *Src, bool IsSigned) {
  378 CallInst *IRBuilderBase::CreateFPMaxReduce(Value *Src, bool NoNaN) {
  389 CallInst *IRBuilderBase::CreateFPMinReduce(Value *Src, bool NoNaN) {
  400 CallInst *IRBuilderBase::CreateLifetimeStart(Value *Ptr, ConstantInt *Size) {
  409   Value *Ops[] = { Size, Ptr };
  416 CallInst *IRBuilderBase::CreateLifetimeEnd(Value *Ptr, ConstantInt *Size) {
  425   Value *Ops[] = { Size, Ptr };
  432 CallInst *IRBuilderBase::CreateInvariantStart(Value *Ptr, ConstantInt *Size) {
  443   Value *Ops[] = {Size, Ptr};
  452 CallInst *IRBuilderBase::CreateAssumption(Value *Cond) {
  456   Value *Ops[] = { Cond };
  470 CallInst *IRBuilderBase::CreateMaskedLoad(Value *Ptr, unsigned Align,
  471                                           Value *Mask, Value *PassThru,
  471                                           Value *Mask, Value *PassThru,
  480   Value *Ops[] = { Ptr, getInt32(Align), Mask,  PassThru};
  491 CallInst *IRBuilderBase::CreateMaskedStore(Value *Val, Value *Ptr,
  491 CallInst *IRBuilderBase::CreateMaskedStore(Value *Val, Value *Ptr,
  492                                            unsigned Align, Value *Mask) {
  498   Value *Ops[] = { Val, Ptr, getInt32(Align), Mask };
  506                                                ArrayRef<Value *> Ops,
  522 CallInst *IRBuilderBase::CreateMaskedGather(Value *Ptrs, unsigned Align,
  523                                             Value *Mask,  Value *PassThru,
  523                                             Value *Mask,  Value *PassThru,
  538   Value * Ops[] = {Ptrs, getInt32(Align), Mask, PassThru};
  553 CallInst *IRBuilderBase::CreateMaskedScatter(Value *Data, Value *Ptrs,
  553 CallInst *IRBuilderBase::CreateMaskedScatter(Value *Data, Value *Ptrs,
  554                                              unsigned Align, Value *Mask) {
  571   Value * Ops[] = {Data, Ptrs, getInt32(Align), Mask};
  579 static std::vector<Value *>
  581                   Value *ActualCallee, uint32_t Flags, ArrayRef<T0> CallArgs,
  584   std::vector<Value *> Args;
  603     Value *ActualCallee, uint32_t Flags, ArrayRef<T0> CallArgs,
  618   std::vector<Value *> Args =
  625     uint64_t ID, uint32_t NumPatchBytes, Value *ActualCallee,
  626     ArrayRef<Value *> CallArgs, ArrayRef<Value *> DeoptArgs,
  626     ArrayRef<Value *> CallArgs, ArrayRef<Value *> DeoptArgs,
  627     ArrayRef<Value *> GCArgs, const Twine &Name) {
  628   return CreateGCStatepointCallCommon<Value *, Value *, Value *, Value *>(
  628   return CreateGCStatepointCallCommon<Value *, Value *, Value *, Value *>(
  628   return CreateGCStatepointCallCommon<Value *, Value *, Value *, Value *>(
  628   return CreateGCStatepointCallCommon<Value *, Value *, Value *, Value *>(
  634     uint64_t ID, uint32_t NumPatchBytes, Value *ActualCallee, uint32_t Flags,
  636     ArrayRef<Use> DeoptArgs, ArrayRef<Value *> GCArgs, const Twine &Name) {
  637   return CreateGCStatepointCallCommon<Use, Use, Use, Value *>(
  643     uint64_t ID, uint32_t NumPatchBytes, Value *ActualCallee,
  644     ArrayRef<Use> CallArgs, ArrayRef<Value *> DeoptArgs,
  645     ArrayRef<Value *> GCArgs, const Twine &Name) {
  646   return CreateGCStatepointCallCommon<Use, Value *, Value *, Value *>(
  646   return CreateGCStatepointCallCommon<Use, Value *, Value *, Value *>(
  646   return CreateGCStatepointCallCommon<Use, Value *, Value *, Value *>(
  654     Value *ActualInvokee, BasicBlock *NormalDest, BasicBlock *UnwindDest,
  667   std::vector<Value *> Args =
  675     uint64_t ID, uint32_t NumPatchBytes, Value *ActualInvokee,
  677     ArrayRef<Value *> InvokeArgs, ArrayRef<Value *> DeoptArgs,
  677     ArrayRef<Value *> InvokeArgs, ArrayRef<Value *> DeoptArgs,
  678     ArrayRef<Value *> GCArgs, const Twine &Name) {
  679   return CreateGCStatepointInvokeCommon<Value *, Value *, Value *, Value *>(
  679   return CreateGCStatepointInvokeCommon<Value *, Value *, Value *, Value *>(
  679   return CreateGCStatepointInvokeCommon<Value *, Value *, Value *, Value *>(
  679   return CreateGCStatepointInvokeCommon<Value *, Value *, Value *, Value *>(
  686     uint64_t ID, uint32_t NumPatchBytes, Value *ActualInvokee,
  689     ArrayRef<Use> DeoptArgs, ArrayRef<Value *> GCArgs, const Twine &Name) {
  690   return CreateGCStatepointInvokeCommon<Use, Use, Use, Value *>(
  696     uint64_t ID, uint32_t NumPatchBytes, Value *ActualInvokee,
  698     ArrayRef<Value *> DeoptArgs, ArrayRef<Value *> GCArgs, const Twine &Name) {
  698     ArrayRef<Value *> DeoptArgs, ArrayRef<Value *> GCArgs, const Twine &Name) {
  699   return CreateGCStatepointInvokeCommon<Use, Value *, Value *, Value *>(
  699   return CreateGCStatepointInvokeCommon<Use, Value *, Value *, Value *>(
  699   return CreateGCStatepointInvokeCommon<Use, Value *, Value *, Value *>(
  713  Value *Args[] = {Statepoint};
  727  Value *Args[] = {Statepoint,
  733 CallInst *IRBuilderBase::CreateUnaryIntrinsic(Intrinsic::ID ID, Value *V,
  741 CallInst *IRBuilderBase::CreateBinaryIntrinsic(Intrinsic::ID ID, Value *LHS,
  742                                                Value *RHS,
  752                                          ArrayRef<Value *> Args,
lib/IR/InlineAsm.cpp
   33     : Value(PointerType::getUnqual(FTy), Value::InlineAsmVal),
lib/IR/Instruction.cpp
   25   : User(ty, Value::InstructionVal + it, Ops, NumOps), Parent(nullptr) {
   37   : User(ty, Value::InstructionVal + it, Ops, NumOps), Parent(nullptr) {
  243 void Instruction::copyIRFlags(const Value *V, bool IncludeWrapFlags) {
  267 void Instruction::andIRFlags(const Value *V) {
lib/IR/Instructions.cpp
   79 const char *SelectInst::areInvalidOperands(Value *Op0, Value *Op1, Value *Op2) {
   79 const char *SelectInst::areInvalidOperands(Value *Op0, Value *Op1, Value *Op2) {
   79 const char *SelectInst::areInvalidOperands(Value *Op0, Value *Op1, Value *Op2) {
  117 Value *PHINode::removeIncomingValue(unsigned Idx, bool DeletePHIIfEmpty) {
  118   Value *Removed = getIncomingValue(Idx);
  156 Value *PHINode::hasConstantValue() const {
  158   Value *ConstantValue = getIncomingValue(0);
  177   Value *ConstantValue = nullptr;
  179     Value *Incoming = getIncomingValue(i);
  267   const Value *V = getCalledValue();
  309 Value *CallBase::getReturnedArgOperand() const {
  385 void CallInst::init(FunctionType *FTy, Value *Func, ArrayRef<Value *> Args,
  385 void CallInst::init(FunctionType *FTy, Value *Func, ArrayRef<Value *> Args,
  412 void CallInst::init(FunctionType *FTy, Value *Func, const Twine &NameStr) {
  422 CallInst::CallInst(FunctionType *Ty, Value *Func, const Twine &Name,
  429 CallInst::CallInst(FunctionType *Ty, Value *Func, const Twine &Name,
  451   std::vector<Value *> Args(CI->arg_begin(), CI->arg_end());
  516 static bool IsConstantOne(Value *val) {
  524                                  Type *AllocTy, Value *AllocSize,
  525                                  Value *ArraySize,
  612                                     Value *AllocSize, Value *ArraySize,
  612                                     Value *AllocSize, Value *ArraySize,
  620                                     Value *AllocSize, Value *ArraySize,
  620                                     Value *AllocSize, Value *ArraySize,
  638                                     Value *AllocSize, Value *ArraySize,
  638                                     Value *AllocSize, Value *ArraySize,
  645                                     Value *AllocSize, Value *ArraySize,
  645                                     Value *AllocSize, Value *ArraySize,
  652 static Instruction *createFree(Value *Source,
  669   Value *PtrCast = Source;
  687 Instruction *CallInst::CreateFree(Value *Source, Instruction *InsertBefore) {
  690 Instruction *CallInst::CreateFree(Value *Source,
  699 Instruction *CallInst::CreateFree(Value *Source, BasicBlock *InsertAtEnd) {
  704 Instruction *CallInst::CreateFree(Value *Source,
  716 void InvokeInst::init(FunctionType *FTy, Value *Fn, BasicBlock *IfNormal,
  717                       BasicBlock *IfException, ArrayRef<Value *> Args,
  762   std::vector<Value *> Args(II->arg_begin(), II->arg_end());
  783 void CallBrInst::init(FunctionType *FTy, Value *Fn, BasicBlock *Fallthrough,
  785                       ArrayRef<Value *> Args,
  845   std::vector<Value *> Args(CBI->arg_begin(), CBI->arg_end());
  873 ReturnInst::ReturnInst(LLVMContext &C, Value *retVal, Instruction *InsertBefore)
  881 ReturnInst::ReturnInst(LLVMContext &C, Value *retVal, BasicBlock *InsertAtEnd)
  903 ResumeInst::ResumeInst(Value *Exn, Instruction *InsertBefore)
  909 ResumeInst::ResumeInst(Value *Exn, BasicBlock *InsertAtEnd)
  930 void CleanupReturnInst::init(Value *CleanupPad, BasicBlock *UnwindBB) {
  939 CleanupReturnInst::CleanupReturnInst(Value *CleanupPad, BasicBlock *UnwindBB,
  948 CleanupReturnInst::CleanupReturnInst(Value *CleanupPad, BasicBlock *UnwindBB,
  960 void CatchReturnInst::init(Value *CatchPad, BasicBlock *BB) {
  972 CatchReturnInst::CatchReturnInst(Value *CatchPad, BasicBlock *BB,
  980 CatchReturnInst::CatchReturnInst(Value *CatchPad, BasicBlock *BB,
  992 CatchSwitchInst::CatchSwitchInst(Value *ParentPad, BasicBlock *UnwindDest,
 1004 CatchSwitchInst::CatchSwitchInst(Value *ParentPad, BasicBlock *UnwindDest,
 1026 void CatchSwitchInst::init(Value *ParentPad, BasicBlock *UnwindDest,
 1074 void FuncletPadInst::init(Value *ParentPad, ArrayRef<Value *> Args,
 1074 void FuncletPadInst::init(Value *ParentPad, ArrayRef<Value *> Args,
 1091 FuncletPadInst::FuncletPadInst(Instruction::FuncletPadOps Op, Value *ParentPad,
 1092                                ArrayRef<Value *> Args, unsigned Values,
 1100 FuncletPadInst::FuncletPadInst(Instruction::FuncletPadOps Op, Value *ParentPad,
 1101                                ArrayRef<Value *> Args, unsigned Values,
 1139 BranchInst::BranchInst(BasicBlock *IfTrue, BasicBlock *IfFalse, Value *Cond,
 1159 BranchInst::BranchInst(BasicBlock *IfTrue, BasicBlock *IfFalse, Value *Cond,
 1198 static Value *getAISize(LLVMContext &Context, Value *Amt) {
 1198 static Value *getAISize(LLVMContext &Context, Value *Amt) {
 1218 AllocaInst::AllocaInst(Type *Ty, unsigned AddrSpace, Value *ArraySize,
 1223 AllocaInst::AllocaInst(Type *Ty, unsigned AddrSpace, Value *ArraySize,
 1227 AllocaInst::AllocaInst(Type *Ty, unsigned AddrSpace, Value *ArraySize,
 1238 AllocaInst::AllocaInst(Type *Ty, unsigned AddrSpace, Value *ArraySize,
 1290 LoadInst::LoadInst(Type *Ty, Value *Ptr, const Twine &Name,
 1294 LoadInst::LoadInst(Type *Ty, Value *Ptr, const Twine &Name,
 1298 LoadInst::LoadInst(Type *Ty, Value *Ptr, const Twine &Name, bool isVolatile,
 1302 LoadInst::LoadInst(Type *Ty, Value *Ptr, const Twine &Name, bool isVolatile,
 1306 LoadInst::LoadInst(Type *Ty, Value *Ptr, const Twine &Name, bool isVolatile,
 1311 LoadInst::LoadInst(Type *Ty, Value *Ptr, const Twine &Name, bool isVolatile,
 1316 LoadInst::LoadInst(Type *Ty, Value *Ptr, const Twine &Name, bool isVolatile,
 1328 LoadInst::LoadInst(Type *Ty, Value *Ptr, const Twine &Name, bool isVolatile,
 1367 StoreInst::StoreInst(Value *val, Value *addr, Instruction *InsertBefore)
 1367 StoreInst::StoreInst(Value *val, Value *addr, Instruction *InsertBefore)
 1370 StoreInst::StoreInst(Value *val, Value *addr, BasicBlock *InsertAtEnd)
 1370 StoreInst::StoreInst(Value *val, Value *addr, BasicBlock *InsertAtEnd)
 1373 StoreInst::StoreInst(Value *val, Value *addr, bool isVolatile,
 1373 StoreInst::StoreInst(Value *val, Value *addr, bool isVolatile,
 1377 StoreInst::StoreInst(Value *val, Value *addr, bool isVolatile,
 1377 StoreInst::StoreInst(Value *val, Value *addr, bool isVolatile,
 1381 StoreInst::StoreInst(Value *val, Value *addr, bool isVolatile, MaybeAlign Align,
 1381 StoreInst::StoreInst(Value *val, Value *addr, bool isVolatile, MaybeAlign Align,
 1386 StoreInst::StoreInst(Value *val, Value *addr, bool isVolatile, MaybeAlign Align,
 1386 StoreInst::StoreInst(Value *val, Value *addr, bool isVolatile, MaybeAlign Align,
 1391 StoreInst::StoreInst(Value *val, Value *addr, bool isVolatile, MaybeAlign Align,
 1391 StoreInst::StoreInst(Value *val, Value *addr, bool isVolatile, MaybeAlign Align,
 1405 StoreInst::StoreInst(Value *val, Value *addr, bool isVolatile, MaybeAlign Align,
 1405 StoreInst::StoreInst(Value *val, Value *addr, bool isVolatile, MaybeAlign Align,
 1435 void AtomicCmpXchgInst::Init(Value *Ptr, Value *Cmp, Value *NewVal,
 1435 void AtomicCmpXchgInst::Init(Value *Ptr, Value *Cmp, Value *NewVal,
 1435 void AtomicCmpXchgInst::Init(Value *Ptr, Value *Cmp, Value *NewVal,
 1468 AtomicCmpXchgInst::AtomicCmpXchgInst(Value *Ptr, Value *Cmp, Value *NewVal,
 1468 AtomicCmpXchgInst::AtomicCmpXchgInst(Value *Ptr, Value *Cmp, Value *NewVal,
 1468 AtomicCmpXchgInst::AtomicCmpXchgInst(Value *Ptr, Value *Cmp, Value *NewVal,
 1480 AtomicCmpXchgInst::AtomicCmpXchgInst(Value *Ptr, Value *Cmp, Value *NewVal,
 1480 AtomicCmpXchgInst::AtomicCmpXchgInst(Value *Ptr, Value *Cmp, Value *NewVal,
 1480 AtomicCmpXchgInst::AtomicCmpXchgInst(Value *Ptr, Value *Cmp, Value *NewVal,
 1496 void AtomicRMWInst::Init(BinOp Operation, Value *Ptr, Value *Val,
 1496 void AtomicRMWInst::Init(BinOp Operation, Value *Ptr, Value *Val,
 1516 AtomicRMWInst::AtomicRMWInst(BinOp Operation, Value *Ptr, Value *Val,
 1516 AtomicRMWInst::AtomicRMWInst(BinOp Operation, Value *Ptr, Value *Val,
 1527 AtomicRMWInst::AtomicRMWInst(BinOp Operation, Value *Ptr, Value *Val,
 1527 AtomicRMWInst::AtomicRMWInst(BinOp Operation, Value *Ptr, Value *Val,
 1597 void GetElementPtrInst::init(Value *Ptr, ArrayRef<Value *> IdxList,
 1597 void GetElementPtrInst::init(Value *Ptr, ArrayRef<Value *> IdxList,
 1648 Type *GetElementPtrInst::getIndexedType(Type *Ty, ArrayRef<Value *> IdxList) {
 1704 ExtractElementInst::ExtractElementInst(Value *Val, Value *Index,
 1704 ExtractElementInst::ExtractElementInst(Value *Val, Value *Index,
 1718 ExtractElementInst::ExtractElementInst(Value *Val, Value *Index,
 1718 ExtractElementInst::ExtractElementInst(Value *Val, Value *Index,
 1733 bool ExtractElementInst::isValidOperands(const Value *Val, const Value *Index) {
 1733 bool ExtractElementInst::isValidOperands(const Value *Val, const Value *Index) {
 1743 InsertElementInst::InsertElementInst(Value *Vec, Value *Elt, Value *Index,
 1743 InsertElementInst::InsertElementInst(Value *Vec, Value *Elt, Value *Index,
 1743 InsertElementInst::InsertElementInst(Value *Vec, Value *Elt, Value *Index,
 1757 InsertElementInst::InsertElementInst(Value *Vec, Value *Elt, Value *Index,
 1757 InsertElementInst::InsertElementInst(Value *Vec, Value *Elt, Value *Index,
 1757 InsertElementInst::InsertElementInst(Value *Vec, Value *Elt, Value *Index,
 1772 bool InsertElementInst::isValidOperands(const Value *Vec, const Value *Elt,
 1772 bool InsertElementInst::isValidOperands(const Value *Vec, const Value *Elt,
 1773                                         const Value *Index) {
 1789 ShuffleVectorInst::ShuffleVectorInst(Value *V1, Value *V2, Value *Mask,
 1789 ShuffleVectorInst::ShuffleVectorInst(Value *V1, Value *V2, Value *Mask,
 1789 ShuffleVectorInst::ShuffleVectorInst(Value *V1, Value *V2, Value *Mask,
 1806 ShuffleVectorInst::ShuffleVectorInst(Value *V1, Value *V2, Value *Mask,
 1806 ShuffleVectorInst::ShuffleVectorInst(Value *V1, Value *V2, Value *Mask,
 1806 ShuffleVectorInst::ShuffleVectorInst(Value *V1, Value *V2, Value *Mask,
 1843 bool ShuffleVectorInst::isValidOperands(const Value *V1, const Value *V2,
 1843 bool ShuffleVectorInst::isValidOperands(const Value *V1, const Value *V2,
 1844                                         const Value *Mask) {
 1860     for (Value *Op : MV->operands()) {
 2107 void InsertValueInst::init(Value *Agg, Value *Val, ArrayRef<unsigned> Idxs,
 2107 void InsertValueInst::init(Value *Agg, Value *Val, ArrayRef<unsigned> Idxs,
 2191 UnaryOperator::UnaryOperator(UnaryOps iType, Value *S,
 2200 UnaryOperator::UnaryOperator(UnaryOps iType, Value *S,
 2209 UnaryOperator *UnaryOperator::Create(UnaryOps Op, Value *S,
 2215 UnaryOperator *UnaryOperator::Create(UnaryOps Op, Value *S,
 2224   Value *LHS = getOperand(0);
 2244 BinaryOperator::BinaryOperator(BinaryOps iType, Value *S1, Value *S2,
 2244 BinaryOperator::BinaryOperator(BinaryOps iType, Value *S1, Value *S2,
 2257 BinaryOperator::BinaryOperator(BinaryOps iType, Value *S1, Value *S2,
 2257 BinaryOperator::BinaryOperator(BinaryOps iType, Value *S1, Value *S2,
 2271   Value *LHS = getOperand(0), *RHS = getOperand(1);
 2338 BinaryOperator *BinaryOperator::Create(BinaryOps Op, Value *S1, Value *S2,
 2338 BinaryOperator *BinaryOperator::Create(BinaryOps Op, Value *S1, Value *S2,
 2346 BinaryOperator *BinaryOperator::Create(BinaryOps Op, Value *S1, Value *S2,
 2346 BinaryOperator *BinaryOperator::Create(BinaryOps Op, Value *S1, Value *S2,
 2354 BinaryOperator *BinaryOperator::CreateNeg(Value *Op, const Twine &Name,
 2356   Value *zero = ConstantFP::getZeroValueForNegation(Op->getType());
 2362 BinaryOperator *BinaryOperator::CreateNeg(Value *Op, const Twine &Name,
 2364   Value *zero = ConstantFP::getZeroValueForNegation(Op->getType());
 2370 BinaryOperator *BinaryOperator::CreateNSWNeg(Value *Op, const Twine &Name,
 2372   Value *zero = ConstantFP::getZeroValueForNegation(Op->getType());
 2376 BinaryOperator *BinaryOperator::CreateNSWNeg(Value *Op, const Twine &Name,
 2378   Value *zero = ConstantFP::getZeroValueForNegation(Op->getType());
 2382 BinaryOperator *BinaryOperator::CreateNUWNeg(Value *Op, const Twine &Name,
 2384   Value *zero = ConstantFP::getZeroValueForNegation(Op->getType());
 2388 BinaryOperator *BinaryOperator::CreateNUWNeg(Value *Op, const Twine &Name,
 2390   Value *zero = ConstantFP::getZeroValueForNegation(Op->getType());
 2394 BinaryOperator *BinaryOperator::CreateFNeg(Value *Op, const Twine &Name,
 2396   Value *zero = ConstantFP::getZeroValueForNegation(Op->getType());
 2401 BinaryOperator *BinaryOperator::CreateFNeg(Value *Op, const Twine &Name,
 2403   Value *zero = ConstantFP::getZeroValueForNegation(Op->getType());
 2408 BinaryOperator *BinaryOperator::CreateNot(Value *Op, const Twine &Name,
 2415 BinaryOperator *BinaryOperator::CreateNot(Value *Op, const Twine &Name,
 2747 CastInst *CastInst::Create(Instruction::CastOps op, Value *S, Type *Ty,
 2769 CastInst *CastInst::Create(Instruction::CastOps op, Value *S, Type *Ty,
 2791 CastInst *CastInst::CreateZExtOrBitCast(Value *S, Type *Ty,
 2799 CastInst *CastInst::CreateZExtOrBitCast(Value *S, Type *Ty,
 2807 CastInst *CastInst::CreateSExtOrBitCast(Value *S, Type *Ty,
 2815 CastInst *CastInst::CreateSExtOrBitCast(Value *S, Type *Ty,
 2823 CastInst *CastInst::CreateTruncOrBitCast(Value *S, Type *Ty,
 2831 CastInst *CastInst::CreateTruncOrBitCast(Value *S, Type *Ty,
 2839 CastInst *CastInst::CreatePointerCast(Value *S, Type *Ty,
 2857 CastInst *CastInst::CreatePointerCast(Value *S, Type *Ty,
 2875   Value *S, Type *Ty,
 2888   Value *S, Type *Ty,
 2900 CastInst *CastInst::CreateBitOrPointerCast(Value *S, Type *Ty,
 2911 CastInst *CastInst::CreateIntegerCast(Value *C, Type *Ty,
 2925 CastInst *CastInst::CreateIntegerCast(Value *C, Type *Ty,
 2939 CastInst *CastInst::CreateFPCast(Value *C, Type *Ty,
 2952 CastInst *CastInst::CreateFPCast(Value *C, Type *Ty,
 3086   const Value *Src, bool SrcIsSigned, Type *DestTy, bool DestIsSigned) {
 3188 CastInst::castIsValid(Instruction::CastOps op, Value *S, Type *DstTy) {
 3303   Value *S, Type *Ty, const Twine &Name, Instruction *InsertBefore
 3309   Value *S, Type *Ty, const Twine &Name, BasicBlock *InsertAtEnd
 3315   Value *S, Type *Ty, const Twine &Name, Instruction *InsertBefore
 3321   Value *S, Type *Ty, const Twine &Name, BasicBlock *InsertAtEnd
 3326   Value *S, Type *Ty, const Twine &Name, Instruction *InsertBefore
 3332   Value *S, Type *Ty, const Twine &Name, BasicBlock *InsertAtEnd
 3338   Value *S, Type *Ty, const Twine &Name, Instruction *InsertBefore
 3344   Value *S, Type *Ty, const Twine &Name, BasicBlock *InsertAtEnd
 3350   Value *S, Type *Ty, const Twine &Name, Instruction *InsertBefore
 3356   Value *S, Type *Ty, const Twine &Name, BasicBlock *InsertAtEnd
 3362   Value *S, Type *Ty, const Twine &Name, Instruction *InsertBefore
 3368   Value *S, Type *Ty, const Twine &Name, BasicBlock *InsertAtEnd
 3374   Value *S, Type *Ty, const Twine &Name, Instruction *InsertBefore
 3380   Value *S, Type *Ty, const Twine &Name, BasicBlock *InsertAtEnd
 3386   Value *S, Type *Ty, const Twine &Name, Instruction *InsertBefore
 3392   Value *S, Type *Ty, const Twine &Name, BasicBlock *InsertAtEnd
 3398   Value *S, Type *Ty, const Twine &Name, Instruction *InsertBefore
 3404   Value *S, Type *Ty, const Twine &Name, BasicBlock *InsertAtEnd
 3410   Value *S, Type *Ty, const Twine &Name, Instruction *InsertBefore
 3416   Value *S, Type *Ty, const Twine &Name, BasicBlock *InsertAtEnd
 3422   Value *S, Type *Ty, const Twine &Name, Instruction *InsertBefore
 3428   Value *S, Type *Ty, const Twine &Name, BasicBlock *InsertAtEnd
 3434   Value *S, Type *Ty, const Twine &Name, Instruction *InsertBefore
 3440   Value *S, Type *Ty, const Twine &Name, BasicBlock *InsertAtEnd
 3446   Value *S, Type *Ty, const Twine &Name, Instruction *InsertBefore
 3452   Value *S, Type *Ty, const Twine &Name, BasicBlock *InsertAtEnd
 3461 CmpInst::CmpInst(Type *ty, OtherOps op, Predicate predicate, Value *LHS,
 3462                  Value *RHS, const Twine &Name, Instruction *InsertBefore,
 3476 CmpInst::CmpInst(Type *ty, OtherOps op, Predicate predicate, Value *LHS,
 3477                  Value *RHS, const Twine &Name, BasicBlock *InsertAtEnd)
 3489 CmpInst::Create(OtherOps Op, Predicate predicate, Value *S1, Value *S2,
 3489 CmpInst::Create(OtherOps Op, Predicate predicate, Value *S1, Value *S2,
 3509 CmpInst::Create(OtherOps Op, Predicate predicate, Value *S1, Value *S2,
 3509 CmpInst::Create(OtherOps Op, Predicate predicate, Value *S1, Value *S2,
 3796 void SwitchInst::init(Value *Value, BasicBlock *Default, unsigned NumReserved) {
 3810 SwitchInst::SwitchInst(Value *Value, BasicBlock *Default, unsigned NumCases,
 3821 SwitchInst::SwitchInst(Value *Value, BasicBlock *Default, unsigned NumCases,
 4019 void IndirectBrInst::init(Value *Address, unsigned NumDests) {
 4041 IndirectBrInst::IndirectBrInst(Value *Address, unsigned NumCases,
 4048 IndirectBrInst::IndirectBrInst(Value *Address, unsigned NumCases,
lib/IR/IntrinsicInst.cpp
   39 Value *DbgVariableIntrinsic::getVariableLocation(bool AllowNullOp) const {
   40   Value *Op = getArgOperand(0);
   96 Value *InstrProfIncrementInst::getStep() const {
lib/IR/LLVMContextImpl.h
 1273   DenseMap<Value *, ValueAsMetadata *> ValuesAsMetadata;
 1276   DenseMap<const Value*, ValueName*> ValueNames;
 1344   using ValueHandlesTy = DenseMap<Value *, ValueHandleBase *>;
lib/IR/Metadata.cpp
  331 static DISubprogram *getLocalFunctionMetadata(Value *V) {
  348 ValueAsMetadata *ValueAsMetadata::get(Value *V) {
  367 ValueAsMetadata *ValueAsMetadata::getIfExists(Value *V) {
  372 void ValueAsMetadata::handleDeletion(Value *V) {
  391 void ValueAsMetadata::handleRAUW(Value *From, Value *To) {
  391 void ValueAsMetadata::handleRAUW(Value *From, Value *To) {
lib/IR/Module.cpp
  606   for (Value *Op : Init->operands()) {
lib/IR/SafepointIRVerifier.cpp
  290 using AvailableValueSet = DenseSet<const Value *>;
  326 static enum BaseType getBaseType(const Value *Val) {
  328   SmallVector<const Value *, 32> Worklist;
  329   DenseSet<const Value *> Visited;
  336     const Value *V = Worklist.pop_back_val();
  351       for (Value *InV: PN->incoming_values())
  380 static bool isNotExclusivelyConstantDerived(const Value *V) {
  453   DenseSet<const Value *> PoisonedDefs;
  466   bool isValuePoisoned(const Value *V) const { return PoisonedDefs.count(V); }
  532   void reportInvalidUse(const Value &V, const Instruction &I);
  669           const Value *InValue = PN->getIncomingValue(i);
  695       for (const Value *V : I.operands())
  803         const Value *InValue = PN->getIncomingValue(i);
  811     Value *LHS = I.getOperand(0), *RHS = I.getOperand(1);
  866     for (const Value *V : I.operands())
  873 void InstructionVerifier::reportInvalidUse(const Value &V,
lib/IR/Statepoint.cpp
   26 bool llvm::isStatepoint(const Value *V) {
   32 bool llvm::isStatepoint(const Value &V) {
   40 bool llvm::isGCRelocate(const Value *V) {
   48 bool llvm::isGCResult(const Value *V) {
lib/IR/Type.cpp
  536 Type *CompositeType::getTypeAtIndex(const Value *V) const {
  556 bool CompositeType::indexValid(const Value *V) const {
lib/IR/TypeFinder.cpp
   44     if (const Value *Aliasee = A.getAliasee())
  120 void TypeFinder::incorporateValue(const Value *V) {
lib/IR/Use.cpp
   23   Value *OldVal = Val;
lib/IR/User.cpp
   20 void User::replaceUsesOfWith(Value *From, Value *To) {
   20 void User::replaceUsesOfWith(Value *From, Value *To) {
lib/IR/Value.cpp
   68   static_assert(sizeof(Value) == 2 * sizeof(void *) + 2 * sizeof(unsigned),
  164 static bool getSymTab(Value *V, ValueSymbolTable *&ST) {
  291 void Value::takeName(Value *V) {
  381 static bool contains(Value *Expr, Value *V) {
  381 static bool contains(Value *Expr, Value *V) {
  398 void Value::doRAUW(Value *New, ReplaceMetadataUses ReplaceMetaUses) {
  429 void Value::replaceAllUsesWith(Value *New) {
  433 void Value::replaceNonMetadataUsesWith(Value *New) {
  439 void Value::replaceUsesOutsideBlock(Value *New, BasicBlock *BB) {
  466 static const Value *stripPointerCastsAndOffsets(const Value *V) {
  466 static const Value *stripPointerCastsAndOffsets(const Value *V) {
  472   SmallPtrSet<const Value *, 4> Visited;
  506         if (const Value *RV = Call->getReturnedArgOperand()) {
  529 const Value *Value::stripPointerCasts() const {
  533 const Value *Value::stripPointerCastsAndAliases() const {
  537 const Value *Value::stripPointerCastsSameRepresentation() const {
  541 const Value *Value::stripInBoundsConstantOffsets() const {
  545 const Value *Value::stripPointerCastsAndInvariantGroups() const {
  549 const Value *
  561   SmallPtrSet<const Value *, 4> Visited;
  563   const Value *V = this;
  595         if (const Value *RV = Call->getReturnedArgOperand())
  604 const Value *Value::stripInBoundsOffsets() const {
  735 const Value *Value::DoPHITranslation(const BasicBlock *CurBB,
  820   DenseMap<Value*, ValueHandleBase*> &Handles = pImpl->ValueHandles;
  836   for (DenseMap<Value*, ValueHandleBase*>::iterator I = Handles.begin(),
  863   DenseMap<Value*, ValueHandleBase*> &Handles = pImpl->ValueHandles;
  870 void ValueHandleBase::ValueIsDeleted(Value *V) {
  923 void ValueHandleBase::ValueIsRAUWd(Value *Old, Value *New) {
  923 void ValueHandleBase::ValueIsRAUWd(Value *Old, Value *New) {
lib/IR/ValueSymbolTable.cpp
   43 ValueName *ValueSymbolTable::makeUniqueName(Value *V,
   72 void ValueSymbolTable::reinsertValue(Value* V) {
  101 ValueName *ValueSymbolTable::createValueName(StringRef Name, Value *V) {
lib/IR/Verifier.cpp
  142   void Write(const Value *V) {
  147   void Write(const Value &V) {
  304   SmallPtrSet<const Value *, 32> GlobalValueVisited;
  496   void verifySwiftErrorCall(CallBase &Call, const Value *SwiftErrorVal);
  497   void verifySwiftErrorValue(const Value *SwiftErrorVal);
  503                             const Value *V);
  504   void verifyParameterAttrs(AttributeSet Attrs, Type *Ty, const Value *V);
  506                            const Value *V, bool IsIntrinsic);
  554 static void forEachUser(const Value *User,
  555                         SmallPtrSet<const Value *, 32> &Visited,
  556                         llvm::function_ref<bool(const Value *)> Callback) {
  559   for (const Value *TheNextUser : User->materialized_users())
  676         for (Value *Op : InitArray->operands()) {
  677           Value *V = Op->stripPointerCasts();
  744     Value *V = &*U;
 1562                                     const Value *V) {
 1586                                     const Value *V) {
 1689                                    const Value *V, bool IsIntrinsic) {
 1957   const Value *Target = Call.getArgOperand(2);
 2008   const Value *NumTransitionArgsV = Call.getArgOperand(EndCallArgsInx + 1);
 2019   const Value *NumDeoptArgsV = Call.getArgOperand(EndTransitionArgsInx + 1);
 2385     SmallVector<std::pair<BasicBlock*, Value*>, 8> Values;
 2510     for (Value *V : CBI.args())
 2807   for (Value *IncValue : PN.incoming_values()) {
 2870     Value *InAllocaArg = Call.getArgOperand(FTy->getNumParams() - 1);
 2881       Value *SwiftErrorArg = Call.getArgOperand(i);
 2905       Value *ArgVal = Call.getArgOperand(i);
 3094   Value *RetVal = &CI;
 3280   SmallVector<Value*, 16> Idxs(GEP.idx_begin(), GEP.idx_end());
 3298     for (Value *Idx : Idxs) {
 3431                                     const Value *SwiftErrorVal) {
 3443 void Verifier::verifySwiftErrorValue(const Value *SwiftErrorVal) {
 3579 static Value *getParentPad(Value *EHPad) {
 3579 static Value *getParentPad(Value *EHPad) {
 3622   Value *ToPadParent = getParentPad(ToPad);
 3625     Value *FromPad;
 3643     SmallSet<Value *, 8> Seen;
 3756   auto *ParentPad = CPI.getParentPad();
 3766   Value *FirstUnwindPad = nullptr;
 3774     Value *UnresolvedAncestorPad = nullptr;
 3805       Value *UnwindPad;
 3811         Value *UnwindParent = getParentPad(UnwindPad);
 3819         Value *ExitedPad = CurrentPad;
 3830           Value *ExitedParent = getParentPad(ExitedPad);
 3882       Value *ResolvedPad = CurrentPad;
 3884         Value *UnclePad = Worklist.back();
 3885         Value *AncestorPad = getParentPad(UnclePad);
 3889           Value *ResolvedParent = getParentPad(ResolvedPad);
 3908       Value *SwitchUnwindPad;
 3937   auto *ParentPad = CatchSwitch.getParentPad();
 4279   for (Value *V : Call.args())
 4287     auto *InfoArg = Call.getArgOperand(3)->stripPointerCasts();
 4441     for (Value *Arg : Call.args()) {
 4453     Value *FnArg = Call.getArgOperand(0)->stripPointerCasts();
 4489     const Value *Target = StatepointCall->getArgOperand(2);
 4533     Value *Base = Call.getArgOperand(1);
 4537     Value *Derived = Call.getArgOperand(2);
 4613     Value *Ptr = Call.getArgOperand(0);
 4615     Value *Mask = Call.getArgOperand(2);
 4616     Value *PassThru = Call.getArgOperand(3);
 4634     Value *Val = Call.getArgOperand(0);
 4635     Value *Ptr = Call.getArgOperand(1);
 4637     Value *Mask = Call.getArgOperand(3);
 4687     Value *Op1 = Call.getArgOperand(0);
 4688     Value *Op2 = Call.getArgOperand(1);
 4701     Value *Op1 = Call.getArgOperand(0);
 4702     Value *Op2 = Call.getArgOperand(1);
 4835     Value *Operand = FPI.getArgOperand(0);
 4868     Value *Operand = FPI.getArgOperand(0);
 4870     Value *Result = &FPI;
lib/Linker/IRMover.cpp
  366   Value *materialize(Value *V) override;
  366   Value *materialize(Value *V) override;
  374   Value *materialize(Value *V) override;
  374   Value *materialize(Value *V) override;
  405   std::vector<std::pair<GlobalValue *, Value*>> RAUWWorklist;
  540   Value *materialize(Value *V, bool ForIndirectSymbol);
  540   Value *materialize(Value *V, bool ForIndirectSymbol);
  565 Value *GlobalValueMaterializer::materialize(Value *SGV) {
  565 Value *GlobalValueMaterializer::materialize(Value *SGV) {
  569 Value *LocalValueMaterializer::materialize(Value *SGV) {
  569 Value *LocalValueMaterializer::materialize(Value *SGV) {
  573 Value *IRLinker::materialize(Value *V, bool ForIndirectSymbol) {
  573 Value *IRLinker::materialize(Value *V, bool ForIndirectSymbol) {
 1103     Value *New;
lib/Target/AArch64/AArch64CallLowering.cpp
  257                                       const Value *Val,
lib/Target/AArch64/AArch64CallLowering.h
   36   bool lowerReturn(MachineIRBuilder &MIRBuilder, const Value *Val,
lib/Target/AArch64/AArch64FalkorHWPFFix.cpp
  159       Value *PtrValue = LoadI->getPointerOperand();
lib/Target/AArch64/AArch64FastISel.cpp
  184   bool isValueAvailable(const Value *V) const;
  185   bool computeAddress(const Value *Obj, Address &Addr, Type *Ty = nullptr);
  186   bool computeCallAddress(const Value *V, Address &Addr);
  195                          const Value *Cond);
  198   std::pair<unsigned, bool> getRegForGEPIndex(const Value *Idx);
  201   unsigned emitAddSub(bool UseAdd, MVT RetVT, const Value *LHS,
  202                       const Value *RHS, bool SetFlags = false,
  223   bool emitCmp(const Value *LHS, const Value *RHS, bool IsZExt);
  223   bool emitCmp(const Value *LHS, const Value *RHS, bool IsZExt);
  224   bool emitICmp(MVT RetVT, const Value *LHS, const Value *RHS, bool IsZExt);
  224   bool emitICmp(MVT RetVT, const Value *LHS, const Value *RHS, bool IsZExt);
  226   bool emitFCmp(MVT RetVT, const Value *LHS, const Value *RHS);
  226   bool emitFCmp(MVT RetVT, const Value *LHS, const Value *RHS);
  235   unsigned emitAdd(MVT RetVT, const Value *LHS, const Value *RHS,
  235   unsigned emitAdd(MVT RetVT, const Value *LHS, const Value *RHS,
  239   unsigned emitSub(MVT RetVT, const Value *LHS, const Value *RHS,
  239   unsigned emitSub(MVT RetVT, const Value *LHS, const Value *RHS,
  248   unsigned emitLogicalOp(unsigned ISDOpc, MVT RetVT, const Value *LHS,
  249                          const Value *RHS);
  566 static bool isMulPowOf2(const Value *I) {
  579 bool AArch64FastISel::computeAddress(const Value *Obj, Address &Addr, Type *Ty)
  630       const Value *Op = GTI.getOperand();
  682     const Value *LHS = U->getOperand(0);
  683     const Value *RHS = U->getOperand(1);
  702     const Value *LHS = U->getOperand(0);
  703     const Value *RHS = U->getOperand(1);
  737     const Value *Src = U->getOperand(0);
  759         const Value *LHS = AI->getOperand(0);
  760         const Value *RHS = AI->getOperand(1);
  793     const Value *LHS = U->getOperand(0);
  794     const Value *RHS = U->getOperand(1);
  821     const Value *Src = LHS;
  854     const Value *LHS = U->getOperand(0);
  855     const Value *RHS = U->getOperand(1);
  883     const Value *Src = nullptr;
  928 bool AArch64FastISel::computeCallAddress(const Value *V, Address &Addr) {
 1016 bool AArch64FastISel::isValueAvailable(const Value *V) const {
 1160 unsigned AArch64FastISel::emitAddSub(bool UseAdd, MVT RetVT, const Value *LHS,
 1161                                      const Value *RHS, bool SetFlags,
 1254       const Value *MulLHS = cast<MulOperator>(RHS)->getOperand(0);
 1255       const Value *MulRHS = cast<MulOperator>(RHS)->getOperand(1);
 1485 bool AArch64FastISel::emitCmp(const Value *LHS, const Value *RHS, bool IsZExt) {
 1485 bool AArch64FastISel::emitCmp(const Value *LHS, const Value *RHS, bool IsZExt) {
 1507 bool AArch64FastISel::emitICmp(MVT RetVT, const Value *LHS, const Value *RHS,
 1507 bool AArch64FastISel::emitICmp(MVT RetVT, const Value *LHS, const Value *RHS,
 1519 bool AArch64FastISel::emitFCmp(MVT RetVT, const Value *LHS, const Value *RHS) {
 1519 bool AArch64FastISel::emitFCmp(MVT RetVT, const Value *LHS, const Value *RHS) {
 1554 unsigned AArch64FastISel::emitAdd(MVT RetVT, const Value *LHS, const Value *RHS,
 1554 unsigned AArch64FastISel::emitAdd(MVT RetVT, const Value *LHS, const Value *RHS,
 1584 unsigned AArch64FastISel::emitSub(MVT RetVT, const Value *LHS, const Value *RHS,
 1584 unsigned AArch64FastISel::emitSub(MVT RetVT, const Value *LHS, const Value *RHS,
 1608                                         const Value *LHS, const Value *RHS) {
 1608                                         const Value *LHS, const Value *RHS) {
 1640       const Value *MulLHS = cast<MulOperator>(RHS)->getOperand(0);
 1641       const Value *MulRHS = cast<MulOperator>(RHS)->getOperand(1);
 1986   const Value *SV = I->getOperand(0);
 2009   const Value *IntExtVal = nullptr;
 2181   const Value *Op0 = I->getOperand(0);
 2188   const Value *PtrV = I->getOperand(1);
 2305   const Value *LHS = CI->getOperand(0);
 2306   const Value *RHS = CI->getOperand(1);
 2340         const Value *AndLHS = AI->getOperand(0);
 2341         const Value *AndRHS = AI->getOperand(1);
 2658   const Value *Src1Val, *Src2Val;
 2742   const Value *Cond = SI->getCondition();
 2760     const Value *FoldSelect = nullptr;
 2840   Value *V = I->getOperand(0);
 2856   Value *V = I->getOperand(0);
 3080     const Value *ArgVal = CLI.OutVals[VA.getValNo()];
 3195   const Value *Callee = CLI.Callee;
 3239   for (auto *Val : CLI.OutVals) {
 3383                                         const Value *Cond) {
 3402   const Value *LHS = II->getArgOperand(0);
 3403   const Value *RHS = II->getArgOperand(1);
 3695     const Value *LHS = II->getArgOperand(0);
 3696     const Value *RHS = II->getArgOperand(1);
 3876     const Value *RV = Ret->getOperand(0);
 3942   Value *Op = I->getOperand(0);
 4686   const Value *Src0 = I->getOperand(0);
 4687   const Value *Src1 = I->getOperand(1);
 4764     const Value *Op0 = I->getOperand(0);
 4990 std::pair<unsigned, bool> AArch64FastISel::getRegForGEPIndex(const Value *Idx) {
 5025     const Value *Idx = GTI.getOperand();
lib/Target/AArch64/AArch64ISelLowering.cpp
 5322   const Value *SV = cast<SrcValueSDNode>(Op.getOperand(2))->getValue();
 5337   const Value *SV = cast<SrcValueSDNode>(Op.getOperand(2))->getValue();
 5353   const Value *SV = cast<SrcValueSDNode>(Op.getOperand(2))->getValue();
 5431   const Value *DestSV = cast<SrcValueSDNode>(Op.getOperand(3))->getValue();
 5432   const Value *SrcSV = cast<SrcValueSDNode>(Op.getOperand(4))->getValue();
 5444   const Value *V = cast<SrcValueSDNode>(Op.getOperand(2))->getValue();
 5946   Value *CallOperandVal = info.CallOperandVal;
 8624 static bool areExtractShuffleVectors(Value *Op1, Value *Op2) {
 8624 static bool areExtractShuffleVectors(Value *Op1, Value *Op2) {
 8638   Value *S1Op1, *S2Op1;
 8664 static bool areExtractExts(Value *Ext1, Value *Ext2) {
 8664 static bool areExtractExts(Value *Ext1, Value *Ext2) {
 8814   Value *BaseAddr = LI->getPointerOperand();
 8841   DenseMap<ShuffleVectorInst *, SmallVector<Value *, 4>> SubVecs;
 8860       Value *SubVec = Builder.CreateExtractValue(LdN, Index);
 8877     auto *WideVec =
 8935   Value *Op0 = SVI->getOperand(0);
 8936   Value *Op1 = SVI->getOperand(1);
 8954   Value *BaseAddr = SI->getPointerOperand();
 8982     SmallVector<Value *, 5> Ops;
12169 Value *AArch64TargetLowering::emitLoadLinked(IRBuilder<> &Builder, Value *Addr,
12169 Value *AArch64TargetLowering::emitLoadLinked(IRBuilder<> &Builder, Value *Addr,
12184     Value *LoHi = Builder.CreateCall(Ldxr, Addr, "lohi");
12186     Value *Lo = Builder.CreateExtractValue(LoHi, 0, "lo");
12187     Value *Hi = Builder.CreateExtractValue(LoHi, 1, "hi");
12203   Value *Trunc = Builder.CreateTrunc(Builder.CreateCall(Ldxr, Addr), IntEltTy);
12214 Value *AArch64TargetLowering::emitStoreConditional(IRBuilder<> &Builder,
12215                                                    Value *Val, Value *Addr,
12215                                                    Value *Val, Value *Addr,
12229     Value *Lo = Builder.CreateTrunc(Val, Int64Ty, "lo");
12230     Value *Hi = Builder.CreateTrunc(Builder.CreateLShr(Val, 64), Int64Ty, "hi");
12260 static Value *UseTlsOffset(IRBuilder<> &IRB, unsigned Offset) {
12270 Value *AArch64TargetLowering::getIRStackGuard(IRBuilder<> &IRB) const {
12305 Value *AArch64TargetLowering::getSDagStackGuard(const Module &M) const {
12319 Value *AArch64TargetLowering::getSafeStackPointerLocation(IRBuilder<> &IRB) const {
lib/Target/AArch64/AArch64ISelLowering.h
  417   Value *emitLoadLinked(IRBuilder<> &Builder, Value *Addr,
  417   Value *emitLoadLinked(IRBuilder<> &Builder, Value *Addr,
  419   Value *emitStoreConditional(IRBuilder<> &Builder, Value *Val,
  419   Value *emitStoreConditional(IRBuilder<> &Builder, Value *Val,
  420                               Value *Addr, AtomicOrdering Ord) const override;
  439   Value *getIRStackGuard(IRBuilder<> &IRB) const override;
  442   Value *getSDagStackGuard(const Module &M) const override;
  447   Value *getSafeStackPointerLocation(IRBuilder<> &IRB) const override;
lib/Target/AArch64/AArch64InstructionSelector.cpp
  243   void materializeLargeCMVal(MachineInstr &I, const Value *V,
 1116     MachineInstr &I, const Value *V, unsigned OpFlags) const {
lib/Target/AArch64/AArch64StackTagging.cpp
   73   Value *BasePtr;
   86   std::map<uint64_t, Value *> Out;
   89   InitializerBuilder(uint64_t Size, const DataLayout *DL, Value *BasePtr,
  144       Value *&CurrentV = Out[Offset];
  155   Value *sliceValue(IRBuilder<> &IRB, Value *V, int64_t Offset) {
  155   Value *sliceValue(IRBuilder<> &IRB, Value *V, int64_t Offset) {
  169                   Value *StoredValue) {
  172       Value *V = sliceValue(IRB, StoredValue, Offset - Start);
  173       Value *&CurrentV = Out[Offset];
  203       Value *Store1 = I1 == Out.end() ? Constant::getNullValue(IRB.getInt64Ty())
  205       Value *Store2 = I2 == Out.end() ? Constant::getNullValue(IRB.getInt64Ty())
  224     Value *Ptr = BasePtr;
  234     Value *Ptr = BasePtr;
  240   void emitPair(IRBuilder<> &IRB, uint64_t Offset, Value *A, Value *B) {
  240   void emitPair(IRBuilder<> &IRB, uint64_t Offset, Value *A, Value *B) {
  243     Value *Ptr = BasePtr;
  249   Value *flatten(IRBuilder<> &IRB, Value *V) {
  249   Value *flatten(IRBuilder<> &IRB, Value *V) {
  292   void tagAlloca(AllocaInst *AI, Instruction *InsertBefore, Value *Ptr,
  296   Instruction *collectInitializers(Instruction *StartInst, Value *StartPtr,
  333                                                       Value *StartPtr,
  407                                     Value *Ptr, uint64_t Size) {
  525   DenseMap<Value *, AllocaInst *> AllocaForValue;
  667       Value *Ptr = IRB.CreatePointerCast(TagPCall, IRB.getInt8PtrTy());
lib/Target/AArch64/AArch64TargetTransformInfo.cpp
  199                                            ArrayRef<const Value *> Args) {
  271     SmallVector<const Value *, 4> Operands(SingleUser->operand_values());
  481     TTI::OperandValueProperties Opd2PropInfo, ArrayRef<const Value *> Args) {
  734         Value *PtrValue = LMemI->getPointerOperand();
  787 Value *AArch64TTIImpl::getOrCreateResultFromMemIntrinsic(IntrinsicInst *Inst,
  806     Value *Res = UndefValue::get(ExpectedType);
  809       Value *L = Inst->getArgOperand(i);
lib/Target/AArch64/AArch64TargetTransformInfo.h
   60                              ArrayRef<const Value *> Args);
  127       ArrayRef<const Value *> Args = ArrayRef<const Value *>());
  145   Value *getOrCreateResultFromMemIntrinsic(IntrinsicInst *Inst,
lib/Target/AMDGPU/AMDGPUAliasAnalysis.cpp
   94   const Value *Base = GetUnderlyingObject(Loc.Ptr, DL);
lib/Target/AMDGPU/AMDGPUAlwaysInlinePass.cpp
   61   SmallPtrSet<const Value *, 8> Visited;
lib/Target/AMDGPU/AMDGPUAnnotateUniformValues.cpp
   36   DenseMap<Value*, GetElementPtrInst*> noClobberClones;
   93   const Value *Ptr = Load->getPointerOperand();
  123   Value *Ptr = I.getPointerOperand();
  143         Value *Idx = Constant::getIntegerValue(
lib/Target/AMDGPU/AMDGPUAtomicOptimizer.cpp
   49   Value *buildScan(IRBuilder<> &B, AtomicRMWInst::BinOp Op, Value *V,
   49   Value *buildScan(IRBuilder<> &B, AtomicRMWInst::BinOp Op, Value *V,
   50                    Value *const Identity) const;
   51   Value *buildShiftRight(IRBuilder<> &B, Value *V, Value *const Identity) const;
   51   Value *buildShiftRight(IRBuilder<> &B, Value *V, Value *const Identity) const;
   51   Value *buildShiftRight(IRBuilder<> &B, Value *V, Value *const Identity) const;
  245 static Value *buildNonAtomicBinOp(IRBuilder<> &B, AtomicRMWInst::BinOp Op,
  246                                   Value *LHS, Value *RHS) {
  246                                   Value *LHS, Value *RHS) {
  276   Value *Cond = B.CreateICmp(Pred, LHS, RHS);
  282 Value *AMDGPUAtomicOptimizer::buildScan(IRBuilder<> &B, AtomicRMWInst::BinOp Op,
  283                                         Value *V, Value *const Identity) const {
  283                                         Value *V, Value *const Identity) const {
  318     Value *const PermX =
  328       Value *const Lane31 = B.CreateCall(ReadLane, {V, B.getInt32(31)});
  341 Value *AMDGPUAtomicOptimizer::buildShiftRight(IRBuilder<> &B, Value *V,
  341 Value *AMDGPUAtomicOptimizer::buildShiftRight(IRBuilder<> &B, Value *V,
  342                                               Value *const Identity) const {
  360     Value *Old = V;
  427     Value *const Cond = B.CreateIntrinsic(Intrinsic::amdgcn_ps_live, {}, {});
  444   Value *const V = I.getOperand(ValIdx);
  457   Value *Mbcnt;
  462     Value *const BitCast = B.CreateBitCast(Ballot, VecTy);
  463     Value *const ExtractLo = B.CreateExtractElement(BitCast, B.getInt32(0));
  464     Value *const ExtractHi = B.CreateExtractElement(BitCast, B.getInt32(1));
  472   Value *const Identity = B.getInt(getIdentityValueForAtomicOp(Op, TyBitWidth));
  474   Value *ExclScan = nullptr;
  475   Value *NewV = nullptr;
  492     Value *const LastLaneIdx = B.getInt32(ST->getWavefrontSize() - 1);
  494       Value *const ExtractLo = B.CreateTrunc(NewV, B.getInt32Ty());
  495       Value *const ExtractHi =
  501       Value *const PartialInsert = B.CreateInsertElement(
  503       Value *const Insert =
  524       Value *const Ctpop = B.CreateIntCast(
  544       Value *const Ctpop = B.CreateIntCast(
  554   Value *const Cond = B.CreateICmpEQ(Mbcnt, B.getIntN(TyBitWidth, 0));
  590     Value *BroadcastI = nullptr;
  593       Value *const ExtractLo = B.CreateTrunc(PHI, B.getInt32Ty());
  594       Value *const ExtractHi =
  600       Value *const PartialInsert = B.CreateInsertElement(
  602       Value *const Insert =
  616     Value *LaneOffset = nullptr;
  640     Value *const Result = buildNonAtomicBinOp(B, Op, BroadcastI, LaneOffset);
lib/Target/AMDGPU/AMDGPUCallLowering.cpp
  262                                         const Value *Val, ArrayRef<Register> VRegs,
  292                                      const Value *Val,
lib/Target/AMDGPU/AMDGPUCallLowering.h
   41   bool lowerReturnVal(MachineIRBuilder &B, const Value *Val,
   47   bool lowerReturn(MachineIRBuilder &B, const Value *Val,
lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp
  144   unsigned numBitsUnsigned(Value *Op, unsigned ScalarSize) const;
  145   unsigned numBitsSigned(Value *Op, unsigned ScalarSize) const;
  146   bool isI24(Value *V, unsigned ScalarSize) const;
  147   bool isU24(Value *V, unsigned ScalarSize) const;
  154   Value* expandDivRem24(IRBuilder<> &Builder, BinaryOperator &I,
  155                         Value *Num, Value *Den,
  155                         Value *Num, Value *Den,
  159   Value* expandDivRem32(IRBuilder<> &Builder, BinaryOperator &I,
  160                         Value *Num, Value *Den) const;
  160                         Value *Num, Value *Den) const;
  297   Value *ExtOp0 = nullptr;
  298   Value *ExtOp1 = nullptr;
  299   Value *ExtRes = nullptr;
  300   Value *TruncRes = nullptr;
  338   Value *ExtOp0 = nullptr;
  339   Value *ExtOp1 = nullptr;
  340   Value *NewICmp  = nullptr;
  365   Value *ExtOp1 = nullptr;
  366   Value *ExtOp2 = nullptr;
  367   Value *ExtRes = nullptr;
  368   Value *TruncRes = nullptr;
  399   Value *ExtOp = Builder.CreateZExt(I.getOperand(0), I32Ty);
  400   Value *ExtRes = Builder.CreateCall(I32, { ExtOp });
  401   Value *LShrOp =
  403   Value *TruncRes =
  412 unsigned AMDGPUCodeGenPrepare::numBitsUnsigned(Value *Op,
  418 unsigned AMDGPUCodeGenPrepare::numBitsSigned(Value *Op,
  425 bool AMDGPUCodeGenPrepare::isI24(Value *V, unsigned ScalarSize) const {
  431 bool AMDGPUCodeGenPrepare::isU24(Value *V, unsigned ScalarSize) const {
  436                           SmallVectorImpl<Value *> &Values, Value *V) {
  436                           SmallVectorImpl<Value *> &Values, Value *V) {
  447 static Value *insertValues(IRBuilder<> &Builder,
  449                            SmallVectorImpl<Value *> &Values) {
  453   Value *NewVal = UndefValue::get(Ty);
  473   Value *LHS = I.getOperand(0);
  474   Value *RHS = I.getOperand(1);
  488   SmallVector<Value *, 4> LHSVals;
  489   SmallVector<Value *, 4> RHSVals;
  490   SmallVector<Value *, 4> ResultVals;
  498     Value *LHS, *RHS;
  507     Value *Result = Builder.CreateCall(Intrin, {LHS, RHS});
  518   Value *NewVal = insertValues(Builder, Ty, ResultVals);
  526 static bool shouldKeepFDivF32(Value *Num, bool UnsafeDiv, bool HasDenormals) {
  572   Value *Num = FDiv.getOperand(0);
  573   Value *Den = FDiv.getOperand(1);
  575   Value *NewFDiv = nullptr;
  584       Value *NumEltI = Builder.CreateExtractElement(Num, I);
  585       Value *DenEltI = Builder.CreateExtractElement(Den, I);
  586       Value *NewElt;
  615 static std::pair<Value*, Value*> getMul64(IRBuilder<> &Builder,
  615 static std::pair<Value*, Value*> getMul64(IRBuilder<> &Builder,
  616                                           Value *LHS, Value *RHS) {
  616                                           Value *LHS, Value *RHS) {
  620   Value *LHS_EXT64 = Builder.CreateZExt(LHS, I64Ty);
  621   Value *RHS_EXT64 = Builder.CreateZExt(RHS, I64Ty);
  622   Value *MUL64 = Builder.CreateMul(LHS_EXT64, RHS_EXT64);
  623   Value *Lo = Builder.CreateTrunc(MUL64, I32Ty);
  624   Value *Hi = Builder.CreateLShr(MUL64, Builder.getInt64(32));
  629 static Value* getMulHu(IRBuilder<> &Builder, Value *LHS, Value *RHS) {
  629 static Value* getMulHu(IRBuilder<> &Builder, Value *LHS, Value *RHS) {
  629 static Value* getMulHu(IRBuilder<> &Builder, Value *LHS, Value *RHS) {
  635 Value* AMDGPUCodeGenPrepare::expandDivRem24(IRBuilder<> &Builder,
  637                                             Value *Num, Value *Den,
  637                                             Value *Num, Value *Den,
  660   Value *JQ = One;
  674   Value *IA = Num;
  677   Value *IB = Den;
  680   Value *FA = IsSigned ? Builder.CreateSIToFP(IA, F32Ty)
  684   Value *FB = IsSigned ? Builder.CreateSIToFP(IB,F32Ty)
  687   Value *RCP = Builder.CreateFDiv(ConstantFP::get(F32Ty, 1.0), FB);
  688   Value *FQM = Builder.CreateFMul(FA, RCP);
  695   Value *FQNeg = Builder.CreateFNeg(FQ);
  698   Value *FR = Builder.CreateIntrinsic(Intrinsic::amdgcn_fmad_ftz,
  702   Value *IQ = IsSigned ? Builder.CreateFPToSI(FQ, I32Ty)
  712   Value *CV = Builder.CreateFCmpOGE(FR, FB);
  718   Value *Div = Builder.CreateAdd(IQ, JQ);
  720   Value *Res = Div;
  723     Value *Rem = Builder.CreateMul(Div, Den);
  739 Value* AMDGPUCodeGenPrepare::expandDivRem32(IRBuilder<> &Builder,
  741                                             Value *Num, Value *Den) const {
  741                                             Value *Num, Value *Den) const {
  770   if (Value *Res = expandDivRem24(Builder, I, Num, Den, IsDiv, IsSigned)) {
  779   Value *Sign = nullptr;
  782     Value *LHSign = Builder.CreateAShr(Num, K31);
  783     Value *RHSign = Builder.CreateAShr(Den, K31);
  796   Value *DEN_F32 = Builder.CreateUIToFP(Den, F32Ty);
  797   Value *RCP_F32 = Builder.CreateFDiv(ConstantFP::get(F32Ty, 1.0), DEN_F32);
  799   Value *RCP_SCALE = Builder.CreateFMul(RCP_F32, UINT_MAX_PLUS_1);
  800   Value *RCP = Builder.CreateFPToUI(RCP_SCALE, I32Ty);
  803   Value *RCP_LO, *RCP_HI;
  807   Value *NEG_RCP_LO = Builder.CreateNeg(RCP_LO);
  810   Value *RCP_HI_0_CC = Builder.CreateICmpEQ(RCP_HI, Zero);
  811   Value *ABS_RCP_LO = Builder.CreateSelect(RCP_HI_0_CC, NEG_RCP_LO, RCP_LO);
  815   Value *E = getMulHu(Builder, ABS_RCP_LO, RCP);
  818   Value *RCP_A_E = Builder.CreateAdd(RCP, E);
  821   Value *RCP_S_E = Builder.CreateSub(RCP, E);
  824   Value *Tmp0 = Builder.CreateSelect(RCP_HI_0_CC, RCP_A_E, RCP_S_E);
  827   Value *Quotient = getMulHu(Builder, Tmp0, Num);
  830   Value *Num_S_Remainder = Builder.CreateMul(Quotient, Den);
  833   Value *Remainder = Builder.CreateSub(Num, Num_S_Remainder);
  836   Value *Rem_GE_Den_CC = Builder.CreateICmpUGE(Remainder, Den);
  837   Value *Remainder_GE_Den = Builder.CreateSelect(Rem_GE_Den_CC, MinusOne, Zero);
  840   Value *Num_GE_Num_S_Rem_CC = Builder.CreateICmpUGE(Num, Num_S_Remainder);
  841   Value *Remainder_GE_Zero = Builder.CreateSelect(Num_GE_Num_S_Rem_CC,
  845   Value *Tmp1 = Builder.CreateAnd(Remainder_GE_Den, Remainder_GE_Zero);
  846   Value *Tmp1_0_CC = Builder.CreateICmpEQ(Tmp1, Zero);
  848   Value *Res;
  851     Value *Quotient_A_One = Builder.CreateAdd(Quotient, One);
  854     Value *Quotient_S_One = Builder.CreateSub(Quotient, One);
  857     Value *Div = Builder.CreateSelect(Tmp1_0_CC, Quotient, Quotient_A_One);
  863     Value *Remainder_S_Den = Builder.CreateSub(Remainder, Den);
  866     Value *Remainder_A_Den = Builder.CreateAdd(Remainder, Den);
  869     Value *Rem = Builder.CreateSelect(Tmp1_0_CC, Remainder, Remainder_S_Den);
  896   Value *NewDiv = nullptr;
  900     Value *Num = I.getOperand(0);
  901     Value *Den = I.getOperand(1);
  909         Value *NumEltN = Builder.CreateExtractElement(Num, N);
  910         Value *DenEltN = Builder.CreateExtractElement(Den, N);
  911         Value *NewElt = expandDivRem32(Builder, I, NumEltN, DenEltN);
  942     Value *BitCast= Builder.CreateBitCast(I.getPointerOperand(), PT);
  968     Value *ValTrunc = Builder.CreateTrunc(WidenLoad, IntNTy);
  969     Value *ValOrig = Builder.CreateBitCast(ValTrunc, I.getType());
lib/Target/AMDGPU/AMDGPUInline.cpp
  132   for (Value *PtrArg : CS.args()) {
lib/Target/AMDGPU/AMDGPUInstrInfo.cpp
   33   const Value *Ptr = MMO->getValue();
lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
 1513   const Value *Ptr = MMO->getValue();
lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
 1189   Value *V = UndefValue::get(PointerType::get(
lib/Target/AMDGPU/AMDGPULibCalls.cpp
  150   void replaceCall(Value *With) {
  223 static CallInst *CreateCallEx(IRB &B, FunctionCallee Callee, Value *Arg,
  232 static CallInst *CreateCallEx2(IRB &B, FunctionCallee Callee, Value *Arg1,
  233                                Value *Arg2, const Twine &Name = "") {
  517     Value *opr0 = aCI->getArgOperand(0);
  531       Value *sinval = CallInst::Create(sinExpr, opr0, "splitsin", aCI);
  532       Value *cosval = CallInst::Create(cosExpr, opr0, "splitcos", aCI);
  591   auto *PacketSize = CI->getArgOperand(NumArg - 2);
  592   auto *PacketAlign = CI->getArgOperand(NumArg - 1);
  623   auto *BCast = B.CreatePointerCast(PtrArg, PtrTy);
  624   SmallVector<Value *, 6> Args;
  743   Value *opr0 = CI->getArgOperand(0);
  787           Value *nval = ConstantFP::get(CF->getType(), ftbl[i].result);
  823   Value *opr0 = CI->getArgOperand(0);
  828     Value *nval = B.CreateFDiv(ConstantFP::get(CF->getType(), 1.0),
  841   Value *opr0 = CI->getArgOperand(0);
  842   Value *opr1 = CI->getArgOperand(1);
  850     Value *nval1 = B.CreateFDiv(ConstantFP::get(opr1->getType(), 1.0),
  852     Value *nval  = B.CreateFMul(opr0, nval1, "__div2mul");
  876   Value *opr0, *opr1;
  927     Value *nval = B.CreateFMul(opr0, opr0, "__pow2");
  938     Value *nval = B.CreateFDiv(cnval, opr0, "__powrecip");
  953       Value *nval = CreateCallEx(B,FPExpr, opr0, issqrt ? "__pow2sqrt"
  982     Value *nval;
  990       Value *valx2 = nullptr;
 1102   Value *nval;
 1128     Value *opr_n;
 1141     Value *sign = B.CreateShl(opr_n, size-1, "__yeven");
 1156   Value *opr0 = CI->getArgOperand(0);
 1157   Value *opr1 = CI->getArgOperand(1);
 1174       Value *nval = CreateCallEx(B,FPExpr, opr0, "__rootn2sqrt");
 1183       Value *nval = CreateCallEx(B,FPExpr, opr0, "__rootn2cbrt");
 1189     Value *nval = B.CreateFDiv(ConstantFP::get(opr0->getType(), 1.0),
 1200       Value *nval = CreateCallEx(B,FPExpr, opr0, "__rootn2rsqrt");
 1210   Value *opr0 = CI->getArgOperand(0);
 1211   Value *opr1 = CI->getArgOperand(1);
 1212   Value *opr2 = CI->getArgOperand(2);
 1226     Value *nval = B.CreateFAdd(opr1, opr2, "fmaadd");
 1234     Value *nval = B.CreateFAdd(opr0, opr2, "fmaadd");
 1243       Value *nval = B.CreateFMul(opr0, opr1, "fmamul");
 1269       Value *opr0 = CI->getArgOperand(0);
 1272       Value *nval = CreateCallEx(B,FPExpr, opr0, "__sqrt");
 1291   Value *CArgVal = CI->getArgOperand(0);
 1300       Value *AvailableVal = FindAvailableLoadedValue(LI, CBB, BBI, MaxScan, AA);
 1352   Value *P = Alloc;
lib/Target/AMDGPU/AMDGPULowerIntrinsics.cpp
   58 static bool shouldExpandOperationWithSize(Value *Size) {
lib/Target/AMDGPU/AMDGPULowerKernelArguments.cpp
  134     Value *ArgPtr;
  203       Value *ExtractBits = OffsetDiff == 0 ?
  207       Value *Trunc = Builder.CreateTrunc(ExtractBits, ArgIntTy);
  208       Value *NewVal = Builder.CreateBitCast(Trunc, ArgTy,
  212       Value *Shuf = Builder.CreateShuffleVector(Load, UndefValue::get(V4Ty),
lib/Target/AMDGPU/AMDGPULowerKernelAttributes.cpp
   84   Value *WorkGroupSizeX = nullptr;
   85   Value *WorkGroupSizeY = nullptr;
   86   Value *WorkGroupSizeZ = nullptr;
   88   Value *GridSizeX = nullptr;
   89   Value *GridSizeY = nullptr;
   90   Value *GridSizeZ = nullptr;
  166   Value *WorkGroupSizes[3] = { WorkGroupSizeX, WorkGroupSizeY, WorkGroupSizeZ };
  167   Value *GridSizes[3] = { GridSizeX, GridSizeY, GridSizeZ };
  170     Value *GroupSize = WorkGroupSizes[I];
  171     Value *GridSize = GridSizes[I];
  221     Value *GroupSize = WorkGroupSizes[I];
lib/Target/AMDGPU/AMDGPUPerfHintAnalysis.cpp
   79     const Value *V;
   80     const Value *Base;
  119   bool isGlobalAddr(const Value *V) const;
  120   bool isLocalAddr(const Value *V) const;
  121   bool isConstantAddr(const Value *V) const;
  124 static const Value *getMemoryInstrPtr(const Instruction *Inst) {
  146   SmallSet<const Value *, 32> WorkSet;
  147   SmallSet<const Value *, 32> Visited;
  148   if (const Value *MO = getMemoryInstrPtr(Inst)) {
  154     const Value *V = *WorkSet.begin();
  301 bool AMDGPUPerfHint::isGlobalAddr(const Value *V) const {
  310 bool AMDGPUPerfHint::isLocalAddr(const Value *V) const {
  330   const Value *MO = getMemoryInstrPtr(Inst);
  342 bool AMDGPUPerfHint::isConstantAddr(const Value *V) const {
lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp
   69   Value *simplify(Instruction *I, const TargetLibraryInfo *TLI) {
  161     Value *Op = CI->getArgOperand(0);
  174       Value *Op_simplified = simplify(I, &GetTLI(*I->getFunction()));
  210         Value *Arg = CI->getArgOperand(ArgCount);
  348       Value *sumC = ConstantInt::get(SizetTy, Sum, false);
  349       SmallVector<Value *, 1> alloc_args;
  364         Value *result =
  376       SmallVector<Value *, 1> ZeroIdxList;
  386       Value *id_gep_cast =
  393       SmallVector<Value *, 2> FourthIdxList;
  407         Value *Arg = CI->getArgOperand(ArgCount);
  409         SmallVector<Value *, 32> WhatToStore;
  464                 Value *ANumV = ConstantInt::get(Int32Ty, ANum, false);
  470               Value *ANumV = ConstantInt::get(Int32Ty, 0xFFFFFF00, false);
  533           Value *TheBtCast = WhatToStore[I];
  536           SmallVector<Value *, 1> BuffOffset;
  540           Value *CastedGEP =
lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp
   91   std::pair<Value *, Value *> getLocalSizeYZ(IRBuilder<> &Builder);
   91   std::pair<Value *, Value *> getLocalSizeYZ(IRBuilder<> &Builder);
   92   Value *getWorkitemID(IRBuilder<> &Builder, unsigned N);
   96   bool collectUsesWithPtrTypes(Value *BaseAlloca,
   97                                Value *Val,
   98                                std::vector<Value*> &WorkList) const;
  104   bool binaryOpIsDerivedFromSameAlloca(Value *Alloca, Value *Val,
  104   bool binaryOpIsDerivedFromSameAlloca(Value *Alloca, Value *Val,
  180 std::pair<Value *, Value *>
  180 std::pair<Value *, Value *>
  245   Value *CastDispatchPtr = Builder.CreateBitCast(
  251   Value *GEPXY = Builder.CreateConstInBoundsGEP1_64(I32Ty, CastDispatchPtr, 1);
  254   Value *GEPZU = Builder.CreateConstInBoundsGEP1_64(I32Ty, CastDispatchPtr, 2);
  263   Value *Y = Builder.CreateLShr(LoadXY, 16);
  268 Value *AMDGPUPromoteAlloca::getWorkitemID(IRBuilder<> &Builder, unsigned N) {
  303 static Value *
  304 calculateVectorIndex(Value *Ptr,
  305                      const std::map<GetElementPtrInst *, Value *> &GEPIdx) {
  312 static Value* GEPToVectorIndex(GetElementPtrInst *GEP) {
  382   std::map<GetElementPtrInst*, Value*> GEPVectorIdx;
  383   std::vector<Value*> WorkList;
  394     Value *Index = GEPToVectorIndex(GEP);
  420   for (Value *V : WorkList) {
  429       Value *Ptr = cast<LoadInst>(Inst)->getPointerOperand();
  430       Value *Index = calculateVectorIndex(Ptr, GEPVectorIdx);
  432       Value *BitCast = Builder.CreateBitCast(Alloca, VecPtrTy);
  433       Value *VecValue = Builder.CreateLoad(VectorTy, BitCast);
  434       Value *ExtractElement = Builder.CreateExtractElement(VecValue, Index);
  445       Value *Ptr = SI->getPointerOperand();
  446       Value *Index = calculateVectorIndex(Ptr, GEPVectorIdx);
  447       Value *BitCast = Builder.CreateBitCast(Alloca, VecPtrTy);
  448       Value *VecValue = Builder.CreateLoad(VectorTy, BitCast);
  449       Value *NewVecValue = Builder.CreateInsertElement(VecValue,
  489 bool AMDGPUPromoteAlloca::binaryOpIsDerivedFromSameAlloca(Value *BaseAlloca,
  490                                                           Value *Val,
  495   Value *OtherOp = Inst->getOperand(OpIdx0);
  502   Value *OtherObj = GetUnderlyingObject(OtherOp, *DL);
  522   Value *BaseAlloca,
  523   Value *Val,
  524   std::vector<Value*> &WorkList) const {
  784   std::vector<Value*> WorkList;
  806   Value *TCntY, *TCntZ;
  809   Value *TIdX = getWorkitemID(Builder, 0);
  810   Value *TIdY = getWorkitemID(Builder, 1);
  811   Value *TIdZ = getWorkitemID(Builder, 2);
  813   Value *Tmp0 = Builder.CreateMul(TCntY, TCntZ, "", true, true);
  815   Value *Tmp1 = Builder.CreateMul(TIdY, TCntZ, "", true, true);
  816   Value *TID = Builder.CreateAdd(Tmp0, Tmp1);
  819   Value *Indices[] = {
  824   Value *Offset = Builder.CreateInBoundsGEP(GVTy, GV, Indices);
  829   for (Value *V : WorkList) {
  833         Value *Src0 = CI->getOperand(0);
  917       Value *Src = Intr->getOperand(0);
lib/Target/AMDGPU/AMDGPURewriteOutArguments.cpp
  104   bool checkArgumentUses(Value &Arg) const;
  135 bool AMDGPURewriteOutArguments::checkArgumentUses(Value &Arg) const {
  260   using ReplacementVec = SmallVector<std::pair<Argument *, Value *>, 4>;
  324         Value *ReplVal = Store.second->getValueOperand();
  390     Value *NewRetVal = UndefValue::get(NewRetTy);
  392     Value *RetVal = RI->getReturnValue();
  396     for (std::pair<Argument *, Value *> ReturnPoint : Replacement.second) {
  398       Value *Val = ReturnPoint.second;
  432   SmallVector<Value *, 16> StubCallArgs;
  459     Value *Val = B.CreateExtractValue(StubCall, RetIdx++);
  463     Value *PtrVal = B.CreateBitCast(&Arg, PtrTy);
lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp
   72 static bool dependsOnLocalPhi(const Loop *L, const Value *Cond,
   78   for (const Value *V : I->operand_values()) {
  154         const Value *Ptr = GEP->getPointerOperand();
  178       for (const Value *Op : GEP->operands()) {
  343     TTI::OperandValueProperties Opd2PropInfo, ArrayRef<const Value *> Args ) {
  547 bool GCNTTIImpl::isSourceOfDivergence(const Value *V) const {
  578 bool GCNTTIImpl::isAlwaysUniform(const Value *V) const {
  611   IntrinsicInst *II, Value *OldV, Value *NewV) const {
  611   IntrinsicInst *II, Value *OldV, Value *NewV) const {
  697                                  ArrayRef<const Value *> Operands) {
  719     SmallVector<Value *, 4> Args(II->arg_operands());
lib/Target/AMDGPU/AMDGPUTargetTransformInfo.h
  178     ArrayRef<const Value *> Args = ArrayRef<const Value *>());
  183   bool isSourceOfDivergence(const Value *V) const;
  184   bool isAlwaysUniform(const Value *V) const;
  197                                         Value *OldV, Value *NewV) const;
  197                                         Value *OldV, Value *NewV) const;
  217   unsigned getUserCost(const User *U, ArrayRef<const Value *> Operands);
lib/Target/AMDGPU/AMDGPUUnifyDivergentExitNodes.cpp
  189         Value *RetVal = RetTy->isVoidTy() ? nullptr : UndefValue::get(RetTy);
  233       Value *RetVal = RetTy->isVoidTy() ? nullptr : UndefValue::get(RetTy);
lib/Target/AMDGPU/R600OpenCLImageTypeLoweringPass.cpp
  179       Value *Replacement = nullptr;
  212       Value *Replacement = nullptr;
lib/Target/AMDGPU/SIAnnotateControlFlow.cpp
   52 using StackEntry = std::pair<BasicBlock *, Value *>;
   85   Value *popSaved();
   87   void push(BasicBlock *BB, Value *Saved);
   97   Value *
   98   handleLoopCondition(Value *Cond, PHINode *Broken, llvm::Loop *L,
  173 Value *SIAnnotateControlFlow::popSaved() {
  178 void SIAnnotateControlFlow::push(BasicBlock *BB, Value *Saved) {
  213   Value *Ret = CallInst::Create(If, Term->getCondition(), "", Term);
  223   Value *Ret = CallInst::Create(Else, popSaved(), "", Term);
  229 Value *SIAnnotateControlFlow::handleLoopCondition(
  230     Value *Cond, PHINode *Broken, llvm::Loop *L, BranchInst *Term) {
  240     Value *Args[] = { Cond, Broken };
  249     Value *Args[] = { Cond, Broken };
  269   Value *Cond = Term->getCondition();
  271   Value *Arg = handleLoopCondition(Cond, Broken, L, Term);
  274     Value *PHIValue = IntMaskZero;
  313   Value *Exec = popSaved();
lib/Target/AMDGPU/SIISelLowering.cpp
 1045                                             SmallVectorImpl<Value*> &Ops,
 1055     Value *Ptr = II->getArgOperand(0);
 1336   const Value *Ptr = MemNode->getMemOperand()->getValue();
 4690   Value *V = UndefValue::get(PointerType::get(Type::getInt8Ty(*DAG.getContext()),
10851       const Value *V = FLI->getValueFromVirtualReg(Reg);
10951 static bool hasCFUser(const Value *V, SmallPtrSet<const Value *, 16> &Visited) {
10951 static bool hasCFUser(const Value *V, SmallPtrSet<const Value *, 16> &Visited) {
10990                                                const Value *V) const {
11039   SmallPtrSet<const Value *, 16> Visited;
lib/Target/AMDGPU/SIISelLowering.h
  234                             SmallVectorImpl<Value*> &/*Ops*/,
  402                                        const Value *V) const override;
lib/Target/AMDGPU/SIMachineFunctionInfo.h
  363   DenseMap<const Value *,
  365   DenseMap<const Value *,
  875                                                     const Value *BufferRsrc) {
  884                                                   const Value *ImgRsrc) {
lib/Target/ARC/ARCISelLowering.cpp
  742   const Value *SV = cast<SrcValueSDNode>(Op.getOperand(2))->getValue();
lib/Target/ARM/ARMCallLowering.cpp
  238                                      const Value *Val, ArrayRef<Register> VRegs,
  266                                   const Value *Val,
lib/Target/ARM/ARMCallLowering.h
   35   bool lowerReturn(MachineIRBuilder &MIRBuilder, const Value *Val,
   45   bool lowerReturnVal(MachineIRBuilder &MIRBuilder, const Value *Val,
lib/Target/ARM/ARMCodeGenPrepare.cpp
  110   SmallPtrSet<Value*, 8> NewInsts;
  112   DenseMap<Value*, SmallVector<Type*, 4>> TruncTysMap;
  113   SmallPtrSet<Value*, 8> Promoted;
  122   SetVector<Value*> *Visited;
  123   SmallPtrSetImpl<Value*> *Sources;
  128   void ReplaceAllUsersOfWith(Value *From, Value *To);
  128   void ReplaceAllUsersOfWith(Value *From, Value *To);
  142               SetVector<Value*> &Visited,
  143               SmallPtrSetImpl<Value*> &Sources,
  152   std::set<Value*> AllVisited;
  157   bool isSupportedValue(Value *V);
  158   bool isLegalToPromote(Value *V);
  159   bool TryToPromote(Value *V);
  181 static bool GenerateSignBits(Value *V) {
  190 static bool EqualTypeSize(Value *V) {
  194 static bool LessOrEqualTypeSize(Value *V) {
  198 static bool GreaterThanTypeSize(Value *V) {
  202 static bool LessThanTypeSize(Value *V) {
  210 static bool isSupportedType(Value *V) {
  234 static bool isSource(Value *V) {
  255 static bool isSink(Value *V) {
  393 static bool shouldPromote(Value *V) {
  412 static bool isPromotedResultSafe(Value *V) {
  445 void IRPromoter::ReplaceAllUsersOfWith(Value *From, Value *To) {
  445 void IRPromoter::ReplaceAllUsersOfWith(Value *From, Value *To) {
  490     Value *NewVal = Builder.CreateSub(I->getOperand(0), NewConst);
  499   for (auto *I : NewInsts)
  513     Value *ZExt = Builder.CreateZExt(V, ExtTy);
  548   for (auto *V : *Visited) {
  557       Value *Op = I->getOperand(i);
  576   for (auto *V : *Visited) {
  596     Value *Args[] = { I->getOperand(0), I->getOperand(1) };
  632         Value *Arg = Call->getArgOperand(i);
  675     Value *Src = ZExt->getOperand(0);
  713   for (auto *V : *Visited) {
  725     Value *Masked = Builder.CreateAnd(Trunc->getOperand(0), Mask);
  735                         SetVector<Value*> &Visited,
  736                         SmallPtrSetImpl<Value*> &Sources,
  758         Value *Arg = Call->getArgOperand(i);
  768   for (auto *V : Visited) {
  804 bool ARMCodeGenPrepare::isSupportedValue(Value *V) {
  852 bool ARMCodeGenPrepare::isLegalToPromote(Value *V) {
  892 bool ARMCodeGenPrepare::TryToPromote(Value *V) {
  907   SetVector<Value*> WorkList;
  908   SmallPtrSet<Value*, 8> Sources;
  910   SetVector<Value*> CurrentVisited;
  936     Value *V = WorkList.back();
  987   for (auto *V : CurrentVisited) {
lib/Target/ARM/ARMFastISel.cpp
  193     bool ARMEmitCmp(const Value *Src1Value, const Value *Src2Value,
  193     bool ARMEmitCmp(const Value *Src1Value, const Value *Src2Value,
  200     bool ARMComputeAddress(const Value *Obj, Address &Addr);
  221     bool ProcessCallArgs(SmallVectorImpl<Value*> &Args,
  713 bool ARMFastISel::ARMComputeAddress(const Value *Obj, Address &Addr) {
  762         const Value *Op = *i;
 1024   const Value *SV = I->getOperand(0);
 1149   Value *Op0 = I->getOperand(0);
 1156   const Value *PtrV = I->getOperand(1);
 1350 bool ARMFastISel::ARMEmitCmp(const Value *Src1Value, const Value *Src2Value,
 1350 bool ARMFastISel::ARMEmitCmp(const Value *Src1Value, const Value *Src2Value,
 1503   Value *V = I->getOperand(0);
 1522   Value *V = I->getOperand(0);
 1546   Value *Src = I->getOperand(0);
 1887 bool ARMFastISel::ProcessCallArgs(SmallVectorImpl<Value*> &Args,
 1954     const Value *ArgVal = Args[VA.getValNo()];
 2118     const Value *RV = Ret->getOperand(0);
 2225   SmallVector<Value*, 8> Args;
 2233   for (Value *Op :  I->operands()) {
 2296   const Value *Callee = CI->getCalledValue();
 2333   SmallVector<Value*, 8> Args;
 2579   Value *Op = I->getOperand(0);
 2742   Value *Src = I->getOperand(0);
 2777   Value *Src2Value = I->getOperand(1);
 2789   Value *Src1Value = I->getOperand(0);
lib/Target/ARM/ARMISelLowering.cpp
 3298 static bool allUsersAreInFunction(const Value *V, const Function *F) {
 3827   const Value *SV = cast<SrcValueSDNode>(Op.getOperand(2))->getValue();
 3879                                       const Value *OrigArg,
14733 static bool areExtractExts(Value *Ext1, Value *Ext2) {
14733 static bool areExtractExts(Value *Ext1, Value *Ext2) {
15646   Value *CallOperandVal = info.CallOperandVal;
16262     Value *AlignArg = I.getArgOperand(I.getNumArgOperands() - 1);
16303     Value *AlignArg = I.getArgOperand(I.getNumArgOperands() - 1);
16412       Value* args[6] = {Builder.getInt32(15), Builder.getInt32(0),
16551 Value *ARMTargetLowering::getSDagStackGuard(const Module &M) const {
16565 bool ARMTargetLowering::canCombineStoreAndExtract(Type *VectorTy, Value *Idx,
16606 Value *ARMTargetLowering::emitLoadLinked(IRBuilder<> &Builder, Value *Addr,
16606 Value *ARMTargetLowering::emitLoadLinked(IRBuilder<> &Builder, Value *Addr,
16621     Value *LoHi = Builder.CreateCall(Ldrex, Addr, "lohi");
16623     Value *Lo = Builder.CreateExtractValue(LoHi, 0, "lo");
16624     Value *Hi = Builder.CreateExtractValue(LoHi, 1, "hi");
16650 Value *ARMTargetLowering::emitStoreConditional(IRBuilder<> &Builder, Value *Val,
16650 Value *ARMTargetLowering::emitStoreConditional(IRBuilder<> &Builder, Value *Val,
16651                                                Value *Addr,
16665     Value *Lo = Builder.CreateTrunc(Val, Int32Ty, "lo");
16666     Value *Hi = Builder.CreateTrunc(Builder.CreateLShr(Val, 32), Int32Ty, "hi");
16769   Value *BaseAddr = LI->getPointerOperand();
16798   DenseMap<ShuffleVectorInst *, SmallVector<Value *, 4>> SubVecs;
16808     SmallVector<Value *, 2> Ops;
16820       Value *SubVec = Builder.CreateExtractValue(VldN, Index);
16838     auto *WideVec =
16896   Value *Op0 = SVI->getOperand(0);
16897   Value *Op1 = SVI->getOperand(1);
16915   Value *BaseAddr = SI->getPointerOperand();
16948     SmallVector<Value *, 6> Ops;
lib/Target/ARM/ARMISelLowering.h
  539     Value *emitLoadLinked(IRBuilder<> &Builder, Value *Addr,
  539     Value *emitLoadLinked(IRBuilder<> &Builder, Value *Addr,
  541     Value *emitStoreConditional(IRBuilder<> &Builder, Value *Val,
  541     Value *emitStoreConditional(IRBuilder<> &Builder, Value *Val,
  542                                 Value *Addr, AtomicOrdering Ord) const override;
  572     Value *getSDagStackGuard(const Module &M) const override;
  575     bool canCombineStoreAndExtract(Type *VectorTy, Value *Idx,
  778                        SDValue &Chain, const Value *OrigArg,
lib/Target/ARM/ARMParallelDSP.cpp
   62     Value*        LHS;
   63     Value*        RHS;
   69     MulCandidate(Instruction *I, Value *lhs, Value *rhs) :
   69     MulCandidate(Instruction *I, Value *lhs, Value *rhs) :
   85     Value           *Acc = nullptr;
  114         Value *LHS = cast<Instruction>(I->getOperand(0))->getOperand(0);
  115         Value *RHS = cast<Instruction>(I->getOperand(1))->getOperand(0);
  132     bool InsertAcc(Value *V) {
  165     Value *getAccumulator() { return Acc; }
  223     bool IsNarrowSequence(Value *V);
  224     bool Search(Value *V, BasicBlock *BB, Reduction &R);
  334 bool ARMParallelDSP::IsNarrowSequence(Value *V) {
  439 bool ARMParallelDSP::Search(Value *V, BasicBlock *BB, Reduction &R) {
  461     Value *LHS = I->getOperand(0);
  462     Value *RHS = I->getOperand(1);
  472     Value *MulOp0 = I->getOperand(0);
  473     Value *MulOp1 = I->getOperand(1);
  632     Value* Args[] = { WideLd0, WideLd1, Acc };
  655     Value *V = nullptr;
  666   Value *Acc = R.getAccumulator();
  745   std::function<void(Value*, Value*)> MoveBefore =
  745   std::function<void(Value*, Value*)> MoveBefore =
  772   Value *VecPtr = IRB.CreateBitCast(Base->getPointerOperand(),
  784   Value *Bottom = IRB.CreateTrunc(WideLoad, Base->getType());
  785   Value *NewBaseSExt = IRB.CreateSExt(Bottom, BaseSExt->getType());
  789   Value *ShiftVal = ConstantInt::get(LoadTy, OffsetTy->getBitWidth());
  790   Value *Top = IRB.CreateLShr(WideLoad, ShiftVal);
  791   Value *Trunc = IRB.CreateTrunc(Top, OffsetTy);
  792   Value *NewOffsetSExt = IRB.CreateSExt(Trunc, OffsetSExt->getType());
lib/Target/ARM/ARMTargetTransformInfo.cpp
  647     ArrayRef<const Value *> Args) {
 1053       SmallVector<const Value*, 4> Operands(I.value_op_begin(),
lib/Target/ARM/ARMTargetTransformInfo.h
  190       ArrayRef<const Value *> Args = ArrayRef<const Value *>());
lib/Target/ARM/MVETailPredication.cpp
   75   bool TryConvert(Value *TripCount);
   83   Value *ComputeElements(Value *TripCount, VectorType *VecTy);
   83   Value *ComputeElements(Value *TripCount, VectorType *VecTy);
   87   bool isTailPredicate(Instruction *Predicate, Value *NumElements);
  181 bool MVETailPredication::isTailPredicate(Instruction *I, Value *NumElements) {
  229   Value *TripCount = nullptr;
  269   Value *OnEntry = Phi->getIncomingValueForBlock(L->getLoopPreheader());
  273   Value *InLoop = Phi->getIncomingValueForBlock(L->getLoopLatch());
  317 Value* MVETailPredication::ComputeElements(Value *TripCount,
  317 Value* MVETailPredication::ComputeElements(Value *TripCount,
  442 bool MVETailPredication::TryConvert(Value *TripCount) {
  463     Value *NumElements = ComputeElements(TripCount, VecTy);
  494     Value *TailPredicate = Builder.CreateCall(VCTP, Processed);
  500     Value *Remaining = Builder.CreateSub(Processed, Factor);
lib/Target/AVR/AVRISelLowering.cpp
  671   const Value *SV = cast<SrcValueSDNode>(Op.getOperand(2))->getValue();
 1742   Value *CallOperandVal = info.CallOperandVal;
lib/Target/BPF/BPFAbstractMemberAccess.cpp
  121     Value *Base;
  163   Value *computeBaseAndAccessKey(CallInst *Call, CallInfo &CInfo,
  165   uint64_t getConstant(const Value *IndexValue);
  290     SmallVector<Value *, 4> IdxList;
  505 uint64_t BPFAbstractMemberAccess::getConstant(const Value *IndexValue) {
  694 Value *BPFAbstractMemberAccess::computeBaseAndAccessKey(CallInst *Call,
  698   Value *Base = nullptr;
  844   Value *Base =
lib/Target/Hexagon/HexagonCommonGEP.cpp
   71   using NodeToValueMap = std::map<GepNode *, Value *>;
  118     using ValueToNodeMap = std::map<Value *, GepNode *>;
  119     using ValueVect = std::vector<Value *>;
  132     bool isInvariantIn(Value *Val, Loop *L);
  142     Value *fabricateGEP(NodeVect &NA, BasicBlock::iterator At,
  187       Value *BaseVal;
  189     Value *Idx = nullptr;
  203   Type *next_type(Type *Ty, Value *Idx) {
  347   Value *PtrOp = GepI->getPointerOperand();
  365   for (Value::user_iterator UI = GepI->user_begin(), UE = GepI->user_end();
  385     Value *Op = *OI;
  730       Value *V = *I;
  837 bool HexagonCommonGEP::isInvariantIn(Value *Val, Loop *L) {
 1089 Value *HexagonCommonGEP::fabricateGEP(NodeVect &NA, BasicBlock::iterator At,
 1099   Value *Input = RN->BaseVal;
 1100   Value **IdxList = new Value*[Num+1];
 1100   Value **IdxList = new Value*[Num+1];
 1125     ArrayRef<Value*> A(IdxList, IdxC);
 1185     Value *LocV = Loc[Last];
 1215     Value *NewInst = fabricateGEP(NA, InsertAt, LastB);
lib/Target/Hexagon/HexagonGenExtract.cpp
   97   Value *BF = nullptr;
  214   Value *NewIn = IRB.CreateCall(ExtF, {BF, IRB.getInt32(W), IRB.getInt32(SR)});
lib/Target/Hexagon/HexagonISelDAGToDAG.cpp
 1855 unsigned HexagonDAGToDAGISel::getUsesInFunction(const Value *V) {
lib/Target/Hexagon/HexagonISelDAGToDAG.h
  149   SmallDenseMap<const Value *,int> GAUsesInFunction;
  154   unsigned getUsesInFunction(const Value *V);
lib/Target/Hexagon/HexagonISelLowering.cpp
  805   const Value *SV = cast<SrcValueSDNode>(Op.getOperand(2))->getValue();
 1699 static bool isBrevLdIntrinsic(const Value *Inst) {
 1712 static Value *getBrevLdObject(Value *V) {
 1712 static Value *getBrevLdObject(Value *V) {
 1724 static Value *returnEdge(const PHINode *PN, Value *IntrBaseVal) {
 1724 static Value *returnEdge(const PHINode *PN, Value *IntrBaseVal) {
 1731       Value *BackEdgeVal = PN->getIncomingValue(i);
 1732       Value *BaseVal;
 1754 static Value *getUnderLyingObjectForBrevLdIntr(Value *V) {
 1754 static Value *getUnderLyingObjectForBrevLdIntr(Value *V) {
 1755   Value *IntrBaseVal = V;
 1756   Value *BaseVal;
 1795     llvm::Value *BasePtrVal = I.getOperand(0);
 3239 Value *HexagonTargetLowering::emitLoadLinked(IRBuilder<> &Builder, Value *Addr,
 3239 Value *HexagonTargetLowering::emitLoadLinked(IRBuilder<> &Builder, Value *Addr,
 3255   Value *Call = Builder.CreateCall(Fn, Addr, "larx");
 3262 Value *HexagonTargetLowering::emitStoreConditional(IRBuilder<> &Builder,
 3263       Value *Val, Value *Addr, AtomicOrdering Ord) const {
 3263       Value *Val, Value *Addr, AtomicOrdering Ord) const {
 3279   Value *Call = Builder.CreateCall(Fn, {Addr, Val}, "stcx");
 3280   Value *Cmp = Builder.CreateICmpEQ(Call, Builder.getInt32(0), "");
 3281   Value *Ext = Builder.CreateZExt(Cmp, Type::getInt32Ty(M->getContext()));
lib/Target/Hexagon/HexagonISelLowering.h
  319     Value *emitLoadLinked(IRBuilder<> &Builder, Value *Addr,
  319     Value *emitLoadLinked(IRBuilder<> &Builder, Value *Addr,
  321     Value *emitStoreConditional(IRBuilder<> &Builder, Value *Val,
  321     Value *emitStoreConditional(IRBuilder<> &Builder, Value *Val,
  322         Value *Addr, AtomicOrdering Ord) const override;
lib/Target/Hexagon/HexagonLoopIdiomRecognition.cpp
  164       using FuncType = std::function<Value* (Instruction*, LLVMContext&)>;
  178       void push_back(Value* V) {
  183       Value *pop_front_val() {
  184         Value *V = Q.front(); Q.pop_front(); S.erase(V);
  191       std::deque<Value*> Q;
  192       std::set<Value*> S;
  195     using ValueSetType = std::set<Value *>;
  201       using ValueMapType = DenseMap<Value *, Value *>;
  201       using ValueMapType = DenseMap<Value *, Value *>;
  203       Value *Root;
  215       void print(raw_ostream &OS, const Value *V) const;
  216       Value *materialize(BasicBlock *B, BasicBlock::iterator At);
  224       template <typename FuncT> void traverse(Value *V, FuncT F);
  225       void record(Value *V);
  226       void use(Value *V);
  227       void unuse(Value *V);
  230       Value *find(Value *Tree, Value *Sub) const;
  230       Value *find(Value *Tree, Value *Sub) const;
  230       Value *find(Value *Tree, Value *Sub) const;
  231       Value *subst(Value *Tree, Value *OldV, Value *NewV);
  231       Value *subst(Value *Tree, Value *OldV, Value *NewV);
  231       Value *subst(Value *Tree, Value *OldV, Value *NewV);
  231       Value *subst(Value *Tree, Value *OldV, Value *NewV);
  232       void replace(Value *OldV, Value *NewV);
  232       void replace(Value *OldV, Value *NewV);
  236     Value *simplify(Context &C);
  240     PE(const Simplifier::Context &c, Value *v = nullptr) : C(c), V(v) {}
  243     const Value *V;
  269 void Simplifier::Context::traverse(Value *V, FuncT F) {
  279     for (Value *Op : U->operands())
  284 void Simplifier::Context::print(raw_ostream &OS, const Value *V) const {
  302   for (const Value *Op : U->operands()) {
  320     Value *V = Q.pop_front_val();
  326       for (Value *Op : U->operands())
  332   for (std::pair<Value*,Value*> P : M) {
  332   for (std::pair<Value*,Value*> P : M) {
  349 void Simplifier::Context::record(Value *V) {
  357 void Simplifier::Context::use(Value *V) {
  365 void Simplifier::Context::unuse(Value *V) {
  378 Value *Simplifier::Context::subst(Value *Tree, Value *OldV, Value *NewV) {
  378 Value *Simplifier::Context::subst(Value *Tree, Value *OldV, Value *NewV) {
  378 Value *Simplifier::Context::subst(Value *Tree, Value *OldV, Value *NewV) {
  378 Value *Simplifier::Context::subst(Value *Tree, Value *OldV, Value *NewV) {
  392       Value *Op = U->getOperand(i);
  404 void Simplifier::Context::replace(Value *OldV, Value *NewV) {
  404 void Simplifier::Context::replace(Value *OldV, Value *NewV) {
  420     Value *V = Q.pop_front_val();
  424     if (Value *DupV = find(Root, V)) {
  428       for (Value *Op : U->operands())
  439   for (Value *V : Clones) {
  445   for (Value *V : Clones) {
  462     Value *OpI = I->getOperand(i), *OpJ = J->getOperand(i);
  476 Value *Simplifier::Context::find(Value *Tree, Value *Sub) const {
  476 Value *Simplifier::Context::find(Value *Tree, Value *Sub) const {
  476 Value *Simplifier::Context::find(Value *Tree, Value *Sub) const {
  482     Value *V = Q.pop_front_val();
  491     for (Value *Op : U->operands())
  502   for (Value *Op : I->operands()) {
  510 Value *Simplifier::Context::materialize(BasicBlock *B,
  517 Value *Simplifier::simplify(Context &C) {
  531       Value *W = R.Fn(U, C.Ctx);
  541       for (Value *Op : U->operands())
  566     using ValueSeq = SetVector<Value *>;
  573     bool isPromotableTo(Value *V, IntegerType *Ty);
  577     Value *getCountIV(BasicBlock *BB);
  578     bool findCycle(Value *Out, Value *In, ValueSeq &Cycle);
  578     bool findCycle(Value *Out, Value *In, ValueSeq &Cycle);
  583     bool highBitsAreZero(Value *V, unsigned IterCount);
  584     bool keepsHighBitsZero(Value *V, unsigned IterCount);
  585     bool isOperandShifted(Instruction *I, Value *Op);
  593       Value *M = nullptr;
  594       Value *P = nullptr;
  595       Value *Q = nullptr;
  596       Value *R = nullptr;
  597       Value *X = nullptr;
  604     bool matchLeftShift(SelectInst *SelI, Value *CIV, ParsedValues &PV);
  607           Value *CIV, ParsedValues &PV, bool PreScan);
  609     Value *generate(BasicBlock::iterator At, ParsedValues &PV);
  623 Value *PolynomialMultiplyRecognize::getCountIV(BasicBlock *BB) {
  631     Value *InitV = PN->getIncomingValueForBlock(PB);
  634     Value *IterV = PN->getIncomingValueForBlock(BB);
  640     Value *IncV = nullptr;
  655 static void replaceAllUsesOfWithIn(Value *I, Value *J, BasicBlock *BB) {
  655 static void replaceAllUsesOfWithIn(Value *I, Value *J, BasicBlock *BB) {
  666       Value *CIV, ParsedValues &PV) {
  674   Value *CondV = SelI->getCondition();
  675   Value *TrueV = SelI->getTrueValue();
  676   Value *FalseV = SelI->getFalseValue();
  681   Value *A = nullptr, *B = nullptr, *C = nullptr;
  691   Value *X = nullptr, *Sh1 = nullptr;
  719   Value *ShouldSameV = nullptr, *ShouldXoredV = nullptr;
  728   Value *Q = nullptr, *R = nullptr, *Y = nullptr, *Z = nullptr;
  729   Value *T = nullptr;
  754     Value *U = *SelI->user_begin();
  789   Value *CondV = SelI->getCondition();
  790   Value *TrueV = SelI->getTrueValue();
  791   Value *FalseV = SelI->getFalseValue();
  795   Value *C = nullptr;
  816   Value *X = nullptr;
  823   Value *R = nullptr, *Q = nullptr;
  856       BasicBlock *LoopB, BasicBlock *PrehB, Value *CIV, ParsedValues &PV,
  922         Value *Var = nullptr, *Inv = nullptr, *X1 = nullptr, *X2 = nullptr;
  941       Value *EntryP = RPhi->getIncomingValueForBlock(PrehB);
  962 bool PolynomialMultiplyRecognize::isPromotableTo(Value *Val,
 1017       Value *InV = P->getIncomingValue(i);
 1029     Value *Op = Z->getOperand(0);
 1037     Value *Mask = ConstantInt::get(DestTy, (1u << TruncTy->getBitWidth()) - 1);
 1038     Value *And = IRBuilder<>(In).CreateAnd(T->getOperand(0), Mask);
 1100       Value *T = IRBuilder<>(ExitB, End).CreateTrunc(P, PTy);
 1113 bool PolynomialMultiplyRecognize::findCycle(Value *Out, Value *In,
 1113 bool PolynomialMultiplyRecognize::findCycle(Value *Out, Value *In,
 1154     Value *V = Cycle[I];
 1171     Value *V = Cycle[I];
 1187     Value *TV = UseI->getOperand(1), *FV = UseI->getOperand(2);
 1250 bool PolynomialMultiplyRecognize::highBitsAreZero(Value *V,
 1261 bool PolynomialMultiplyRecognize::keepsHighBitsZero(Value *V,
 1285 bool PolynomialMultiplyRecognize::isOperandShifted(Instruction *I, Value *Op) {
 1294   Value *CIV = getCountIV(LoopB);
 1308     Value *V = nullptr;
 1326     Value *V = Users[i];
 1358     for (Value *Op : R->operands()) {
 1366   for (Value *V : Inputs)
 1369   for (Value *V : Internal)
 1375   std::map<Value*,Value*> ShiftMap;
 1375   std::map<Value*,Value*> ShiftMap;
 1377   using CastMapType = std::map<std::pair<Value *, Type *>, Value *>;
 1377   using CastMapType = std::map<std::pair<Value *, Type *>, Value *>;
 1386     Value *CV = IRB.CreateIntCast(V, Ty, false);
 1398     Value *V = nullptr;
 1406       Value *Op = J.get();
 1416       Value *W = (F != ShiftMap.end()) ? F->second : nullptr;
 1422         Value *ShAmt = CIV, *ShVal = Op;
 1453     Value *U = PN->getIncomingValueForBlock(LoopB);
 1456     Value *S = IRB.CreateLShr(PN, ConstantInt::get(PN->getType(), IterCount));
 1470     if (Value *SV = SimplifyInstruction(&I, {DL, &TLI, &DT}))
 1522 Value *PolynomialMultiplyRecognize::generate(BasicBlock::iterator At,
 1528   Value *P = PV.P, *Q = PV.Q, *P0 = P;
 1555   Value *R = B.CreateCall(PMF, {P, Q});
 1563 static bool hasZeroSignBit(const Value *V) {
 1635         Value *X = Sel->getTrueValue(), *Y = Sel->getFalseValue();
 1636         Value *Z = BO->getOperand(1);
 1643         Value *X = BO->getOperand(0);
 1644         Value *Y = Sel->getTrueValue(), *Z = Sel->getFalseValue();
 1659       Value *C = Sel->getCondition();
 1699       Value *S = I->getOperand(1);
 1727       Value *X = BitOp2->getOperand(0);
 1788   Value *CIV = getCountIV(LoopB);
 1805     for (const Value *U : V->users()) {
 1818     Value *T = PreSimp.simplify(C);
 1824         Value *NewSel = C.materialize(LoopB, SI->getIterator());
 1852       Value *T = PostSimp.simplify(C);
 1855         Value *NewSel = C.materialize(LoopB, SI->getIterator());
 1895   Value *PM = generate(At, PV);
 1918   Value *StoredVal = SI->getValueOperand();
 1919   Value *StorePtr = SI->getPointerOperand();
 1950   Value *LoadPtr = LI->getPointerOperand();
 1967 mayLoopAccessLocation(Value *Ptr, ModRefInfo Access, Loop *L,
 2013   Value *StorePtr = SI->getPointerOperand();
 2042   Value *StoreBasePtr = Expander.expandCodeFor(StoreEv->getStart(),
 2044   Value *LoadBasePtr = nullptr;
 2152   Value *NumBytes = Expander.expandCodeFor(NumBytesS, IntPtrTy, ExpPt);
 2154     if (Value *Simp = SimplifyInstruction(In, {*DL, TLI, DT}))
 2198     Value *LA = Builder.CreatePtrToInt(LoadBasePtr, IntPtrTy);
 2199     Value *SA = Builder.CreatePtrToInt(StoreBasePtr, IntPtrTy);
 2200     Value *LowA = StridePos ? SA : LA;
 2201     Value *HighA = StridePos ? LA : SA;
 2202     Value *CmpA = Builder.CreateICmpULT(LowA, HighA);
 2203     Value *Cond = CmpA;
 2207     Value *Dist = Builder.CreateSub(LowA, HighA);
 2208     Value *CmpD = Builder.CreateICmpSLE(NumBytes, Dist);
 2209     Value *CmpEither = Builder.CreateOr(Cond, CmpD);
 2214       Value *Thr = ConstantInt::get(Ty, Threshold);
 2215       Value *CmpB = Builder.CreateICmpULT(Thr, NumBytes);
 2216       Value *CmpBoth = Builder.CreateAnd(Cond, CmpB);
 2262       Value *NumWords = Expander.expandCodeFor(NumWordsS, Int32Ty,
 2265         if (Value *Simp = SimplifyInstruction(In, {*DL, TLI, DT}))
 2268       Value *Op0 = (StoreBasePtr->getType() == Int32PtrTy)
 2271       Value *Op1 = (LoadBasePtr->getType() == Int32PtrTy)
lib/Target/Hexagon/HexagonOptimizeSZextends.cpp
  108       Value *AshrOp1 = Ashr->getOperand(1);
  118       Value *Intr = Shl->getOperand(0);
  119       Value *ShlOp1 = Shl->getOperand(1);
lib/Target/Hexagon/HexagonTargetTransformInfo.cpp
  124       ArrayRef<const Value*> Args, unsigned VF) {
  134       ArrayRef<Value*> Args, FastMathFlags FMF, unsigned VF) {
  212       Value *Ptr, bool VariableMask, unsigned Alignment) {
  242       TTI::OperandValueProperties Opd2PropInfo, ArrayRef<const Value*> Args) {
  295                                 ArrayRef<const Value *> Operands) {
lib/Target/Hexagon/HexagonTargetTransformInfo.h
  105   unsigned getOperandsScalarizationOverhead(ArrayRef<const Value*> Args,
  109             ArrayRef<Value*> Args, FastMathFlags FMF, unsigned VF);
  122   unsigned getGatherScatterOpCost(unsigned Opcode, Type *DataTy, Value *Ptr,
  135             ArrayRef<const Value *> Args = ArrayRef<const Value *>());
  146   int getUserCost(const User *U, ArrayRef<const Value *> Operands);
lib/Target/Hexagon/HexagonVectorLoopCarriedReuse.cpp
  297     Value *findValueInBlock(Value *Op, BasicBlock *BB);
  297     Value *findValueInBlock(Value *Op, BasicBlock *BB);
  521             Value *Op = I->getOperand(OpNo);
  525               Value *BEOp = BEUser->getOperand(T);
  553             Value *Op = I->getOperand(OpNo);
  554             Value *BEOp = BEUser->getOperand(OpNo);
  592 Value *HexagonVectorLoopCarriedReuse::findValueInBlock(Value *Op,
  592 Value *HexagonVectorLoopCarriedReuse::findValueInBlock(Value *Op,
  596   Value *ValueInBlock = PN->getIncomingValueForBlock(BB);
  614     SmallVector<Value *, 4> Ops;
  624       Value *ValInPreheader = findValueInBlock(D[i], LoopPH);
  636   Value *BEVal = BEInst;
  700     Value *BEVal = PN->getIncomingValueForBlock(BB);
  706     Value *PreHdrVal =
lib/Target/Lanai/LanaiISelLowering.cpp
  258   Value *CallOperandVal = Info.CallOperandVal;
 1012   const Value *SV = cast<SrcValueSDNode>(Op.getOperand(2))->getValue();
lib/Target/Lanai/LanaiTargetTransformInfo.h
   84       ArrayRef<const Value *> Args = ArrayRef<const Value *>()) {
lib/Target/MSP430/MSP430ISelLowering.cpp
 1305   const Value *SV = cast<SrcValueSDNode>(Op.getOperand(2))->getValue();
lib/Target/Mips/Mips16HardFloat.cpp
   48   std::vector<Value *> AsmArgs;
  385         Value *RVal = RI->getReturnValue();
  403         Value *Params[] = {RVal};
lib/Target/Mips/MipsCallLowering.cpp
  414                                    const Value *Val,
lib/Target/Mips/MipsCallLowering.h
   65   bool lowerReturn(MachineIRBuilder &MIRBuilder, const Value *Val,
lib/Target/Mips/MipsDelaySlotFiller.cpp
  189     using ValueType = PointerUnion<const Value *, const PseudoSourceValue *>;
  538   if (const Value *V = MMO.getValue()) {
  539     SmallVector<const Value *, 4> Objs;
  542     for (const Value *UValue : Objs) {
lib/Target/Mips/MipsFastISel.cpp
  175   bool computeAddress(const Value *Obj, Address &Addr);
  176   bool computeCallAddress(const Value *V, Address &Addr);
  199   unsigned getRegEnsuringSimpleIntegerWidening(const Value *, bool IsUnsigned);
  201   unsigned emitLogicalOp(unsigned ISDOpc, MVT RetVT, const Value *LHS,
  202                          const Value *RHS);
  297                                      const Value *LHS, const Value *RHS) {
  297                                      const Value *LHS, const Value *RHS) {
  465 bool MipsFastISel::computeAddress(const Value *Obj, Address &Addr) {
  494       const Value *Op = *i;
  546 bool MipsFastISel::computeCallAddress(const Value *V, Address &Addr) {
  639   const Value *Left = CI->getOperand(0), *Right = CI->getOperand(1);
  915   Value *Op0 = I->getOperand(0);
  999   Value *Src = I->getOperand(0);
 1046   const Value *Cond = SI->getCondition();
 1078   Value *Src = I->getOperand(0);
 1113   Value *Src = I->getOperand(0);
 1157     const Value *ArgVal = CLI.OutVals[VA.getValNo()];
 1499   const Value *Callee = CLI.Callee;
 1529   for (auto *Val : CLI.OutVals) {
 1715     const Value *RV = Ret->getOperand(0);
 1783   Value *Op = I->getOperand(0);
 1806   Value *Src = I->getOperand(0);
 1973   const Value *Op0 = I->getOperand(0);
 2095 unsigned MipsFastISel::getRegEnsuringSimpleIntegerWidening(const Value *V,
lib/Target/Mips/MipsISelLowering.cpp
 2140   const Value *SV = cast<SrcValueSDNode>(Op.getOperand(2))->getValue();
 2152   const Value *SV = cast<SrcValueSDNode>(Node->getOperand(2))->getValue();
 3798   Value *CallOperandVal = info.CallOperandVal;
lib/Target/Mips/MipsOptimizePICCall.cpp
   57 using ValueType = PointerUnion<const Value *, const PseudoSourceValue *>;
lib/Target/NVPTX/NVPTXAsmPrinter.cpp
   99 DiscoverDependentGlobals(const Value *V,
 1739     const Value *v = Cexpr->stripPointerCasts();
 1826           Value *v = Cexpr->getOperand(0)->stripPointerCasts();
 1848           Value *v = Cexpr->getOperand(0)->stripPointerCasts();
 1886       const Value *v = Cexpr->stripPointerCasts();
lib/Target/NVPTX/NVPTXAsmPrinter.h
   87     SmallVector<const Value *, 4> Symbols;
   95     SmallVector<const Value *, 4> SymbolsBeforeStripping;
  132     void addSymbol(const Value *GVar, const Value *GVarBeforeStripping) {
  132     void addSymbol(const Value *GVar, const Value *GVarBeforeStripping) {
  159             const Value *v = Symbols[nSym];
  160             const Value *v0 = SymbolsBeforeStripping[nSym];
lib/Target/NVPTX/NVPTXGenericToNVVM.cpp
   47   Value *remapConstant(Module *M, Function *F, Constant *C,
   49   Value *remapConstantVectorOrConstantAggregate(Module *M, Function *F,
   52   Value *remapConstantExpr(Module *M, Function *F, ConstantExpr *C,
   56   typedef ValueMap<Constant *, Value *> ConstantToValueMapTy;
  112           Value *Operand = II->getOperand(i);
  156 Value *GenericToNVVM::remapConstant(Module *M, Function *F, Constant *C,
  165   Value *NewValue = C;
  195 Value *GenericToNVVM::remapConstantVectorOrConstantAggregate(
  198   SmallVector<Value *, 4> NewOperands;
  204     Value *Operand = C->getOperand(i);
  205     Value *NewOperand = remapConstant(M, F, cast<Constant>(Operand), Builder);
  218   Value *NewValue = UndefValue::get(C->getType());
  221       Value *Idx = ConstantInt::get(Type::getInt32Ty(M->getContext()), i);
  234 Value *GenericToNVVM::remapConstantExpr(Module *M, Function *F, ConstantExpr *C,
  237   SmallVector<Value *, 4> NewOperands;
  243     Value *Operand = C->getOperand(i);
  244     Value *NewOperand = remapConstant(M, F, cast<Constant>(Operand), Builder);
lib/Target/NVPTX/NVPTXISelDAGToDAG.cpp
  656   const Value *Src = N->getMemOperand()->getValue();
  705   SmallVector<const Value *, 8> Objs;
 3676   const Value *Src = nullptr;
lib/Target/NVPTX/NVPTXISelLowering.cpp
 1380   const Value *DirectCallee = CS.getCalledFunction();
 1394       const Value *CalleeV = cast<CallInst>(CalleeI)->getCalledValue();
 2440 static bool isImageOrSamplerVal(const Value *arg, const Module *context) {
 2589           Value *srcValue = Constant::getNullValue(PointerType::get(
lib/Target/NVPTX/NVPTXImageOptimizer.cpp
   41   Value *cleanupValue(Value *V);
   41   Value *cleanupValue(Value *V);
   93   Value *TexHandle = cleanupValue(I.getOperand(0));
  109   Value *TexHandle = cleanupValue(I.getOperand(0));
  128   Value *TexHandle = cleanupValue(I.getOperand(0));
  169 Value *NVPTXImageOptimizer::cleanupValue(Value *V) {
  169 Value *NVPTXImageOptimizer::cleanupValue(Value *V) {
lib/Target/NVPTX/NVPTXLowerAggrCopies.cpp
  107     Value *SrcAddr = LI->getOperand(0);
  108     Value *DstAddr = SI->getOperand(1);
lib/Target/NVPTX/NVPTXLowerAlloca.cpp
   82         for (Value::use_iterator UI = allocaInst->use_begin(),
lib/Target/NVPTX/NVPTXLowerArgs.cpp
  121   void markPointerAsGlobal(Value *Ptr);
  170   Value *ArgInParam = new AddrSpaceCastInst(
  178 void NVPTXLowerArgs::markPointerAsGlobal(Value *Ptr) {
  198   Value *PtrInGeneric = new AddrSpaceCastInst(PtrInGlobal, Ptr->getType(),
  215             Value *UO = GetUnderlyingObject(LI->getPointerOperand(),
lib/Target/NVPTX/NVPTXTargetTransformInfo.cpp
   70 bool NVPTXTTIImpl::isSourceOfDivergence(const Value *V) {
  116     TTI::OperandValueProperties Opd2PropInfo, ArrayRef<const Value *> Args) {
lib/Target/NVPTX/NVPTXTargetTransformInfo.h
   45   bool isSourceOfDivergence(const Value *V);
   94       ArrayRef<const Value *> Args = ArrayRef<const Value *>());
lib/Target/NVPTX/NVPTXUtilities.cpp
  133 bool isTexture(const Value &val) {
  144 bool isSurface(const Value &val) {
  155 bool isSampler(const Value &val) {
  176 bool isImageReadOnly(const Value &val) {
  188 bool isImageWriteOnly(const Value &val) {
  200 bool isImageReadWrite(const Value &val) {
  212 bool isImage(const Value &val) {
  216 bool isManaged(const Value &val) {
  227 std::string getTextureName(const Value &val) {
  232 std::string getSurfaceName(const Value &val) {
  237 std::string getSamplerName(const Value &val) {
lib/Target/NVPTX/NVPTXUtilities.h
   34 bool isTexture(const Value &);
   35 bool isSurface(const Value &);
   36 bool isSampler(const Value &);
   37 bool isImage(const Value &);
   38 bool isImageReadOnly(const Value &);
   39 bool isImageWriteOnly(const Value &);
   40 bool isImageReadWrite(const Value &);
   41 bool isManaged(const Value &);
   43 std::string getTextureName(const Value &);
   44 std::string getSurfaceName(const Value &);
   45 std::string getSamplerName(const Value &);
lib/Target/NVPTX/NVVMReflect.cpp
  129     const Value *Str = Call->getArgOperand(0);
  138     const Value *Sym = GEP->getOperand(0);
  142     const Value *Operand = cast<Constant>(Sym)->getOperand(0);
lib/Target/PowerPC/PPCBoolRetToInt.cpp
   72   static SmallPtrSet<Value *, 8> findAllDefs(Value *V) {
   73     SmallPtrSet<Value *, 8> Defs;
   74     SmallVector<Value *, 8> WorkList;
   78       Value *Curr = WorkList.back();
   92   Value *translate(Value *V) {
   92   Value *translate(Value *V) {
  101       Value *Zero = Constant::getNullValue(IntTy);
  178   typedef DenseMap<Value *, Value *> B2IMap;
  178   typedef DenseMap<Value *, Value *> B2IMap;
  223     if (llvm::none_of(Defs, isa<Instruction, Value *>))
  229     for (Value *V : Defs)
  234     for (Value *V : Defs)
  245     for (Value *V : Defs)
  262     Value *IntRetVal = BoolToIntMap[U];
  265     Value *BackToBool = new TruncInst(IntRetVal, Int1Ty, "backToBool", I);
lib/Target/PowerPC/PPCFastISel.cpp
  147     bool isValueAvailable(const Value *V) const;
  162     bool PPCEmitCmp(const Value *Src1Value, const Value *Src2Value,
  162     bool PPCEmitCmp(const Value *Src1Value, const Value *Src2Value,
  169     bool PPCComputeAddress(const Value *Obj, Address &Addr);
  188     bool processCallArgs(SmallVectorImpl<Value*> &Args,
  300 bool PPCFastISel::isValueAvailable(const Value *V) const {
  310 bool PPCFastISel::PPCComputeAddress(const Value *Obj, Address &Addr) {
  352         const Value *Op = *II;
  740   Value *Op0 = I->getOperand(0);
  821 bool PPCFastISel::PPCEmitCmp(const Value *SrcValue1, const Value *SrcValue2,
  821 bool PPCFastISel::PPCEmitCmp(const Value *SrcValue1, const Value *SrcValue2,
  959   Value *Src  = I->getOperand(0);
  977   Value *Src  = I->getOperand(0);
 1073   Value *Src = I->getOperand(0);
 1203   Value *Src = I->getOperand(0);
 1374 bool PPCFastISel::processCallArgs(SmallVectorImpl<Value*> &Args,
 1553   const Value *Callee = CLI.Callee;
 1598   SmallVector<Value*, 8> Args;
 1616     Value *ArgValue = CLI.OutVals[i];
 1709     const Value *RV = Ret->getOperand(0);
 1874   Value *Src  = I->getOperand(0);
 1899   Value *Src = I->getOperand(0);
lib/Target/PowerPC/PPCHazardRecognizers.cpp
  299   const Value *LoadValue) const {
lib/Target/PowerPC/PPCHazardRecognizers.h
   71   const Value *StoreValue[4];
   95                              const Value *LoadValue) const;
lib/Target/PowerPC/PPCISelLowering.cpp
 3035   const Value *SV = cast<SrcValueSDNode>(Node->getOperand(2))->getValue();
 3191     const Value *SV = cast<SrcValueSDNode>(Op.getOperand(2))->getValue();
 3236   const Value *SV = cast<SrcValueSDNode>(Op.getOperand(2))->getValue();
 4590     const Value* CalleeArg = *CalleeArgIter;
 4591     const Value* CallerArg = &(*CallerArgIter);
14253   Value *CallOperandVal = info.CallOperandVal;
15451   const Value *Mask = AndI.getOperand(1);
lib/Target/PowerPC/PPCLoopPreIncPrep.cpp
  165 static bool IsPtrInBounds(Value *BasePtr) {
  166   Value *StrippedBasePtr = BasePtr;
  175 static std::string getInstrName(const Value *I, const std::string Suffix) {
  183 static Value *GetPointerOperand(Value *MemI) {
  183 static Value *GetPointerOperand(Value *MemI) {
  246       Value *PtrValue;
  341   Value *BasePtr = GetPointerOperand(MemI);
  375   Value *BasePtrStart = SCEVE.expandCodeFor(BasePtrStartSCEV, I8PtrTy,
  413   SmallPtrSet<Value *, 16> NewPtrs;
  418     Value *Ptr = GetPointerOperand(I->Instr);
lib/Target/PowerPC/PPCTargetTransformInfo.cpp
  206                                  ArrayRef<const Value *> Operands) {
  236   std::function<bool(const Value*)> memAddrUsesCTR =
  488     for (Value *Operand : J->operands())
  507     SmallPtrSet<const Value *, 32> EphValues;
  726     TTI::OperandValueProperties Opd2PropInfo, ArrayRef<const Value *> Args) {
lib/Target/PowerPC/PPCTargetTransformInfo.h
   53   unsigned getUserCost(const User *U, ArrayRef<const Value *> Operands);
   93       ArrayRef<const Value *> Args = ArrayRef<const Value *>());
lib/Target/RISCV/RISCVCallLowering.cpp
   25                                     const Value *Val,
lib/Target/RISCV/RISCVCallLowering.h
   30   bool lowerReturn(MachineIRBuilder &MIRBuiler, const Value *Val,
lib/Target/RISCV/RISCVISelLowering.cpp
  663   const Value *SV = cast<SrcValueSDNode>(Op.getOperand(2))->getValue();
 2804 Value *RISCVTargetLowering::emitMaskedAtomicRMWIntrinsic(
 2805     IRBuilder<> &Builder, AtomicRMWInst *AI, Value *AlignedAddr, Value *Incr,
 2805     IRBuilder<> &Builder, AtomicRMWInst *AI, Value *AlignedAddr, Value *Incr,
 2806     Value *Mask, Value *ShiftAmt, AtomicOrdering Ord) const {
 2806     Value *Mask, Value *ShiftAmt, AtomicOrdering Ord) const {
 2808   Value *Ordering =
 2821   Value *Result;
 2833     Value *SextShamt =
 2856 Value *RISCVTargetLowering::emitMaskedAtomicCmpXchgIntrinsic(
 2857     IRBuilder<> &Builder, AtomicCmpXchgInst *CI, Value *AlignedAddr,
 2858     Value *CmpVal, Value *NewVal, Value *Mask, AtomicOrdering Ord) const {
 2858     Value *CmpVal, Value *NewVal, Value *Mask, AtomicOrdering Ord) const {
 2858     Value *CmpVal, Value *NewVal, Value *Mask, AtomicOrdering Ord) const {
 2860   Value *Ordering = Builder.getIntN(XLen, static_cast<uint64_t>(Ord));
 2871   Value *Result = Builder.CreateCall(
lib/Target/RISCV/RISCVISelLowering.h
  203   virtual Value *emitMaskedAtomicRMWIntrinsic(
  204       IRBuilder<> &Builder, AtomicRMWInst *AI, Value *AlignedAddr, Value *Incr,
  204       IRBuilder<> &Builder, AtomicRMWInst *AI, Value *AlignedAddr, Value *Incr,
  205       Value *Mask, Value *ShiftAmt, AtomicOrdering Ord) const override;
  205       Value *Mask, Value *ShiftAmt, AtomicOrdering Ord) const override;
  208   virtual Value *
  210                                    Value *AlignedAddr, Value *CmpVal,
  210                                    Value *AlignedAddr, Value *CmpVal,
  211                                    Value *NewVal, Value *Mask,
  211                                    Value *NewVal, Value *Mask,
lib/Target/Sparc/SparcISelLowering.cpp
 2515   const Value *SV = cast<SrcValueSDNode>(Op.getOperand(2))->getValue();
 2526   const Value *SV = cast<SrcValueSDNode>(Node->getOperand(2))->getValue();
 3199   Value *CallOperandVal = info.CallOperandVal;
lib/Target/SystemZ/SystemZISelDAGToDAG.cpp
 1416   const Value *V1 = Load->getMemOperand()->getValue();
 1417   const Value *V2 = Store->getMemOperand()->getValue();
lib/Target/SystemZ/SystemZISelLowering.cpp
  885       Value *DataOp = I->getOperand(0);
  988   Value *CallOperandVal = info.CallOperandVal;
 3163   const Value *SV = cast<SrcValueSDNode>(Op.getOperand(2))->getValue();
 3195   const Value *DstSV = cast<SrcValueSDNode>(Op.getOperand(3))->getValue();
 3196   const Value *SrcSV = cast<SrcValueSDNode>(Op.getOperand(4))->getValue();
lib/Target/SystemZ/SystemZInstrInfo.cpp
 1764   const Value *VALa = MMOa->getValue();
 1765   const Value *VALb = MMOb->getValue();
lib/Target/SystemZ/SystemZTDC.cpp
   77   MapVector<Instruction *, std::tuple<Value *, int, bool>> ConvertedInsts;
   95   void converted(Instruction *I, Value *V, int Mask, bool Worthy) {
  122   Value *Op0 = I.getOperand(0);
  232   Value *Op0 = I.getOperand(0);
  244     Value *V = Cast->getOperand(0);
  265     Value *V = CI->getArgOperand(0);
  287   Value *Op0, *Op1;
  345   Value *Zero32 = ConstantInt::get(Type::getInt32Ty(Ctx), 0);
  349     Value *V;
  361       Value *MaskVal = ConstantInt::get(Type::getInt64Ty(Ctx), Mask);
  363       Value *ICmp = IRB.CreateICmp(CmpInst::ICMP_NE, TDC, Zero32);
lib/Target/SystemZ/SystemZTargetTransformInfo.cpp
  355     ArrayRef<const Value *> Args) {
  473         for (const Value *A : Args) {
  483         for (const Value *A : Args) {
  800   for (Value *Op : I->operands())
  988 static bool isBswapIntrinsicCall(const Value *V) {
 1044       const Value *StoredVal = SI->getValueOperand();
 1130                                           ArrayRef<Value *> Args,
lib/Target/SystemZ/SystemZTargetTransformInfo.h
   78       ArrayRef<const Value *> Args = ArrayRef<const Value *>());
  102                             ArrayRef<Value *> Args, FastMathFlags FMF,
lib/Target/WebAssembly/WebAssemblyFastISel.cpp
  153   bool computeAddress(const Value *Obj, Address &Addr);
  157   unsigned maskI1Value(unsigned Reg, const Value *V);
  158   unsigned getRegForI1Value(const Value *V, bool &Not);
  159   unsigned zeroExtendToI32(unsigned Reg, const Value *V,
  161   unsigned signExtendToI32(unsigned Reg, const Value *V,
  163   unsigned zeroExtend(unsigned Reg, const Value *V, MVT::SimpleValueType From,
  165   unsigned signExtend(unsigned Reg, const Value *V, MVT::SimpleValueType From,
  167   unsigned getRegForUnsignedValue(const Value *V);
  168   unsigned getRegForSignedValue(const Value *V);
  169   unsigned getRegForPromotedValue(const Value *V, bool IsSigned);
  209 bool WebAssemblyFastISel::computeAddress(const Value *Obj, Address &Addr) {
  272       const Value *Op = GTI.getOperand();
  334     const Value *LHS = U->getOperand(0);
  335     const Value *RHS = U->getOperand(1);
  357     const Value *LHS = U->getOperand(0);
  358     const Value *RHS = U->getOperand(1);
  415 unsigned WebAssemblyFastISel::maskI1Value(unsigned Reg, const Value *V) {
  419 unsigned WebAssemblyFastISel::getRegForI1Value(const Value *V, bool &Not) {
  427   Value *NotV;
  440 unsigned WebAssemblyFastISel::zeroExtendToI32(unsigned Reg, const Value *V,
  476 unsigned WebAssemblyFastISel::signExtendToI32(unsigned Reg, const Value *V,
  512 unsigned WebAssemblyFastISel::zeroExtend(unsigned Reg, const Value *V,
  534 unsigned WebAssemblyFastISel::signExtend(unsigned Reg, const Value *V,
  556 unsigned WebAssemblyFastISel::getRegForUnsignedValue(const Value *V) {
  565 unsigned WebAssemblyFastISel::getRegForSignedValue(const Value *V) {
  574 unsigned WebAssemblyFastISel::getRegForPromotedValue(const Value *V,
  834     Value *V = Call->getArgOperand(I);
  968   const Value *Op = ZExt->getOperand(0);
  985   const Value *Op = SExt->getOperand(0);
 1313   Value *RV = Ret->getOperand(0);
lib/Target/WebAssembly/WebAssemblyFixFunctionBitcasts.cpp
   67 static void findUses(Value *V, Function &F,
   80       Value *Callee = CS.getCalledValue();
  127   SmallVector<Value *, 4> Args;
  263         Value *Args[] = {UndefValue::get(MainArgTys[0]),
  265         Value *Casted =
lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
 1189   const Value *SV = cast<SrcValueSDNode>(Op.getOperand(2))->getValue();
lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp
  260   template <typename CallOrInvoke> Value *wrapInvoke(CallOrInvoke *CI);
  261   void wrapTestSetjmp(BasicBlock *BB, Instruction *InsertPt, Value *Threw,
  262                       Value *SetjmpTable, Value *SetjmpTableSize, Value *&Label,
  262                       Value *SetjmpTable, Value *SetjmpTableSize, Value *&Label,
  262                       Value *SetjmpTable, Value *SetjmpTableSize, Value *&Label,
  263                       Value *&LongjmpResult, BasicBlock *&EndBB);
  267   bool canLongjmp(Module &M, const Value *Callee) const;
  268   bool isEmAsmCall(Module &M, const Value *Callee) const;
  297 static bool canThrow(const Value *V) {
  374 Value *WebAssemblyLowerEmscriptenEHSjLj::wrapInvoke(CallOrInvoke *CI) {
  394   SmallVector<Value *, 16> Args;
  438   Value *Threw =
  449   Value *Callee = CI->getCalledValue();
  476                                                   const Value *Callee) const {
  515                                                    const Value *Callee) const {
  540     BasicBlock *BB, Instruction *InsertPt, Value *Threw, Value *SetjmpTable,
  540     BasicBlock *BB, Instruction *InsertPt, Value *Threw, Value *SetjmpTable,
  541     Value *SetjmpTableSize, Value *&Label, Value *&LongjmpResult,
  541     Value *SetjmpTableSize, Value *&Label, Value *&LongjmpResult,
  541     Value *SetjmpTableSize, Value *&Label, Value *&LongjmpResult,
  553   Value *ThrewCmp = IRB.CreateICmpNE(Threw, IRB.getInt32(0));
  554   Value *ThrewValue = IRB.CreateLoad(IRB.getInt32Ty(), ThrewValueGV,
  556   Value *ThrewValueCmp = IRB.CreateICmpNE(ThrewValue, IRB.getInt32(0));
  557   Value *Cmp1 = IRB.CreateAnd(ThrewCmp, ThrewValueCmp, "cmp1");
  565   Value *ThrewInt = IRB.CreateIntToPtr(Threw, Type::getInt32PtrTy(C),
  567   Value *LoadedThrew = IRB.CreateLoad(IRB.getInt32Ty(), ThrewInt,
  569   Value *ThenLabel = IRB.CreateCall(
  571   Value *Cmp2 = IRB.CreateICmpEQ(ThenLabel, IRB.getInt32(0));
  760       Value *Threw = wrapInvoke(II);
  764       Value *Cmp = IRB.CreateICmpEQ(Threw, IRB.getInt32(1), "cmp");
  770       SmallVector<Value *, 16> Args(II->arg_begin(), II->arg_end());
  796       Value *Input = RI->getValue();
  798       Value *Low = IRB.CreateExtractValue(Input, 0, "low");
  838     SmallVector<Value *, 16> FMCArgs;
  847           Value *EV = IRB.CreateExtractValue(Clause, makeArrayRef(J), "filter");
  857     Value *Undef = UndefValue::get(LPI->getType());
  858     Value *Pair0 = IRB.CreateInsertValue(Undef, FMCI, 0, "pair0");
  859     Value *TempRet0 = IRB.CreateCall(GetTempRet0Func, None, "tempret0");
  860     Value *Pair1 = IRB.CreateInsertValue(Pair0, TempRet0, 1, "pair1");
  935     Value *Args[] = {CI->getArgOperand(0), IRB.getInt32(SetjmpRetPHIs.size()),
  965       const Value *Callee = CI->getCalledValue();
  975       Value *Threw = nullptr;
 1023       Value *Label = nullptr;
 1024       Value *LongjmpResult = nullptr;
lib/Target/WebAssembly/WebAssemblyLowerGlobalDtors.cpp
   82   for (Value *O : InitList->operands()) {
  165       Value *Null = ConstantPointerNull::get(VoidStar);
  166       Value *Args[] = {CallDtors, Null, DsoHandle};
  167       Value *Res = CallInst::Create(AtExit, Args, "call", EntryBB);
  168       Value *Cmp = new ICmpInst(*EntryBB, ICmpInst::ICMP_NE, Res,
lib/Target/WebAssembly/WebAssemblyOptimizeReturned.cpp
   62       Value *Arg = CS.getArgOperand(I);
lib/Target/WebAssembly/WebAssemblyTargetTransformInfo.cpp
   49     TTI::OperandValueProperties Opd2PropInfo, ArrayRef<const Value *> Args) {
lib/Target/WebAssembly/WebAssemblyTargetTransformInfo.h
   64       ArrayRef<const Value *> Args = ArrayRef<const Value *>());
lib/Target/X86/X86CallLowering.cpp
  188     MachineIRBuilder &MIRBuilder, const Value *Val,
lib/Target/X86/X86CallLowering.h
   31   bool lowerReturn(MachineIRBuilder &MIRBuilder, const Value *Val,
lib/Target/X86/X86FastISel.cpp
   84   bool X86FastEmitCompare(const Value *LHS, const Value *RHS, EVT VT,
   84   bool X86FastEmitCompare(const Value *LHS, const Value *RHS, EVT VT,
   90   bool X86FastEmitStore(EVT VT, const Value *Val, X86AddressMode &AM,
   99   bool X86SelectAddress(const Value *V, X86AddressMode &AM);
  100   bool X86SelectCallAddress(const Value *V, X86AddressMode &AM);
  146   bool handleConstantAddresses(const Value *V, X86AddressMode &AM);
  172                             const Value *Cond);
  238                                        const Value *Cond) {
  656 bool X86FastISel::X86FastEmitStore(EVT VT, const Value *Val,
  716 bool X86FastISel::handleConstantAddresses(const Value *V, X86AddressMode &AM) {
  763       DenseMap<const Value *, unsigned>::iterator I = LocalValueMap.find(V);
  828 bool X86FastISel::X86SelectAddress(const Value *V, X86AddressMode &AM) {
  829   SmallVector<const Value *, 32> GEPs;
  910       const Value *Op = *i;
  973     for (const Value *I : reverse(GEPs))
  989 bool X86FastISel::X86SelectCallAddress(const Value *V, X86AddressMode &AM) {
 1108   const Value *PtrV = I->getOperand(1);
 1123   const Value *Val = S->getValueOperand();
 1124   const Value *Ptr = S->getPointerOperand();
 1197     const Value *RV = Ret->getOperand(0);
 1299   const Value *SV = I->getOperand(0);
 1318   const Value *Ptr = LI->getPointerOperand();
 1392 bool X86FastISel::X86FastEmitCompare(const Value *Op0, const Value *Op1, EVT VT,
 1392 bool X86FastISel::X86FastEmitCompare(const Value *Op0, const Value *Op1, EVT VT,
 1460   const Value *LHS = CI->getOperand(0);
 1461   const Value *RHS = CI->getOperand(1);
 1647       const Value *CmpLHS = CI->getOperand(0);
 1648       const Value *CmpRHS = CI->getOperand(1);
 2023   const Value *Cond = I->getOperand(0);
 2057     const Value *CmpLHS = CI->getOperand(0);
 2058     const Value *CmpRHS = CI->getOperand(1);
 2121   const Value *LHS = I->getOperand(1);
 2122   const Value *RHS = I->getOperand(2);
 2159   const Value *CmpLHS = CI->getOperand(0);
 2160   const Value *CmpRHS = CI->getOperand(1);
 2181   const Value *LHS = I->getOperand(1);
 2182   const Value *RHS = I->getOperand(2);
 2296   const Value *Cond = I->getOperand(0);
 2309     const Value *CmpLHS = CI->getOperand(0);
 2310     const Value *CmpRHS = CI->getOperand(1);
 2339   const Value *LHS = I->getOperand(1);
 2340   const Value *RHS = I->getOperand(2);
 2367     const Value *Opnd = nullptr;
 2609     const Value *Op = II->getArgOperand(0);
 2771     const Value *Op1 = II->getArgOperand(0); // The guard's value.
 2831     const Value *SrcVal = II->getArgOperand(0);
 2880     const Value *LHS = II->getArgOperand(0);
 2881     const Value *RHS = II->getArgOperand(1);
 3029     const Value *Op = II->getArgOperand(0);
 3031       const Value *Index = IE->getOperand(2);
 3182   const Value *Callee = CLI.Callee;
 3255     Value *&Val = OutVals[i];
 3274       Value *PrevVal = TI->getOperand(0);
 3320     const Value *ArgVal = OutVals[VA.getValNo()];
 3926   const Value *Ptr = LI->getPointerOperand();
lib/Target/X86/X86ISelLowering.cpp
 2298 Value *X86TargetLowering::getIRStackGuard(IRBuilder<> &IRB) const {
 2341 Value *X86TargetLowering::getSDagStackGuard(const Module &M) const {
 2359 Value *X86TargetLowering::getSafeStackPointerLocation(IRBuilder<> &IRB) const {
18033   Value *Ptr = Constant::getNullValue(Type::getInt8PtrTy(*DAG.getContext(),
18175     Value *Ptr = Constant::getNullValue(Subtarget.is64Bit()
22280   const Value *SV = cast<SrcValueSDNode>(Op.getOperand(2))->getValue();
22344   const Value *SV = cast<SrcValueSDNode>(Op.getOperand(2))->getValue();
22404   const Value *DstSV = cast<SrcValueSDNode>(Op.getOperand(3))->getValue();
22405   const Value *SrcSV = cast<SrcValueSDNode>(Op.getOperand(4))->getValue();
24378   const Value *TrmpAddr = cast<SrcValueSDNode>(Op.getOperand(4))->getValue();
38977     const Value *MemOp = Ld->getMemOperand()->getValue();
45425   Value *CallOperandVal = info.CallOperandVal;
lib/Target/X86/X86ISelLowering.h
 1190     Value *getIRStackGuard(IRBuilder<> &IRB) const override;
 1195     Value *getSDagStackGuard(const Module &M) const override;
 1204     Value *getSafeStackPointerLocation(IRBuilder<> &IRB) const override;
lib/Target/X86/X86InterleavedAccess.cpp
   89                      SmallVectorImpl<Value *> &TransposedMatrix);
   91                              SmallVectorImpl<Value *> &TransposedMatrix,
   94                                 SmallVectorImpl<Value *> &TransposedMatrix);
   96                              SmallVectorImpl<Value *> &TransposedMatrix,
   99                                SmallVectorImpl<Value *> &TransposedMatrix,
  181     Value *Op0 = SVI->getOperand(0);
  182     Value *Op1 = SVI->getOperand(1);
  197   Value *VecBasePtr;
  216     Value *NewBasePtr =
  284 static void reorderSubVector(MVT VT, SmallVectorImpl<Value *> &TransposedMatrix,
  285   ArrayRef<Value *> Vec, ArrayRef<uint32_t> VPShuf,
  297   Value *Temp[8];
  319     SmallVectorImpl<Value *> &TransposedMatrix) {
  343   Value *IntrVec1Low =
  345   Value *IntrVec2Low =
  358     ArrayRef<Instruction *> Matrix, SmallVectorImpl<Value *> &TransposedMatrix,
  394   Value *IntrVec[4];
  406   Value *VecOut[4];
  521 static void concatSubVector(Value **Vec, ArrayRef<Instruction *> InVec,
  542     ArrayRef<Instruction *> InVec, SmallVectorImpl<Value *> &TransposedMatrix,
  555   Value *Vec[6], *TempVector[3];
  597   Value *TempVec = Builder.CreateShuffleVector(
  628     ArrayRef<Instruction *> InVec, SmallVectorImpl<Value *> &TransposedMatrix,
  642   Value *Vec[3], *TempVector[3];
  690     SmallVectorImpl<Value *> &TransposedMatrix) {
  697   Value *IntrVec1 = Builder.CreateShuffleVector(Matrix[0], Matrix[2], Mask);
  698   Value *IntrVec2 = Builder.CreateShuffleVector(Matrix[1], Matrix[3], Mask);
  703   Value *IntrVec3 = Builder.CreateShuffleVector(Matrix[0], Matrix[2], Mask);
  704   Value *IntrVec4 = Builder.CreateShuffleVector(Matrix[1], Matrix[3], Mask);
  723   SmallVector<Value *, 4> TransposedVectors;
  792   Value *WideVec = concatenateVectors(Builder, TransposedVectors);
lib/Target/X86/X86TargetTransformInfo.cpp
  177     ArrayRef<const Value *> Args) {
 2282                                       ArrayRef<Value *> Args, FastMathFlags FMF,
 3093                                  ArrayRef<const Value *> Operands) {
 3095     Value *Ptr = U->getOperand(1);
 3108 int X86TTIImpl::getGSVectorCost(unsigned Opcode, Type *SrcVTy, Value *Ptr,
 3126     Value *Ptrs = GEP->getPointerOperand();
 3217                                        Value *Ptr, bool VariableMask,
lib/Target/X86/X86TargetTransformInfo.h
  130       ArrayRef<const Value *> Args = ArrayRef<const Value *>());
  141   int getGatherScatterOpCost(unsigned Opcode, Type *DataTy, Value *Ptr,
  152                             ArrayRef<Value *> Args, FastMathFlags FMF,
  181   unsigned getUserCost(const User *U, ArrayRef<const Value *> Operands);
  210   int getGSVectorCost(unsigned Opcode, Type *DataTy, Value *Ptr,
lib/Target/X86/X86WinEHState.cpp
   65   Value *emitEHLSDA(IRBuilder<> &Builder, Function *F);
   71                              Value *State);
  109   Value *Link = nullptr;
  289     Value *SP = Builder.CreateCall(
  319     Value *SP = Builder.CreateCall(
  327     Value *LSDA = emitEHLSDA(Builder, F);
  333       Value *Val = Builder.CreateLoad(Int32Ty, Cookie, "cookie");
  340       Value *Val = Builder.CreateLoad(Int32Ty, Cookie);
  341       Value *FrameAddr = Builder.CreateCall(
  347       Value *FrameAddrI32 = Builder.CreatePtrToInt(FrameAddr, Int32Ty);
  376 Value *WinEHStatePass::emitEHLSDA(IRBuilder<> &Builder, Function *F) {
  377   Value *FI8 = Builder.CreateBitCast(F, Type::getInt8PtrTy(F->getContext()));
  410   Value *LSDA = emitEHLSDA(Builder, ParentFunc);
  411   Value *CastPersonality =
  414   Value *Args[5] = {LSDA, &*AI++, &*AI++, &*AI++, &*AI++};
  431   Value *HandlerI8 = Builder.CreateBitCast(Handler, Builder.getInt8PtrTy());
  436   Value *Next = Builder.CreateLoad(LinkTy->getPointerTo(), FSZero);
  451   Value *Next = Builder.CreateLoad(LinkTy->getPointerTo(),
  463                                            CallSite CS, Value *State) {
  473   SmallVector<Value *, 3> OptionalArgs;
  487   SmallVector<Value *, 5> Args;
  641   Value *RegNodeI8 = Builder.CreateBitCast(RegNode, Builder.getInt8PtrTy());
  648     Value *EHGuardNodeI8 =
  783     Value *State;
  785       Value *StateField = Builder.CreateStructGEP(RegNode->getAllocatedType(),
  797   Value *StateField = Builder.CreateStructGEP(RegNode->getAllocatedType(),
lib/Target/XCore/XCoreISelLowering.cpp
  743   const Value *SV = cast<SrcValueSDNode>(Node->getOperand(2))->getValue();
  866   const Value *TrmpAddr = cast<SrcValueSDNode>(Op.getOperand(4))->getValue();
lib/Target/XCore/XCoreLowerThreadLocal.cpp
   82       SmallVector<Value *,4> CEOpVec(CE->op_begin(), CE->op_end());
   83       ArrayRef<Value *> CEOps(CEOpVec);
  210     Value *ThreadID = Builder.CreateCall(GetID, {});
  211     Value *Addr = Builder.CreateInBoundsGEP(NewGV->getValueType(), NewGV,
lib/Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp
   78     Value *L0, *L1, *R0, *R1;
  107   Value *P0 = Phi.getOperand(0), *P1 = Phi.getOperand(1);
  108   Value *RotSrc, *RotAmt;
  158   Value *Root;
  175 static bool matchAndOrChain(Value *V, MaskOps &MOps) {
  176   Value *Op0, *Op1;
  195   Value *Candidate;
  245   Value *And = Builder.CreateAnd(MOps.Root, Mask);
  246   Value *Cmp = MatchAllBitsSet ? Builder.CreateICmpEQ(And, Mask)
  248   Value *Zext = Builder.CreateZExt(Cmp, I.getType());
  283   Value *Op0 = I.getOperand(0);
  284   Value *Op1 = I.getOperand(1);
  285   Value *MulOp0;
  289     Value *ShiftOp0;
  294       Value *AndOp0;
  300         Value *Root, *SubOp1;
lib/Transforms/AggressiveInstCombine/AggressiveInstCombineInternal.h
   70     Value *NewValue = nullptr;
  114   Value *getReducedOperand(Value *V, Type *SclTy);
  114   Value *getReducedOperand(Value *V, Type *SclTy);
lib/Transforms/AggressiveInstCombine/TruncInstCombine.cpp
   41 static void getRelevantOperands(Instruction *I, SmallVectorImpl<Value *> &Ops) {
   65   SmallVector<Value *, 8> Worklist;
   73     Value *Curr = Worklist.back();
  118       SmallVector<Value *, 2> Operands;
  120       for (Value *Operand : Operands)
  138   SmallVector<Value *, 8> Worklist;
  141   Value *Src = CurrentTruncInst->getOperand(0);
  154     Value *Curr = Worklist.back();
  166     SmallVector<Value *, 2> Operands;
  174       for (auto *Operand : Operands)
  189     for (auto *Operand : Operands)
  277 static Type *getReducedType(Value *V, Type *Ty) {
  284 Value *TruncInstCombine::getReducedOperand(Value *V, Type *SclTy) {
  284 Value *TruncInstCombine::getReducedOperand(Value *V, Type *SclTy) {
  308     Value *Res = nullptr;
  349       Value *LHS = getReducedOperand(I->getOperand(0), SclTy);
  350       Value *RHS = getReducedOperand(I->getOperand(1), SclTy);
  363   Value *Res = getReducedOperand(CurrentTruncInst->getOperand(0), SclTy);
lib/Transforms/CFGuard/CFGuard.cpp
   27 using OperandBundleDef = OperandBundleDefT<Value *>;
  166   Value *CalledOperand = CB->getCalledOperand();
  190   Value *CalledOperand = CB->getCalledOperand();
lib/Transforms/Coroutines/CoroCleanup.cpp
   42   Value *FrameRaw = SubFn->getFrame();
   50   auto *FramePtr = Builder.CreateBitCast(FrameRaw, FramePtrTy);
   51   auto *Gep = Builder.CreateConstInBoundsGEP2_32(FrameTy, FramePtr, 0, Index);
lib/Transforms/Coroutines/CoroEarly.cpp
   52   Value *ResumeAddr =
   66   Value *Operand = Intrin->getArgOperand(0);
   79   Value *Replacement =
   91   Value *Operand = II->getArgOperand(0);
  100   auto *BCI = Builder.CreateBitCast(Operand, FramePtrTy);
  102   auto *Cond = Builder.CreateICmpEQ(Load, NullPtr);
  138   auto *NoopCoroVoidPtr = Builder.CreateBitCast(NoopCoro, Int8Ptr);
lib/Transforms/Coroutines/CoroElide.cpp
   69   for (Value *Op : CI->operand_values())
lib/Transforms/Coroutines/CoroFrame.cpp
  290   Value *Def = nullptr;
  295   Spill(Value *Def, llvm::User *U) : Def(Def), User(cast<Instruction>(U)) {}
  297   Value *def() const { return Def; }
  324   Value *CurrentValue = nullptr;
  427   Value *CurrentDef = nullptr;
  596   Value *CurrentValue = nullptr;
  598   Value *CurrentReload = nullptr;
  619     SmallVector<Value *, 3> Indices = {
  644     auto *G = GetFramePointer(Index, CurrentValue);
  715         auto *G = Builder.CreateConstInBoundsGEP2_32(
  766       auto *G = GetFramePointer(P.second, A);
  786         auto *G = GetFramePointer(P.second, A);
  854   Value *ParentPad = nullptr;
  909       Value *V = PN->getIncomingValue(Index);
 1102     Value *StackSave = nullptr;
 1163 static Value *emitGetSwiftErrorValue(IRBuilder<> &Builder, Type *ValueTy,
 1178 static Value *emitSetSwiftErrorValue(IRBuilder<> &Builder, Value *V,
 1178 static Value *emitSetSwiftErrorValue(IRBuilder<> &Builder, Value *V,
 1196 static Value *emitSetAndGetSwiftErrorValueAround(Instruction *Call,
lib/Transforms/Coroutines/CoroInstr.h
   48   Value *getFrame() const { return getArgOperand(FrameArg); }
   64   static bool classof(const Value *V) {
   76   static bool classof(const Value *V) {
  107   static bool classof(const Value *V) {
  118     Value *Arg = getArgOperand(PromiseArg);
  125     Value *Arg = getArgOperand(PromiseArg);
  197   static bool classof(const Value *V) {
  218   Value *getStorage() const {
  245   static bool classof(const Value *V) {
  258   static bool classof(const Value *V) {
  271   static bool classof(const Value *V) {
  283   static bool classof(const Value *V) {
  293   Value *getFrame() const { return getArgOperand(FrameArg); }
  299   static bool classof(const Value *V) {
  313   Value *getMem() const { return getArgOperand(MemArg); }
  319   static bool classof(const Value *V) {
  331   static bool classof(const Value *V) {
  352   static bool classof(const Value *V) {
  366   static bool classof(const Value *V) {
  377     Value *Arg = getArgOperand(SaveArg);
  392   static bool classof(const Value *V) {
  423   static bool classof(const Value *V) {
  435   static bool classof(const Value *V) {
  454   static bool classof(const Value *V) {
  463   Value *getSize() const {
  474   static bool classof(const Value *V) {
  491   static bool classof(const Value *V) {
  508   static bool classof(const Value *V) {
lib/Transforms/Coroutines/CoroInternal.h
   48 void replaceAllCoroFrees(CoroBeginInst *CB, Value *Replacement);
   62   Value *makeSubFnCall(Value *Arg, int Index, Instruction *InsertPt);
   62   Value *makeSubFnCall(Value *Arg, int Index, Instruction *InsertPt);
  226   Value *emitAlloc(IRBuilder<> &Builder, Value *Size, CallGraph *CG) const;
  226   Value *emitAlloc(IRBuilder<> &Builder, Value *Size, CallGraph *CG) const;
  231   void emitDealloc(IRBuilder<> &Builder, Value *Ptr, CallGraph *CG) const;
lib/Transforms/Coroutines/CoroSplit.cpp
  100   Value *NewFramePtr = nullptr;
  101   Value *SwiftErrorSlot = nullptr;
  149   Value *deriveNewFramePointer();
  161                                    Value *FramePtr, CallGraph *CG) {
  172                                       Value *FramePtr, bool InResume,
  204     Value *ReturnValue = ConstantPointerNull::get(ContinuationTy);
  222                                  Value *FramePtr, bool InResume, CallGraph *CG){
  249                            Value *FramePtr, bool InResume, CallGraph *CG) {
  283   auto *GepIndex = Builder.CreateStructGEP(
  302       auto *GepIndex = Builder.CreateStructGEP(FrameTy, FramePtr,
  309       auto *GepIndex = Builder.CreateStructGEP(
  382     auto *GepIndex = Builder.CreateStructGEP(Shape.FrameTy, NewFramePtr,
  387     auto *Cond = Builder.CreateIsNull(Load);
  423   SmallVector<Value*, 8> Args;
  449   Value *Agg = UndefValue::get(NewS->getType());
  457   Value *SuspendResult;
  499   Value *CachedSlot = nullptr;
  531     Value *MappedResult;
  610 Value *CoroCloner::deriveNewFramePointer() {
  728   Value *OldFramePtr = VMap[Shape.FramePtr];
  733   auto *NewVFrame = Builder.CreateBitCast(
  735   Value *OldVFrame = cast<Value>(VMap[Shape.CoroBegin]);
  735   Value *OldVFrame = cast<Value>(VMap[Shape.CoroBegin]);
  847   auto *ResumeAddr = Builder.CreateStructGEP(
  852   Value *DestroyOrCleanupFn = DestroyFn;
  861   auto *DestroyAddr = Builder.CreateStructGEP(
  891                           DenseMap<Value *, Value *> &ResolvedValues) {
  891                           DenseMap<Value *, Value *> &ResolvedValues) {
  908   DenseMap<Value *, Value *> ResolvedValues;
  908   DenseMap<Value *, Value *> ResolvedValues;
  925       Value *V = SI->getCondition();
  953       if (auto *CalledValue = Call->getCalledValue())
  984       auto *VFrame = Builder.CreateBitCast(Frame, Builder.getInt8PtrTy());
 1088   auto *Callee = CS.getCalledValue()->stripPointerCasts();
 1118   auto *CalledValue = CS.getCalledValue();
 1202   Value *RawFramePtr;
 1284       auto *CastedContinuation =
 1287       Value *RetV;
 1400   auto *DevirtFnAddr =
lib/Transforms/Coroutines/Coroutines.cpp
  107 Value *coro::LowererBase::makeSubFnCall(Value *Arg, int Index,
  107 Value *coro::LowererBase::makeSubFnCall(Value *Arg, int Index,
  175   Value *Replacement =
  498 Value *coro::Shape::emitAlloc(IRBuilder<> &Builder, Value *Size,
  498 Value *coro::Shape::emitAlloc(IRBuilder<> &Builder, Value *Size,
  519 void coro::Shape::emitDealloc(IRBuilder<> &Builder, Value *Ptr,
  540 static void fail(const Instruction *I, const char *Reason, Value *V) {
  554 static void checkWFRetconPrototype(const AnyCoroIdRetconInst *I, Value *V) {
  590 static void checkWFAlloc(const Instruction *I, Value *V) {
  605 static void checkWFDealloc(const Instruction *I, Value *V) {
  619 static void checkConstantInt(const Instruction *I, Value *V,
lib/Transforms/IPO/ArgumentPromotion.cpp
  241   SmallVector<Value *, 16> Args;
  262         Value *Idxs[2] = {
  266           auto *Idx =
  278         std::vector<Value *> Ops;
  280           Value *V = *AI;
  389       Value *TheAlloca =
  393       Value *Idxs[2] = {ConstantInt::get(Type::getInt32Ty(F->getContext()), 0),
  398         Value *Idx = GetElementPtrInst::Create(
  629       Value *V = LI->getPointerOperand();
  815   SmallPtrSet<Value *, 16> PtrValues;
  823   SmallVector<Value *, 16> WorkList;
  826     Value *V = WorkList.back();
lib/Transforms/IPO/Attributor.cpp
  160     const function_ref<bool(Value &, StateTy &, bool)> &VisitValueCB,
  171   SmallPtrSet<Value *, 16> Visited;
  172   SmallVector<Value *, 16> Worklist;
  177     Value *V = Worklist.pop_back_val();
  190     Value *NewV = nullptr;
  285 static const Value *getPointerOperand(const Instruction *I) {
  304 static const Value *getBasePointerOfAccessPointerOperand(const Instruction *I,
  307   const Value *Ptr = getPointerOperand(I);
  850   MapVector<Value *, SmallSetVector<ReturnInst *, 4>> ReturnedValues;
  933   Optional<Value *> getAssumedUniqueReturnValue(Attributor &A) const;
  937       const function_ref<bool(Value &, const SmallSetVector<ReturnInst *, 4> &)>
  971   Optional<Value *> UniqueRV = getAssumedUniqueReturnValue(A);
  994     Value &AnchorValue = getAnchorValue();
 1024 Optional<Value *>
 1031   Optional<Value *> UniqueRV;
 1057     const function_ref<bool(Value &, const SmallSetVector<ReturnInst *, 4> &)>
 1065     Value *RV = It.first;
 1171       Value *RetVal = RetValAAIt.first;
 1198       Value *RetVal = RetValAAIt.first;
 1524     Attributor &A, AbstractAttribute &QueryingAA, Value &AssociatedValue,
 1528   const Value *UseV = U->get();
 1554   if (const Value *Base = getBasePointerOfAccessPointerOperand(I, Offset, DL)) {
 1563   if (const Value *Base =
 1627     const Value &V = IRP.getAssociatedValue();
 1921     Value &Val = getAssociatedValue();
 1971     const Value &V = getAssociatedValue();
 2002       const Value *ArgOp = ICS.getArgOperand(i);
 2536       const Value *Base =
 2702     Value &AnchorVal = getIRPosition().getAnchorValue();
 3027                       SmallVectorImpl<const Value *> &PotentialCopies,
 3034   bool valueMayBeCaptured(const Value *V) {
 3048   bool isDereferenceableOrNull(Value *O, const DataLayout &DL) override {
 3148   SmallVectorImpl<const Value *> &PotentialCopies;
 3156   const Value *V =
 3216   SmallVector<const Value *, 4> PotentialCopies;
 3321   Optional<Value *> getAssumedSimplifiedValue(Attributor &A) const override {
 3332                              Value &QueryingValue,
 3333                              Optional<Value *> &AccumulatedSimplifiedValue) {
 3339     Optional<Value *> QueryingValueSimplified =
 3348     Value &QueryingValueSimplifiedUnwrapped =
 3375       Value &V = getAssociatedValue();
 3392   Optional<Value *> SimplifiedAssociatedValue;
 3405       if (Value *ArgOp = ACS.getCallArgOperand(getArgNo()))
 3455     Value &V = getAnchorValue();
 3604         Value *Ops[] = {
 4321     const function_ref<bool(Value &, const SmallSetVector<ReturnInst *, 4> &)>
 4344     const function_ref<bool(Value &)> &Pred,
 4889   const Value &AV = Pos.getAssociatedValue();
lib/Transforms/IPO/CalledValuePropagation.cpp
   50 using CVPLatticeKey = PointerIntPair<Value *, 2, IPOGrouping>;
  361   static inline Value *getValueFromLatticeKey(CVPLatticeKey Key) {
lib/Transforms/IPO/ConstantMerge.cpp
   51     Value *Operand = Inits->getOperand(i)->stripPointerCasts();
lib/Transforms/IPO/CrossDSOCFI.cpp
  118   Value &CallSiteTypeId = *(args++);
  120   Value &Addr = *(args++);
  122   Value &CFICheckFailData = *(args++);
  148     Value *Test = IRBTest.CreateCall(
lib/Transforms/IPO/DeadArgumentElimination.cpp
  175   std::vector<Value *> Args;
  176   for (Value::user_iterator I = Fn.user_begin(), E = Fn.user_end(); I != E; ) {
  314       Value *Arg = CS.getArgument(ArgNo);
  466 DeadArgumentEliminationPass::SurveyUses(const Value *V,
  876   std::vector<Value*> Args;
  980         Value *RetVal = UndefValue::get(RetTy);
  983             Value *V;
 1035         Value *RetVal;
 1046           Value *OldRet = RI->getOperand(0);
lib/Transforms/IPO/ExtractGV.cpp
  134           llvm::Value *Declaration;
lib/Transforms/IPO/FunctionAttrs.cpp
  164         Value *Arg = *CI;
  592       Value *RetArg = nullptr;
  597           Value *RetVal = Ret->getReturnValue()->stripPointerCasts();
  610     if (Value *RetArg = FindRetArg()) {
  862   SmallSetVector<Value *, 8> FlowsToReturn;
  868     Value *RetVal = FlowsToReturn[i];
  896         for (Value *IncValue : PN->incoming_values())
  975   SmallSetVector<Value *, 8> FlowsToReturn;
  983     Value *RetVal = FlowsToReturn[i];
lib/Transforms/IPO/GlobalDCE.cpp
  100 void GlobalDCEPass::ComputeDependencies(Value *V,
  245     Value *TypeIdValue = CI->getArgOperand(2);
lib/Transforms/IPO/GlobalOpt.cpp
  159     Value *V, function_ref<TargetLibraryInfo &(Function &)> GetTLI) {
  207   for (Value::user_iterator UI = GV->user_begin(), E = GV->user_end();
  211       Value *V = SI->getValueOperand();
  276     Value *V, Constant *Init, const DataLayout &DL,
  285     Value *UV = WorkList.pop_back_val();
  361 static bool isSafeSROAElementUse(Value *V);
  398 static bool isSafeSROAElementUse(Value *V) {
  564     Value *NewPtr = NewGlobals[Val];
  578         SmallVector<Value*, 8> Idxs;
  614 static bool AllUsesOfValueWillTrapIfNull(const Value *V,
  679 static bool OptimizeAwayTrappingUsesOfValue(Value *V, Constant *NewV) {
  760   for (Value::user_iterator GUI = GV->user_begin(), E = GV->user_end(); GUI != E;){
  815 static void ConstantPropUsersOf(Value *V, const DataLayout &DL,
  817   for (Value::user_iterator UI = V->user_begin(), E = V->user_end(); UI != E; )
  911       Value *LV = new LoadInst(InitBool->getValueType(), InitBool,
 1047     Value *NL =
 1056 static bool LoadUsesSimpleEnoughForHeapSRA(const Value *V,
 1126       Value *InVal = PN->getIncomingValue(op);
 1153 static Value *GetHeapSROAValue(Value *V, unsigned FieldNo,
 1153 static Value *GetHeapSROAValue(Value *V, unsigned FieldNo,
 1154               DenseMap<Value *, std::vector<Value *>> &InsertedScalarizedValues,
 1154               DenseMap<Value *, std::vector<Value *>> &InsertedScalarizedValues,
 1156   std::vector<Value *> &FieldVals = InsertedScalarizedValues[V];
 1163   if (Value *FieldVal = FieldVals[FieldNo])
 1167   Value *Result;
 1171     Value *V = GetHeapSROAValue(LI->getOperand(0), FieldNo,
 1198               DenseMap<Value *, std::vector<Value *>> &InsertedScalarizedValues,
 1198               DenseMap<Value *, std::vector<Value *>> &InsertedScalarizedValues,
 1205     Value *NPtr = GetHeapSROAValue(SCI->getOperand(0), 0,
 1208     Value *New = new ICmpInst(SCI, SCI->getPredicate(), NPtr,
 1223     Value *NewPtr = GetHeapSROAValue(GEPI->getOperand(0), FieldNo,
 1227     SmallVector<Value*, 8> GEPIdx;
 1231     Value *NGEPI = GetElementPtrInst::Create(GEPI->getResultElementType(), NewPtr, GEPIdx,
 1261               DenseMap<Value *, std::vector<Value *>> &InsertedScalarizedValues,
 1261               DenseMap<Value *, std::vector<Value *>> &InsertedScalarizedValues,
 1277                                             Value *NElems, const DataLayout &DL,
 1292   std::vector<Value *> FieldGlobals;
 1293   std::vector<Value *> FieldMallocs;
 1314     Value *NMI = CallInst::CreateMalloc(CI, IntPtrTy, FieldTy,
 1336   Value *RunningOr = new ICmpInst(CI, ICmpInst::ICMP_SLT, CI->getArgOperand(0),
 1339     Value *Cond = new ICmpInst(CI, ICmpInst::ICMP_EQ, FieldMallocs[i],
 1364     Value *GVVal =
 1367     Value *Cmp = new ICmpInst(*NullPtrBlock, ICmpInst::ICMP_NE, GVVal,
 1392   DenseMap<Value *, std::vector<Value *>> InsertedScalarizedValues;
 1392   DenseMap<Value *, std::vector<Value *>> InsertedScalarizedValues;
 1433       Value *InVal = PN->getIncomingValue(i);
 1441   for (DenseMap<Value *, std::vector<Value *>>::iterator
 1441   for (DenseMap<Value *, std::vector<Value *>>::iterator
 1451   for (DenseMap<Value *, std::vector<Value *>>::iterator
 1451   for (DenseMap<Value *, std::vector<Value *>>::iterator
 1501   Value *NElems = getMallocArraySize(CI, DL, TLI, true);
 1541       Value *AllocSize = ConstantInt::get(IntPtrTy, TypeSize);
 1542       Value *NumElements = ConstantInt::get(IntPtrTy, AT->getNumElements());
 1568 optimizeOnceStoredGlobal(GlobalVariable *GV, Value *StoredOnceVal,
 1702       Value *StoreVal;
 1903   SmallVector<Value*,4> UUsers;
 1908     for (auto *UU : UUsers) {
 2594   Value *AStripped = (*A)->stripPointerCasts();
 2595   Value *BStripped = (*B)->stripPointerCasts();
lib/Transforms/IPO/GlobalSplit.cpp
  121     SmallVector<Value *, 4> Ops;
lib/Transforms/IPO/HotColdSplitting.cpp
  307   SetVector<Value *> Inputs, Outputs, Sinks;
lib/Transforms/IPO/IPConstantPropagation.cpp
   85       Value *V = ACS.getCallArgOperand(i);
  134     Value *V = ArgumentConstants[i].first;
  169   SmallVector<Value *,4> RetVals;
  182         Value *RV = RetVals[i];
  187         Value *V;
  239       Value* New = RetVals[0];
  263         Value *New = RetVals[index];
lib/Transforms/IPO/Inliner.cpp
  564         CallSite CS(cast<Value>(&I));
  712           for (Value *Ptr : InlineInfo.InlinedCalls)
lib/Transforms/IPO/LowerTypeTests.cpp
  454   Value *createBitSetTest(IRBuilder<> &B, const TypeIdLowering &TIL,
  455                           Value *BitOffset);
  459   Value *lowerTypeTestCall(Metadata *TypeId, CallInst *CI,
  468                             SmallVectorImpl<Value *> &AsmArgs, Function *Dest);
  494   void replaceCfiUses(Function *Old, Value *New, bool IsJumpTableCanonical);
  498   void replaceDirectCalls(Value *Old, Value *New);
  498   void replaceDirectCalls(Value *Old, Value *New);
  576 static Value *createMaskedBitTest(IRBuilder<> &B, Value *Bits,
  576 static Value *createMaskedBitTest(IRBuilder<> &B, Value *Bits,
  577                                   Value *BitOffset) {
  582   Value *BitIndex =
  584   Value *BitMask = B.CreateShl(ConstantInt::get(BitsType, 1), BitIndex);
  585   Value *MaskedBits = B.CreateAnd(Bits, BitMask);
  660 Value *LowerTypeTestsModule::createBitSetTest(IRBuilder<> &B,
  662                                               Value *BitOffset) {
  678     Value *ByteAddr = B.CreateGEP(Int8Ty, ByteArray, BitOffset);
  679     Value *Byte = B.CreateLoad(Int8Ty, ByteAddr);
  681     Value *ByteAndMask =
  688                                 Value *V, uint64_t COffset) {
  728 Value *LowerTypeTestsModule::lowerTypeTestCall(Metadata *TypeId, CallInst *CI,
  733   Value *Ptr = CI->getArgOperand(0);
  742   Value *PtrAsInt = B.CreatePtrToInt(Ptr, IntPtrTy);
  749   Value *PtrOffset = B.CreateSub(PtrAsInt, OffsetedGlobalAsInt);
  759   Value *OffsetSHR =
  761   Value *OffsetSHL = B.CreateShl(
  767   Value *BitOffset = B.CreateOr(OffsetSHR, OffsetSHL);
  769   Value *OffsetInRange = B.CreateICmpULE(BitOffset, TIL.SizeM1);
  801   Value *Bit = createBitSetTest(ThenB, TIL, BitOffset);
 1037   Value *Lowered = lowerTypeTestCall(TypeIdStr, CI, TIL);
 1161       Value *Lowered = lowerTypeTestCall(TypeId, CI, TIL);
 1212     Triple::ArchType JumpTableArch, SmallVectorImpl<Value *> &AsmArgs,
 1356   SmallVector<Value *, 16> AsmArgs;
 1712 void LowerTypeTestsModule::replaceCfiUses(Function *Old, Value *New,
 1747 void LowerTypeTestsModule::replaceDirectCalls(Value *Old, Value *New) {
 1747 void LowerTypeTestsModule::replaceDirectCalls(Value *Old, Value *New) {
lib/Transforms/IPO/MergeFunctions.cpp
  250   void removeUsers(Value *V);
  483 static Value *createCast(IRBuilder<> &Builder, Value *V, Type *DestTy) {
  483 static Value *createCast(IRBuilder<> &Builder, Value *V, Type *DestTy) {
  488     Value *Result = UndefValue::get(DestTy);
  490       Value *Element = createCast(
  586               if (Value *Arg = SI->getValueOperand()) {
  705   SmallVector<Value *, 16> Args;
  948 void MergeFunctions::removeUsers(Value *V) {
lib/Transforms/IPO/PartialInlining.cpp
 1056     Value *CommonValue = PN->getIncomingValue(0);
 1088     if (auto *OldPhiVal = IsTrivialPhi(OldPhi)) {
 1128   SetVector<Value *> Inputs, Outputs, Sinks;
 1144       for (Value *value : Inputs)
 1146       for (Value *output : Outputs)
lib/Transforms/IPO/StripSymbols.cpp
  132 static bool OnlyUsedBy(Value *V, Value *Usr) {
  132 static bool OnlyUsedBy(Value *V, Value *Usr) {
  143   for (Value *Op : C->operands())
  163     Value *V = VI->getValue();
  259       Value *Arg1 = CI->getArgOperand(0);
  260       Value *Arg2 = CI->getArgOperand(1);
lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp
  192   for (Value *Op : C->operands())
lib/Transforms/IPO/WholeProgramDevirt.cpp
  309   Value *VTable;
  334       Value *New) {
  415   void addCallSite(Value *VTable, CallSite CS, unsigned *NumUnsafeUses);
  435 void VTableSlotInfo::addCallSite(Value *VTable, CallSite CS,
 1065   std::vector<Value *> JTArgs;
 1118       std::vector<Value *> Args;
 1303     Value *Cmp =
 1372     Value *Addr =
 1375       Value *Bits = B.CreateLoad(Int8Ty, Addr);
 1376       Value *BitsAndBit = B.CreateAnd(Bits, Bit);
 1381       Value *ValAddr = B.CreateBitCast(Addr, RetType->getPointerTo());
 1382       Value *Val = B.CreateLoad(RetType, ValAddr);
 1576       Value *Ptr = CI->getArgOperand(0)->stripPointerCasts();
 1609     Value *Ptr = CI->getArgOperand(0);
 1610     Value *Offset = CI->getArgOperand(1);
 1611     Value *TypeIdValue = CI->getArgOperand(2);
 1630     Value *GEP = LoadB.CreateGEP(Int8Ty, Ptr, Offset);
 1631     Value *GEPPtr = LoadB.CreateBitCast(GEP, PointerType::getUnqual(Int8PtrTy));
 1632     Value *LoadedValue = LoadB.CreateLoad(Int8PtrTy, GEPPtr);
 1653       Value *Pair = UndefValue::get(CI->getType());
lib/Transforms/InstCombine/InstCombineAddSub.cpp
   74     Value *getValue(Type *) const;
  137     Value *getSymVal() const { return Val; }
  143     void set(short Coefficient, Value *V) {
  147     void set(const APFloat &Coefficient, Value *V) {
  151     void set(const ConstantFP *Coefficient, Value *V) {
  160     static unsigned drillValueDownOneStep(Value* V, FAddend &A0, FAddend &A1);
  170     Value *Val = nullptr;
  181     Value *simplify(Instruction *FAdd);
  186     Value *simplifyFAdd(AddendVect& V, unsigned InstrQuota);
  189     Value *createAddendVal(const FAddend &A, bool& NeedNeg);
  194     Value *createFSub(Value *Opnd0, Value *Opnd1);
  194     Value *createFSub(Value *Opnd0, Value *Opnd1);
  194     Value *createFSub(Value *Opnd0, Value *Opnd1);
  195     Value *createFAdd(Value *Opnd0, Value *Opnd1);
  195     Value *createFAdd(Value *Opnd0, Value *Opnd1);
  195     Value *createFAdd(Value *Opnd0, Value *Opnd1);
  196     Value *createFMul(Value *Opnd0, Value *Opnd1);
  196     Value *createFMul(Value *Opnd0, Value *Opnd1);
  196     Value *createFMul(Value *Opnd0, Value *Opnd1);
  197     Value *createFNeg(Value *V);
  197     Value *createFNeg(Value *V);
  198     Value *createNaryFAdd(const AddendVect& Opnds, unsigned InstrQuota);
  330 Value *FAddendCoef::getValue(Type *Ty) const {
  347   (Value *Val, FAddend &Addend0, FAddend &Addend1) {
  356     Value *Opnd0 = I->getOperand(0);
  357     Value *Opnd1 = I->getOperand(1);
  390     Value *V0 = I->getOperand(0);
  391     Value *V1 = I->getOperand(1);
  426 Value *FAddCombine::simplify(Instruction *I) {
  468     Value *V0 = I->getOperand(0);
  469     Value *V1 = I->getOperand(1);
  473     if (Value *R = simplifyFAdd(AllOpnds, InstQuota))
  494     if (Value *R = simplifyFAdd(AllOpnds, 1))
  506     if (Value *R = simplifyFAdd(AllOpnds, 1))
  513 Value *FAddCombine::simplifyFAdd(AddendVect& Addends, unsigned InstrQuota) {
  542     Value *Val = ThisAddend->getSymVal();
  589   Value *Result;
  600 Value *FAddCombine::createNaryFAdd
  620   Value *LastVal = nullptr;
  626     Value *V = createAddendVal(*Opnd, NeedNeg);
  658 Value *FAddCombine::createFSub(Value *Opnd0, Value *Opnd1) {
  658 Value *FAddCombine::createFSub(Value *Opnd0, Value *Opnd1) {
  658 Value *FAddCombine::createFSub(Value *Opnd0, Value *Opnd1) {
  659   Value *V = Builder.CreateFSub(Opnd0, Opnd1);
  665 Value *FAddCombine::createFNeg(Value *V) {
  665 Value *FAddCombine::createFNeg(Value *V) {
  666   Value *Zero = cast<Value>(ConstantFP::getZeroValueForNegation(V->getType()));
  666   Value *Zero = cast<Value>(ConstantFP::getZeroValueForNegation(V->getType()));
  667   Value *NewV = createFSub(Zero, V);
  673 Value *FAddCombine::createFAdd(Value *Opnd0, Value *Opnd1) {
  673 Value *FAddCombine::createFAdd(Value *Opnd0, Value *Opnd1) {
  673 Value *FAddCombine::createFAdd(Value *Opnd0, Value *Opnd1) {
  674   Value *V = Builder.CreateFAdd(Opnd0, Opnd1);
  680 Value *FAddCombine::createFMul(Value *Opnd0, Value *Opnd1) {
  680 Value *FAddCombine::createFMul(Value *Opnd0, Value *Opnd1) {
  680 Value *FAddCombine::createFMul(Value *Opnd0, Value *Opnd1) {
  681   Value *V = Builder.CreateFMul(Opnd0, Opnd1);
  740 Value *FAddCombine::createAddendVal(const FAddend &Opnd, bool &NeedNeg) {
  748   Value *OpndVal = Opnd.getSymVal();
  769 static Value *checkForNegativeOperand(BinaryOperator &I,
  771   Value *LHS = I.getOperand(0), *RHS = I.getOperand(1);
  778   Value *X = nullptr, *Y = nullptr, *Z = nullptr;
  794         Value *NewAnd = Builder.CreateAnd(Z, *C1);
  799         Value *NewOr = Builder.CreateOr(Z, ~(*C1));
  819         Value *NewOr = Builder.CreateOr(Z, ~(*C2));
  828   Value *Op0 = Add.getOperand(0), *Op1 = Add.getOperand(1);
  836   Value *X;
  852     Value *WideX = Builder.CreateSExt(X, Ty);
  859     Value *WideX = Builder.CreateZExt(X, Ty);
  867   Value *Op0 = Add.getOperand(0), *Op1 = Add.getOperand(1);
  875   Value *X;
  882   Value *Y;
  940       Value *NotX = Builder.CreateNot(X);
  951 static bool MatchMul(Value *E, Value *&Op, APInt &C) {
  951 static bool MatchMul(Value *E, Value *&Op, APInt &C) {
  969 static bool MatchRem(Value *E, Value *&Op, APInt &C, bool &IsSigned) {
  969 static bool MatchRem(Value *E, Value *&Op, APInt &C, bool &IsSigned) {
  991 static bool MatchDiv(Value *E, Value *&Op, APInt &C, bool IsSigned) {
  991 static bool MatchDiv(Value *E, Value *&Op, APInt &C, bool IsSigned) {
 1023 Value *InstCombiner::SimplifyAddWithRemainder(BinaryOperator &I) {
 1024   Value *LHS = I.getOperand(0), *RHS = I.getOperand(1);
 1025   Value *X, *MulOpV;
 1032     Value *RemOpV;
 1038       Value *DivOpV;
 1043         Value *NewDivisor =
 1062   Value *NBits;
 1067   Value *NotMask = Builder.CreateShl(MinusOne, NBits, "notmask");
 1086   Value *X, *Y;
 1110   Value *X, *Select;
 1135   Value *NBits;
 1159   Value *SignExtendingValue, *Zero;
 1202   if (Value *V = SimplifyAddInst(I.getOperand(0), I.getOperand(1),
 1214   if (Value *V = SimplifyUsingDistributiveLaws(I))
 1225   Value *LHS = I.getOperand(0), *RHS = I.getOperand(1);
 1228     Value *XorLHS = nullptr; ConstantInt *XorRHS = nullptr;
 1250         Value *NewShl = Builder.CreateShl(XorLHS, ShAmt, "sext");
 1281   Value *A, *B;
 1301   if (Value *V = checkForNegativeOperand(I, Builder))
 1313   if (Value *V = SimplifyAddWithRemainder(I)) return replaceInstUsesWith(I, V);
 1324     Value *X;
 1341         Value *NewAdd = Builder.CreateAdd(X, CRHS, LHS->getName());
 1350     Value *A = RHS;
 1356       Value *TV = SI->getTrueValue();
 1357       Value *FV = SI->getFalseValue();
 1358       Value *N;
 1419   Value *X, *Y, *Z;
 1427   Value *XY = Builder.CreateFSubFMF(X, Y, &I);
 1428   Value *MulZ = Builder.CreateFMulFMF(Z, XY, &I);
 1443   Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1);
 1444   Value *X, *Y, *Z;
 1462   Value *XY = IsFAdd ? Builder.CreateFAddFMF(X, Y, &I)
 1476   if (Value *V = SimplifyFAddInst(I.getOperand(0), I.getOperand(1),
 1491   Value *X, *Y;
 1497   Value *Z;
 1500     Value *XY = Builder.CreateFMulFMF(X, Y, &I);
 1509     Value *XY = Builder.CreateFDivFMF(X, Y, &I);
 1515   Value *LHS = I.getOperand(0), *RHS = I.getOperand(1);
 1517     Value *LHSIntVal = LHSConv->getOperand(0);
 1547           Value *NewAdd = Builder.CreateNSWAdd(LHSIntVal, CI, "addconv");
 1554       Value *RHSIntVal = RHSConv->getOperand(0);
 1565           Value *NewAdd = Builder.CreateNSWAdd(LHSIntVal, RHSIntVal, "addconv");
 1573   if (Value *V = SimplifySelectsFeedingBinaryOp(I, LHS, RHS))
 1579     if (Value *V = FAddCombine(Builder).simplify(&I))
 1589 Value *InstCombiner::OptimizePointerDifference(Value *LHS, Value *RHS,
 1589 Value *InstCombiner::OptimizePointerDifference(Value *LHS, Value *RHS,
 1589 Value *InstCombiner::OptimizePointerDifference(Value *LHS, Value *RHS,
 1656   Value *Result = EmitGEPOffset(GEP1);
 1661     Value *Offset = EmitGEPOffset(GEP2);
 1673   if (Value *V = SimplifySubInst(I.getOperand(0), I.getOperand(1),
 1682   if (Value *V = SimplifyUsingDistributiveLaws(I))
 1686   Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1);
 1687   if (Value *V = dyn_castNegVal(Op1)) {
 1711   Value *X, *Y;
 1731     Value *X;
 1776       Value *Op1Wide;
 1782       Value *X;
 1788         Value *ShAmtOp = cast<Instruction>(Op1Wide)->getOperand(1);
 1800         Value *ShAmtOp = cast<Instruction>(Op1Wide)->getOperand(1);
 1810         Value *LHS, *RHS;
 1832     Value *Y;
 1844     Value *A, *B;
 1852     Value *A, *B;
 1861     Value *A, *B;
 1869     Value *A, *B;
 1877     Value *Y;
 1885     Value *X = nullptr, *Y = nullptr, *Z = nullptr;
 1911       if (Value *XNeg = dyn_castNegVal(X))
 1919       Value *Zext = Builder.CreateZExt(Y, I.getType());
 1927     Value *A, *B;
 1935       Value *NewMul = Builder.CreateMul(A, ConstantExpr::getNeg(C));
 1946     Value *LHS, *RHS, *A;
 1947     Value *NotA = Op0, *MinMax = Op1;
 1964         Value *Not = Builder.CreateNot(MinMax);
 1975   Value *LHSOp, *RHSOp;
 1978     if (Value *Res = OptimizePointerDifference(LHSOp, RHSOp, I.getType()))
 1984     if (Value *Res = OptimizePointerDifference(LHSOp, RHSOp, I.getType()))
 1992   Value *A;
 2001     Value *Cmp = Builder.CreateICmpSLT(A, ConstantInt::getNullValue(Ty));
 2003     Value *Neg = Builder.CreateNeg(A, "", I.hasNoUnsignedWrap(),
 2031   Value *X;
 2053   Value *FNeg;
 2057   Value *X, *Y;
 2068   Value *Op = I.getOperand(0);
 2070   if (Value *V = SimplifyFNegInst(Op, I.getFastMathFlags(),
 2077   Value *X, *Y;
 2091   if (Value *V = SimplifyFSubInst(I.getOperand(0), I.getOperand(1),
 2101   Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1);
 2111   Value *X, *Y;
 2122       Value *NewSub = Builder.CreateFSubFMF(Y, X, &I);
 2156     Value *FMul = Builder.CreateFMulFMF(X, Y, &I);
 2163     Value *FDiv = Builder.CreateFDivFMF(X, Y, &I);
 2168   if (Value *V = SimplifySelectsFeedingBinaryOp(I, Op0, Op1))
 2199     if (Value *V = FAddCombine(Builder).simplify(&I))
lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
   55 static Value *getNewICmpValue(unsigned Code, bool Sign, Value *LHS, Value *RHS,
   55 static Value *getNewICmpValue(unsigned Code, bool Sign, Value *LHS, Value *RHS,
   55 static Value *getNewICmpValue(unsigned Code, bool Sign, Value *LHS, Value *RHS,
   65 static Value *getFCmpValue(unsigned Code, Value *LHS, Value *RHS,
   65 static Value *getFCmpValue(unsigned Code, Value *LHS, Value *RHS,
   65 static Value *getFCmpValue(unsigned Code, Value *LHS, Value *RHS,
   82 static Value *SimplifyBSwap(BinaryOperator &I,
   86   Value *OldLHS = I.getOperand(0);
   87   Value *OldRHS = I.getOperand(1);
   89   Value *NewLHS;
   93   Value *NewRHS;
  109   Value *BinOp = Builder.CreateBinOp(I.getOpcode(), NewLHS, NewRHS);
  121   Value *X = Op->getOperand(0);
  150             Value *NewAnd = Builder.CreateAnd(X, AndRHS);
  165 Value *InstCombiner::insertRangeTest(Value *V, const APInt &Lo, const APInt &Hi,
  165 Value *InstCombiner::insertRangeTest(Value *V, const APInt &Lo, const APInt &Hi,
  182   Value *VMinusLo =
  230 static unsigned getMaskedICmpType(Value *A, Value *B, Value *C,
  230 static unsigned getMaskedICmpType(Value *A, Value *B, Value *C,
  230 static unsigned getMaskedICmpType(Value *A, Value *B, Value *C,
  293 static bool decomposeBitTestICmp(Value *LHS, Value *RHS, CmpInst::Predicate &Pred,
  293 static bool decomposeBitTestICmp(Value *LHS, Value *RHS, CmpInst::Predicate &Pred,
  294                                  Value *&X, Value *&Y, Value *&Z) {
  294                                  Value *&X, Value *&Y, Value *&Z) {
  294                                  Value *&X, Value *&Y, Value *&Z) {
  311 getMaskedTypeForICmpPair(Value *&A, Value *&B, Value *&C,
  311 getMaskedTypeForICmpPair(Value *&A, Value *&B, Value *&C,
  311 getMaskedTypeForICmpPair(Value *&A, Value *&B, Value *&C,
  312                          Value *&D, Value *&E, ICmpInst *LHS,
  312                          Value *&D, Value *&E, ICmpInst *LHS,
  327   Value *L1 = LHS->getOperand(0);
  328   Value *L2 = LHS->getOperand(1);
  329   Value *L11, *L12, *L21, *L22;
  352   Value *R1 = RHS->getOperand(0);
  353   Value *R2 = RHS->getOperand(1);
  354   Value *R11, *R12;
  441 static Value * foldLogOpOfMaskedICmps_NotAllZeros_BMask_Mixed(
  443     Value *A, Value *B, Value *C, Value *D, Value *E,
  443     Value *A, Value *B, Value *C, Value *D, Value *E,
  443     Value *A, Value *B, Value *C, Value *D, Value *E,
  443     Value *A, Value *B, Value *C, Value *D, Value *E,
  443     Value *A, Value *B, Value *C, Value *D, Value *E,
  511     Value *NewMask = ConstantInt::get(BCst->getType(), BorD);
  512     Value *NewMaskedValue = ConstantInt::get(BCst->getType(), BandBxorDorE);
  513     Value *NewAnd = Builder.CreateAnd(A, NewMask);
  571 static Value *foldLogOpOfMaskedICmpsAsymmetric(
  573     Value *A, Value *B, Value *C, Value *D, Value *E,
  573     Value *A, Value *B, Value *C, Value *D, Value *E,
  573     Value *A, Value *B, Value *C, Value *D, Value *E,
  573     Value *A, Value *B, Value *C, Value *D, Value *E,
  573     Value *A, Value *B, Value *C, Value *D, Value *E,
  589     if (Value *V = foldLogOpOfMaskedICmps_NotAllZeros_BMask_Mixed(
  595     if (Value *V = foldLogOpOfMaskedICmps_NotAllZeros_BMask_Mixed(
  606 static Value *foldLogOpOfMaskedICmps(ICmpInst *LHS, ICmpInst *RHS, bool IsAnd,
  608   Value *A = nullptr, *B = nullptr, *C = nullptr, *D = nullptr, *E = nullptr;
  622     if (Value *V = foldLogOpOfMaskedICmpsAsymmetric(
  651     Value *NewOr = Builder.CreateOr(B, D);
  652     Value *NewAnd = Builder.CreateAnd(A, NewOr);
  656     Value *Zero = Constant::getNullValue(A->getType());
  662     Value *NewOr = Builder.CreateOr(B, D);
  663     Value *NewAnd = Builder.CreateAnd(A, NewOr);
  669     Value *NewAnd1 = Builder.CreateAnd(B, D);
  670     Value *NewAnd2 = Builder.CreateAnd(A, NewAnd1);
  739     Value *NewOr1 = Builder.CreateOr(B, D);
  740     Value *NewOr2 = ConstantExpr::getOr(CCst, ECst);
  741     Value *NewAnd = Builder.CreateAnd(A, NewOr1);
  752 Value *InstCombiner::simplifyRangeCheck(ICmpInst *Cmp0, ICmpInst *Cmp1,
  771   Value *Input = Cmp0->getOperand(0);
  772   Value *RangeEnd;
  803 static Value *
  807   Value *X = LHS->getOperand(0);
  837     Value *Or = Builder.CreateOr(X, ConstantInt::get(X->getType(), Xor));
  850     Value *Add = Builder.CreateAdd(X, ConstantInt::get(X->getType(), -(*C1)));
  860 Value *InstCombiner::foldAndOrOfICmpsOfAndWithPow2(ICmpInst *LHS, ICmpInst *RHS,
  877   Value *A, *B, *C, *D;
  888       Value *Mask = Builder.CreateOr(B, D);
  889       Value *Masked = Builder.CreateAnd(A, Mask);
  928 static Value *foldSignedTruncationCheck(ICmpInst *ICmp0, ICmpInst *ICmp1,
  949   Value *X1;
  982   Value *X0;
  990   Value *X;
 1023 static Value *foldIsPowerOf2(ICmpInst *Cmp0, ICmpInst *Cmp1, bool JoinedByAnd,
 1033   Value *X;
 1038     Value *CtPop = Cmp1->getOperand(0);
 1046     Value *CtPop = Cmp1->getOperand(0);
 1054 static Value *foldUnsignedUnderflowCheck(ICmpInst *ZeroICmp,
 1058   Value *ZeroCmpOp;
 1070   Value *A, *B;
 1106   Value *Base, *Offset;
 1145 Value *InstCombiner::foldAndOfICmps(ICmpInst *LHS, ICmpInst *RHS,
 1151   if (Value *V = foldAndOrOfICmpsOfAndWithPow2(LHS, RHS, true, CxtI))
 1163       Value *Op0 = LHS->getOperand(0), *Op1 = LHS->getOperand(1);
 1171   if (Value *V = foldLogOpOfMaskedICmps(LHS, RHS, true, Builder))
 1175   if (Value *V = simplifyRangeCheck(LHS, RHS, /*Inverted=*/false))
 1179   if (Value *V = simplifyRangeCheck(RHS, LHS, /*Inverted=*/false))
 1182   if (Value *V = foldAndOrOfEqualityCmpsWithConstants(LHS, RHS, true, Builder))
 1185   if (Value *V = foldSignedTruncationCheck(LHS, RHS, CxtI, Builder))
 1188   if (Value *V = foldIsPowerOf2(LHS, RHS, true /* JoinedByAnd */, Builder))
 1191   if (Value *X =
 1194   if (Value *X =
 1199   Value *LHS0 = LHS->getOperand(0), *RHS0 = RHS->getOperand(0);
 1211       Value *NewOr = Builder.CreateOr(LHS0, RHS0);
 1221     Value *V;
 1244         Value *NewAnd = Builder.CreateAnd(V, Low | AndC->getValue());
 1246         Value *NewVal = ConstantInt::get(AndC->getType()->getContext(), N);
 1360 Value *InstCombiner::foldLogicOfFCmps(FCmpInst *LHS, FCmpInst *RHS, bool IsAnd) {
 1361   Value *LHS0 = LHS->getOperand(0), *LHS1 = LHS->getOperand(1);
 1362   Value *RHS0 = RHS->getOperand(0), *RHS1 = RHS->getOperand(1);
 1421   Value *Op0 = BO.getOperand(0), *Op1 = BO.getOperand(1), *X;
 1435   Value *BO10 = BO1->getOperand(0), *BO11 = BO1->getOperand(1), *Y;
 1446   Value *NewFCmp = Builder.CreateFCmp(Pred, X, Y);
 1467   Value *A, *B;
 1472     Value *AndOr = Builder.CreateBinOp(Opcode, A, B, I.getName() + ".demorgan");
 1480   Value *CastSrc = CI->getOperand(0);
 1510   Value *X;
 1516       Value *NewOp = Builder.CreateBinOp(LogicOpc, X, TruncC);
 1526       Value *NewOp = Builder.CreateBinOp(LogicOpc, X, TruncC);
 1539   Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1);
 1564   Value *Cast0Src = Cast0->getOperand(0);
 1565   Value *Cast1Src = Cast1->getOperand(0);
 1569     Value *NewOp = Builder.CreateBinOp(LogicOpc, Cast0Src, Cast1Src,
 1583     Value *Res = LogicOpc == Instruction::And ? foldAndOfICmps(ICmp0, ICmp1, I)
 1595     if (Value *R = foldLogicOfFCmps(FCmp0, FCmp1, LogicOpc == Instruction::And))
 1604   Value *Op0 = I.getOperand(0);
 1605   Value *Op1 = I.getOperand(1);
 1606   Value *A, *B;
 1630   Value *Op0 = I.getOperand(0);
 1631   Value *Op1 = I.getOperand(1);
 1632   Value *A, *B;
 1687   Value *Op0 = And.getOperand(0), *Op1 = And.getOperand(1);
 1696   Value *X;
 1714   Value *NewC = ConstantExpr::getTrunc(C, X->getType());
 1715   Value *NewBO = Opc == Instruction::Sub ? Builder.CreateBinOp(Opc, NewC, X)
 1724   if (Value *V = SimplifyAndInst(I.getOperand(0), I.getOperand(1),
 1744   if (Value *V = SimplifyUsingDistributiveLaws(I))
 1747   if (Value *V = SimplifyBSwap(I, Builder))
 1750   Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1);
 1753     Value *X, *Y;
 1758       Value *IsZero = Builder.CreateICmpEQ(X, ConstantInt::get(I.getType(), 0));
 1766       Value *And = Builder.CreateAnd(X, Op1);
 1780       Value *And = Builder.CreateAnd(X, ConstantInt::get(I.getType(),
 1795         Value *NewRHS = Builder.CreateAnd(Y, Op1, Y->getName() + ".masked");
 1801         Value *NewLHS = Builder.CreateAnd(X, Op1, X->getName() + ".masked");
 1824         Value *X;
 1832             Value *BinOp;
 1833             Value *Op0LHS = Op0I->getOperand(0);
 1839             auto *And = Builder.CreateAnd(BinOp, TruncC2);
 1853       Value *X = nullptr; ConstantInt *YC = nullptr;
 1859         Value *NewCast = Builder.CreateTrunc(X, I.getType(), "and.shrunk");
 1877     Value *A, *B, *C;
 1918       if (Value *Res = foldAndOfICmps(LHS, RHS, I))
 1923     Value *X, *Y;
 1926         if (Value *Res = foldAndOfICmps(LHS, Cmp, I))
 1929         if (Value *Res = foldAndOfICmps(LHS, Cmp, I))
 1934         if (Value *Res = foldAndOfICmps(Cmp, RHS, I))
 1937         if (Value *Res = foldAndOfICmps(Cmp, RHS, I))
 1944       if (Value *Res = foldLogicOfFCmps(LHS, RHS, true))
 1954   Value *A;
 1964     Value *X, *Y;
 1971       Value *NewICmpInst = Builder.CreateICmpSGT(X, Y);
 1981   Value *Op0 = Or.getOperand(0), *Op1 = Or.getOperand(1);
 2042   Value *ShVal, *ShAmt0, *ShAmt1;
 2057     Value *X;
 2073   Value *ShAmt = matchShiftAmount(ShAmt0, ShAmt1, Width);
 2109 Value *InstCombiner::getSelectCondition(Value *A, Value *B) {
 2109 Value *InstCombiner::getSelectCondition(Value *A, Value *B) {
 2109 Value *InstCombiner::getSelectCondition(Value *A, Value *B) {
 2136   Value *Cond;
 2137   Value *NotB;
 2166 Value *InstCombiner::matchSelectFromAndOr(Value *A, Value *C, Value *B,
 2166 Value *InstCombiner::matchSelectFromAndOr(Value *A, Value *C, Value *B,
 2166 Value *InstCombiner::matchSelectFromAndOr(Value *A, Value *C, Value *B,
 2166 Value *InstCombiner::matchSelectFromAndOr(Value *A, Value *C, Value *B,
 2167                                           Value *D) {
 2173   if (Value *Cond = getSelectCondition(A, B)) {
 2177     Value *BitcastC = Builder.CreateBitCast(C, A->getType());
 2178     Value *BitcastD = Builder.CreateBitCast(D, A->getType());
 2179     Value *Select = Builder.CreateSelect(Cond, BitcastC, BitcastD);
 2187 Value *InstCombiner::foldOrOfICmps(ICmpInst *LHS, ICmpInst *RHS,
 2193   if (Value *V = foldAndOrOfICmpsOfAndWithPow2(LHS, RHS, false, CxtI))
 2217     Value *LAdd = LHS->getOperand(0);
 2218     Value *RAdd = RHS->getOperand(0);
 2220     Value *LAddOpnd, *RAddOpnd;
 2246           Value *MaskC = ConstantInt::get(LAddC->getType(), ~DiffC);
 2248           Value *NewAnd = Builder.CreateAnd(LAddOpnd, MaskC);
 2249           Value *NewAdd = Builder.CreateAdd(NewAnd, MaxAddC);
 2263       Value *Op0 = LHS->getOperand(0), *Op1 = LHS->getOperand(1);
 2272   if (Value *V = foldLogOpOfMaskedICmps(LHS, RHS, false, Builder))
 2275   Value *LHS0 = LHS->getOperand(0), *RHS0 = RHS->getOperand(0);
 2279     Value *A = nullptr, *B = nullptr;
 2303   if (Value *V = simplifyRangeCheck(LHS, RHS, /*Inverted=*/true))
 2307   if (Value *V = simplifyRangeCheck(RHS, LHS, /*Inverted=*/true))
 2310   if (Value *V = foldAndOrOfEqualityCmpsWithConstants(LHS, RHS, false, Builder))
 2313   if (Value *V = foldIsPowerOf2(LHS, RHS, false /* JoinedByAnd */, Builder))
 2316   if (Value *X =
 2319   if (Value *X =
 2330       Value *NewOr = Builder.CreateOr(LHS0, RHS0);
 2449   if (Value *V = SimplifyOrInst(I.getOperand(0), I.getOperand(1),
 2469   if (Value *V = SimplifyUsingDistributiveLaws(I))
 2472   if (Value *V = SimplifyBSwap(I, Builder))
 2484   Value *X, *Y;
 2490     Value *Or = Builder.CreateOr(X, Y);
 2495   Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1);
 2496   Value *A, *B, *C, *D;
 2502       Value *V1 = nullptr, *V2 = nullptr;
 2536         Value *X;
 2559       if (Value *V = matchSelectFromAndOr(A, C, B, D))
 2561       if (Value *V = matchSelectFromAndOr(A, C, D, B))
 2563       if (Value *V = matchSelectFromAndOr(C, A, B, D))
 2565       if (Value *V = matchSelectFromAndOr(C, A, D, B))
 2567       if (Value *V = matchSelectFromAndOr(B, D, A, C))
 2569       if (Value *V = matchSelectFromAndOr(B, D, C, A))
 2571       if (Value *V = matchSelectFromAndOr(D, B, A, C))
 2573       if (Value *V = matchSelectFromAndOr(D, B, C, A))
 2614       Value *Not = Builder.CreateNot(B, B->getName() + ".not");
 2618       Value *Not = Builder.CreateNot(A, A->getName() + ".not");
 2630         Value *NotOp = Op0 == B->getOperand(0) ? B->getOperand(1) :
 2632         Value *Not = Builder.CreateNot(NotOp, NotOp->getName() + ".not");
 2643       if (Value *Res = foldOrOfICmps(LHS, RHS, I))
 2648     Value *X, *Y;
 2651         if (Value *Res = foldOrOfICmps(LHS, Cmp, I))
 2654         if (Value *Res = foldOrOfICmps(LHS, Cmp, I))
 2659         if (Value *Res = foldOrOfICmps(Cmp, RHS, I))
 2662         if (Value *Res = foldOrOfICmps(Cmp, RHS, I))
 2669       if (Value *Res = foldLogicOfFCmps(LHS, RHS, false))
 2694     Value *Inner = Builder.CreateOr(A, Op1);
 2703     Value *X = nullptr, *Y = nullptr;
 2707       Value *orTrue = Builder.CreateOr(A, C);
 2708       Value *orFalse = Builder.CreateOr(B, D);
 2715     Value *X, *Y;
 2722       Value *NewICmpInst = Builder.CreateICmpSGT(X, Y);
 2740   Value *Op0 = I.getOperand(0);
 2741   Value *Op1 = I.getOperand(1);
 2742   Value *A, *B;
 2797 Value *InstCombiner::foldXorOfICmps(ICmpInst *LHS, ICmpInst *RHS,
 2809       Value *Op0 = LHS->getOperand(0), *Op1 = LHS->getOperand(1);
 2820   Value *LHS0 = LHS->getOperand(0), *LHS1 = LHS->getOperand(1);
 2821   Value *RHS0 = RHS->getOperand(0), *RHS1 = RHS->getOperand(1);
 2831       Value *Zero = ConstantInt::getNullValue(LHS0->getType());
 2840       Value *MinusOne = ConstantInt::getAllOnesValue(LHS0->getType());
 2851   if (Value *OrICmp = SimplifyBinOp(Instruction::Or, LHS, RHS, SQ)) {
 2854     if (Value *AndICmp = SimplifyBinOp(Instruction::And, LHS, RHS, SQ)) {
 2879           Value *NotY = Builder.CreateNot(Y, Y->getName() + ".not");
 2909   Value *B, *X, *D;
 2910   Value *M;
 2918   Value *NotM;
 2921     Value *NewA = Builder.CreateAnd(D, NotM);
 2928     Value *LHS = Builder.CreateAnd(X, C);
 2929     Value *NotC = Builder.CreateNot(C);
 2930     Value *RHS = Builder.CreateAnd(B, NotC);
 2945   Value *X, *Y;
 2959   Value *NotX = Builder.CreateNot(X, X->getName() + ".not");
 2967   if (Value *V = SimplifyXorInst(I.getOperand(0), I.getOperand(1),
 2981   if (Value *V = SimplifyUsingDistributiveLaws(I))
 2989   if (Value *V = SimplifyBSwap(I, Builder))
 2992   Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1);
 2998   Value *M;
 3004   Value *X, *Y;
 3011     Value *NotY = Builder.CreateNot(Y, Y->getName() + ".not");
 3017     Value *NotY = Builder.CreateNot(Y, Y->getName() + ".not");
 3036         Value *NotX = Builder.CreateNot(NotVal->getOperand(0), "notlhs");
 3037         Value *NotY = Builder.CreateNot(NotVal->getOperand(1), "notrhs");
 3080       Value *And = Builder.CreateAnd(X, ConstantExpr::getNot(C2));
 3085       Value *Or = Builder.CreateOr(X, ConstantExpr::getNot(C2));
 3100       Value *X;
 3142             Value *Opnd0 = Builder.CreateLShr(E1->getOperand(0), C2);
 3145             Value *FoldVal = ConstantInt::get(Opnd0->getType(), FoldConst);
 3179   Value *A, *B, *C;
 3209       if (Value *V = foldXorOfICmps(LHS, RHS, I))
 3231     Value *Cmp = Builder.CreateICmpSLT(A, ConstantInt::getNullValue(Ty));
 3234     Value *Neg = Builder.CreateNeg(A, "", Add->hasNoUnsignedWrap(),
 3252     Value *LHS, *RHS;
 3258         Value *NotY = Builder.CreateNot(RHS);
 3266         Value *NotX = Builder.CreateNot(LHS);
 3275         Value *NotLHS = Builder.CreateNot(LHS);
 3276         Value *NotRHS = Builder.CreateNot(RHS);
lib/Transforms/InstCombine/InstCombineCalls.cpp
  184   Value *Src = Builder.CreateBitCast(MI->getArgOperand(1), NewSrcPtrTy);
  185   Value *Dest = Builder.CreateBitCast(MI->getArgOperand(0), NewDstPtrTy);
  265     Value *Dest = MI->getDest();
  286 static Value *simplifyX86immShift(const IntrinsicInst &II,
  420 static Value *simplifyX86varShift(const IntrinsicInst &II,
  544 static Value *simplifyX86pack(IntrinsicInst &II,
  546   Value *Arg0 = II.getArgOperand(0);
  547   Value *Arg1 = II.getArgOperand(1);
  604   auto *Shuffle = Builder.CreateShuffleVector(Arg0, Arg1, PackMask);
  610 static Value *simplifyX86movmsk(const IntrinsicInst &II,
  612   Value *Arg = II.getArgOperand(0);
  633   Value *Res = Builder.CreateBitCast(Arg, IntegerVecTy);
  640 static Value *simplifyX86addcarry(const IntrinsicInst &II,
  642   Value *CarryIn = II.getArgOperand(0);
  643   Value *Op1 = II.getArgOperand(1);
  644   Value *Op2 = II.getArgOperand(2);
  653     Value *UAdd = Builder.CreateIntrinsic(Intrinsic::uadd_with_overflow, OpTy,
  656     Value *UAddResult = Builder.CreateExtractValue(UAdd, 0);
  657     Value *UAddOV = Builder.CreateZExt(Builder.CreateExtractValue(UAdd, 1),
  659     Value *Res = UndefValue::get(RetTy);
  667 static Value *simplifyX86insertps(const IntrinsicInst &II,
  697   Value *V1 = II.getArgOperand(1);
  726 static Value *simplifyX86extrq(IntrinsicInst &II, Value *Op0,
  726 static Value *simplifyX86extrq(IntrinsicInst &II, Value *Op0,
  787       Value *SV = Builder.CreateShuffleVector(
  804       Value *Args[] = {Op0, CILength, CIIndex};
  820 static Value *simplifyX86insertq(IntrinsicInst &II, Value *Op0, Value *Op1,
  820 static Value *simplifyX86insertq(IntrinsicInst &II, Value *Op0, Value *Op1,
  820 static Value *simplifyX86insertq(IntrinsicInst &II, Value *Op0, Value *Op1,
  868     Value *SV = Builder.CreateShuffleVector(Builder.CreateBitCast(Op0, ShufTy),
  905     Value *Args[] = {Op0, Op1, CILength, CIIndex};
  915 static Value *simplifyX86pshufb(const IntrinsicInst &II,
  962 static Value *simplifyX86vpermilvar(const IntrinsicInst &II,
 1012 static Value *simplifyX86vpermv(const IntrinsicInst &II,
 1050 Value *InstCombiner::simplifyMaskedLoad(IntrinsicInst &II) {
 1051   Value *LoadPtr = II.getArgOperand(0);
 1065     Value *LI = Builder.CreateAlignedLoad(II.getType(), LoadPtr, Alignment,
 1087     Value *StorePtr = II.getArgOperand(1);
 1096   if (Value *V = SimplifyDemandedVectorElts(II.getOperand(0),
 1134   if (Value *V = SimplifyDemandedVectorElts(II.getOperand(0),
 1139   if (Value *V = SimplifyDemandedVectorElts(II.getOperand(1),
 1158   auto *Arg = II.getArgOperand(0);
 1159   auto *StrippedArg = Arg->stripPointerCasts();
 1160   auto *StrippedInvariantGroupsArg = Arg->stripPointerCastsAndInvariantGroups();
 1164   Value *Result = nullptr;
 1187   Value *Op0 = II.getArgOperand(0);
 1188   Value *X;
 1206     Value *Y;
 1261   Value *Op0 = II.getArgOperand(0);
 1262   Value *X;
 1299   Value *Ptr = II.getOperand(0);
 1300   Value *Mask = II.getOperand(1);
 1319   Value *PtrCast = IC.Builder.CreateBitCast(Ptr, VecPtrTy, "castvec");
 1335   Value *Ptr = II.getOperand(0);
 1336   Value *Mask = II.getOperand(1);
 1337   Value *Vec = II.getOperand(2);
 1362   Value *PtrCast = IC.Builder.CreateBitCast(Ptr, VecPtrTy, "castvec");
 1400 static Value *simplifyNeonTbl1(const IntrinsicInst &II,
 1431   auto *V1 = II.getArgOperand(0);
 1439 static Value *simplifyNeonVld1(const IntrinsicInst &II,
 1453   auto *BCastInst = Builder.CreateBitCast(II.getArgOperand(0),
 1716     SmallVector<Value *, 4> Args(II->arg_operands());
 1760   Value *Arg0 = Call.getArgOperand(0), *Arg1 = Call.getArgOperand(1);
 1771   Value *OperationResult = nullptr;
 1783   if (Value *V = SimplifyCall(&CI, SQ.getWithInstruction(&CI)))
 1865     if (Value *V = SimplifyDemandedVectorElts(II, AllOnesEltMask, UndefElts)) {
 1886     if (Value *V = lowerObjectSizeCall(II, DL, &TLI, /*MustSucceed=*/false))
 1890     Value *IIOperand = II->getArgOperand(0);
 1891     Value *X = nullptr;
 1897       Value *CV = ConstantInt::get(X->getType(), C);
 1898       Value *V = Builder.CreateLShr(X, CV);
 1904     if (Value *SimplifiedMaskedOp = simplifyMaskedLoad(*II))
 1946     Value *Op0 = II->getArgOperand(0), *Op1 = II->getArgOperand(1);
 2020     Value *X;
 2022     Value *Arg0 = II->getArgOperand(0);
 2023     Value *Arg1 = II->getArgOperand(1);
 2055     Value *Arg0 = II->getArgOperand(0);
 2056     Value *Arg1 = II->getArgOperand(1);
 2062       Value *NegVal = ConstantExpr::getNeg(C);
 2082     Value *Arg0 = SI->getLHS();
 2083     Value *Arg1 = SI->getRHS();
 2112       Value *NegVal = ConstantExpr::getNeg(C);
 2122       Value *X;
 2160     Value *Arg0 = II->getArgOperand(0);
 2161     Value *Arg1 = II->getArgOperand(1);
 2162     Value *X, *Y;
 2185       Value *NewCall = Builder.CreateBinaryIntrinsic(NewIID, X, Y, II);
 2230       Value *Mul = Builder.CreateFMul(II->getArgOperand(0),
 2232       Value *Add = Builder.CreateFAdd(Mul, II->getArgOperand(2));
 2238     if (Value *V = SimplifyFMulInst(II->getArgOperand(0), II->getArgOperand(1),
 2253     Value *Src0 = II->getArgOperand(0);
 2254     Value *Src1 = II->getArgOperand(1);
 2255     Value *X, *Y;
 2272     if (Value *V = SimplifyFMAFMul(II->getArgOperand(0), II->getArgOperand(1),
 2283     Value *Cond;
 2300     Value *ExtSrc;
 2303       Value *NarrowII = Builder.CreateUnaryIntrinsic(IID, ExtSrc, II);
 2310     Value *X;
 2311     Value *Src = II->getArgOperand(0);
 2321     Value *X;
 2324       Value *NewSin = Builder.CreateUnaryIntrinsic(Intrinsic::sin, X, II);
 2336       Value *Ptr = Builder.CreateBitCast(II->getArgOperand(0),
 2344     Value *Ptr = Builder.CreateBitCast(II->getArgOperand(0),
 2355       Value *Ptr = Builder.CreateBitCast(II->getArgOperand(1), OpPtrTy);
 2363     Value *Ptr = Builder.CreateBitCast(II->getArgOperand(1), OpPtrTy);
 2372       Value *Ptr = Builder.CreateBitCast(II->getArgOperand(0),
 2374       Value *Load = Builder.CreateLoad(VTy, Ptr);
 2382       Value *Ptr = Builder.CreateBitCast(II->getArgOperand(0),
 2393       Value *TOp = Builder.CreateFPTrunc(II->getArgOperand(0), VTy);
 2395       Value *Ptr = Builder.CreateBitCast(II->getArgOperand(1), OpPtrTy);
 2405       Value *Ptr = Builder.CreateBitCast(II->getArgOperand(1), OpPtrTy);
 2493     if (Value *V = SimplifyDemandedVectorEltsLow(Arg, ArgWidth, RetWidth)) {
 2526     Value *Arg = II->getArgOperand(0);
 2528     if (Value *V = SimplifyDemandedVectorEltsLow(Arg, VWidth, 1)) {
 2542     if (Value *V = simplifyX86movmsk(*II, Builder))
 2577     Value *Arg0 = II->getArgOperand(0);
 2578     Value *Arg1 = II->getArgOperand(1);
 2580     if (Value *V = SimplifyDemandedVectorEltsLow(Arg0, VWidth, 1)) {
 2584     if (Value *V = SimplifyDemandedVectorEltsLow(Arg1, VWidth, 1)) {
 2599     Value *Arg0 = II->getArgOperand(0);
 2600     Value *Arg1 = II->getArgOperand(1);
 2604     Value *A, *B;
 2636         Value *Arg0 = II->getArgOperand(0);
 2637         Value *Arg1 = II->getArgOperand(1);
 2639         Value *V;
 2678         Value *Arg0 = II->getArgOperand(0);
 2679         Value *Arg1 = II->getArgOperand(1);
 2680         Value *LHS = Builder.CreateExtractElement(Arg0, (uint64_t)0);
 2681         Value *RHS = Builder.CreateExtractElement(Arg1, (uint64_t)0);
 2683         Value *V;
 2705         Value *Mask = II->getArgOperand(3);
 2715           Value *Passthru = Builder.CreateExtractElement(II->getArgOperand(2),
 2758     if (Value *V = simplifyX86immShift(*II, Builder))
 2789     if (Value *V = simplifyX86immShift(*II, Builder))
 2794     Value *Arg1 = II->getArgOperand(1);
 2799     if (Value *V = SimplifyDemandedVectorEltsLow(Arg1, VWidth, VWidth / 2)) {
 2833     if (Value *V = simplifyX86varShift(*II, Builder))
 2843     if (Value *V = simplifyX86pack(*II, Builder, true))
 2853     if (Value *V = simplifyX86pack(*II, Builder, false))
 2864       Value *Arg0 = II->getArgOperand(0);
 2865       Value *Arg1 = II->getArgOperand(1);
 2871       if (Value *V = SimplifyDemandedVectorElts(Arg0, DemandedElts1,
 2880       if (Value *V = SimplifyDemandedVectorElts(Arg1, DemandedElts2,
 2899     if (Value *V = simplifyX86insertps(*II, Builder))
 2904     Value *Op0 = II->getArgOperand(0);
 2905     Value *Op1 = II->getArgOperand(1);
 2922     if (Value *V = simplifyX86extrq(*II, Op0, CILength, CIIndex, Builder))
 2928     if (Value *V = SimplifyDemandedVectorEltsLow(Op0, VWidth0, 1)) {
 2932     if (Value *V = SimplifyDemandedVectorEltsLow(Op1, VWidth1, 2)) {
 2944     Value *Op0 = II->getArgOperand(0);
 2954     if (Value *V = simplifyX86extrq(*II, Op0, CILength, CIIndex, Builder))
 2959     if (Value *V = SimplifyDemandedVectorEltsLow(Op0, VWidth, 1)) {
 2967     Value *Op0 = II->getArgOperand(0);
 2968     Value *Op1 = II->getArgOperand(1);
 2986       if (Value *V = simplifyX86insertq(*II, Op0, Op1, Len, Idx, Builder))
 2992     if (Value *V = SimplifyDemandedVectorEltsLow(Op0, VWidth, 1)) {
 3003     Value *Op0 = II->getArgOperand(0);
 3004     Value *Op1 = II->getArgOperand(1);
 3019       if (Value *V = simplifyX86insertq(*II, Op0, Op1, Len, Idx, Builder))
 3026     if (Value *V = SimplifyDemandedVectorEltsLow(Op0, VWidth0, 1)) {
 3030     if (Value *V = SimplifyDemandedVectorEltsLow(Op1, VWidth1, 1)) {
 3046     Value *Op0 = II->getArgOperand(0);
 3047     Value *Op1 = II->getArgOperand(1);
 3048     Value *Mask = II->getArgOperand(2);
 3064     Value *BoolVec;
 3081         Value *CastOp0 = Builder.CreateBitCast(Op0, Mask->getType());
 3082         Value *CastOp1 = Builder.CreateBitCast(Op1, Mask->getType());
 3083         Value *Sel = Builder.CreateSelect(BoolVec, CastOp1, CastOp0);
 3094     if (Value *V = simplifyX86pshufb(*II, Builder))
 3104     if (Value *V = simplifyX86vpermilvar(*II, Builder))
 3122     if (Value *V = simplifyX86vpermv(*II, Builder))
 3153     if (Value *V = simplifyX86addcarry(*II, Builder))
 3180         Value *Op0 = Builder.CreateBitCast(II->getArgOperand(0),
 3182         Value *Op1 = Builder.CreateBitCast(II->getArgOperand(1),
 3184         Value *Result = UndefValue::get(Op0->getType());
 3187         Value *ExtractedElts[32];
 3200             Value *Op0ToUse = (DL.isLittleEndian()) ? Op1 : Op0;
 3201             Value *Op1ToUse = (DL.isLittleEndian()) ? Op0 : Op1;
 3219     if (Value *V = simplifyNeonVld1(*II, MemAlign, Builder))
 3252     if (Value *V = simplifyNeonTbl1(*II, Builder))
 3260     Value *Arg0 = II->getArgOperand(0);
 3261     Value *Arg1 = II->getArgOperand(1);
 3298     Value *DataArg = II->getArgOperand(0);
 3299     Value *KeyArg  = II->getArgOperand(1);
 3302     Value *Data, *Key;
 3325     Value *Src = II->getArgOperand(0);
 3345     Value *Src = II->getArgOperand(0);
 3354     Value *Src = II->getArgOperand(0);
 3394     Value *Src0 = II->getArgOperand(0);
 3395     Value *Src1 = II->getArgOperand(1);
 3417       Value *FCmp = Builder.CreateFCmpUNO(Src0, Src0);
 3424       Value *FCmp = Builder.CreateFCmpOEQ(
 3473     Value *Src0 = II->getArgOperand(0);
 3474     Value *Src1 = II->getArgOperand(1);
 3501     Value *Src0 = II->getArgOperand(0);
 3502     Value *Src1 = II->getArgOperand(1);
 3512     Value *Src = II->getArgOperand(0);
 3558       Value *Shl = Builder.CreateShl(Src, IntSize - Offset - Width);
 3559       Value *RightShift = Signed ? Builder.CreateAShr(Shl, IntSize - Width)
 3565     Value *RightShift = Signed ? Builder.CreateAShr(Src, Offset)
 3583         Value *Src = II->getArgOperand(I + 2);
 3600     Value *Src0 = II->getArgOperand(0);
 3601     Value *Src1 = II->getArgOperand(1);
 3602     Value *Src2 = II->getArgOperand(2);
 3673     Value *Src0 = II->getArgOperand(0);
 3674     Value *Src1 = II->getArgOperand(1);
 3693         Value *Args[] = {MetadataAsValue::get(II->getContext(), MD)};
 3719     Value *ExtSrc;
 3730     Value *SrcLHS;
 3731     Value *SrcRHS;
 3788       Value *Args[] = { SrcLHS, SrcRHS,
 3813     Value *Old = II->getArgOperand(0);
 3836     Value *Src = II->getArgOperand(0);
 3922     Value *IIOperand = II->getArgOperand(0);
 3934     Value *AssumeIntrinsic = II->getCalledValue();
 3935     Value *A, *B;
 3993     Value *DerivedPtr = GCR.getDerivedPtr();
 4042     Value *NextCond = nullptr;
 4045       Value *CurrCond = II->getArgOperand(0);
 4133   if (Value *With = Simplifier.optimizeCall(CI)) {
 4141 static IntrinsicInst *findInitTrampolineFromAlloca(Value *TrampMem) {
 4144   Value *Underlying = TrampMem->stripPointerCasts();
 4181                                                Value *TrampMem) {
 4201 static IntrinsicInst *findInitTrampoline(Value *Callee) {
 4208   Value *TrampMem = AdjustTramp->getOperand(0);
 4278   for (Value *V : Call.args()) {
 4299   Value *Callee = Call.getCalledValue();
 4554   SmallVector<Value *, 8> Args;
 4571     Value *NewArg = *AI;
 4599         Value *NewArg = *AI;
 4651   Value *NV = NC;
 4695   Value *Callee = Call.getCalledValue();
 4728       std::vector<Value*> NewArgs;
 4742             Value *NestVal = Tramp.getArgOperand(2);
lib/Transforms/InstCombine/InstCombineCasts.cpp
   30 static Value *decomposeSimpleLinearExpr(Value *Val, unsigned &Scale,
   30 static Value *decomposeSimpleLinearExpr(Value *Val, unsigned &Scale,
   66         Value *SubVal =
  118   Value *NumElements = // See if the array size is a decomposable linear expr.
  127   Value *Amt = nullptr;
  137     Value *Off = ConstantInt::get(AI.getArraySize()->getType(),
  153     Value *NewCast = AllocaBuilder.CreateBitCast(New, AI.getType(), "tmpcast");
  161 Value *InstCombiner::EvaluateInDifferentType(Value *V, Type *Ty,
  161 Value *InstCombiner::EvaluateInDifferentType(Value *V, Type *Ty,
  187     Value *LHS = EvaluateInDifferentType(I->getOperand(0), Ty, isSigned);
  188     Value *RHS = EvaluateInDifferentType(I->getOperand(1), Ty, isSigned);
  207     Value *True = EvaluateInDifferentType(I->getOperand(1), Ty, isSigned);
  208     Value *False = EvaluateInDifferentType(I->getOperand(2), Ty, isSigned);
  216       Value *V =
  261   Value *Src = CI.getOperand(0);
  305 static bool canAlwaysEvaluateInType(Value *V, Type *Ty) {
  308   Value *X;
  318 static bool canNotEvaluateInType(Value *V, Type *Ty) {
  341 static bool canEvaluateTruncated(Value *V, Type *Ty, InstCombiner &IC,
  437     for (Value *IncValue : PN->incoming_values())
  457   Value *TruncOp = Trunc.getOperand(0);
  462   Value *VecInput = nullptr;
  509   Value *Or0, *Or1;
  513   Value *ShVal, *ShAmt0, *ShAmt1;
  533     Value *X;
  547   Value *ShAmt = matchShiftAmount(ShAmt0, ShAmt1, NarrowWidth);
  567   Value *NarrowShAmt = Builder.CreateTrunc(ShAmt, DestTy);
  568   Value *X = Builder.CreateTrunc(ShVal, DestTy);
  589   Value *BinOp0 = BinOp->getOperand(0);
  590   Value *BinOp1 = BinOp->getOperand(1);
  602       Value *TruncX = Builder.CreateTrunc(BinOp1, DestTy);
  608       Value *TruncX = Builder.CreateTrunc(BinOp0, DestTy);
  611     Value *X;
  614       Value *NarrowOp1 = Builder.CreateTrunc(BinOp1, DestTy);
  619       Value *NarrowOp0 = Builder.CreateTrunc(BinOp0, DestTy);
  645     Value *NarrowOp = Builder.CreateTrunc(Shuf->getOperand(0), Trunc.getType());
  669   Value *VecOp = InsElt->getOperand(0);
  670   Value *ScalarOp = InsElt->getOperand(1);
  671   Value *Index = InsElt->getOperand(2);
  677     Value *NarrowOp = Builder.CreateCast(Opcode, ScalarOp, DestScalarTy);
  688   Value *Src = CI.getOperand(0);
  704     Value *Res = EvaluateInDifferentType(Src, DestTy, false);
  713   Value *LHS, *RHS;
  724     Value *Zero = Constant::getNullValue(Src->getType());
  731       Value *And = Builder.CreateAnd(Src, ConstantInt::get(SrcTy, 1));
  737     Value *X;
  742       Value *And = Builder.CreateAnd(X, ConstantInt::get(SrcTy, MaskC));
  749       Value *And = Builder.CreateAnd(X, ConstantInt::get(SrcTy, MaskC));
  758   Value *A = nullptr; ConstantInt *Cst = nullptr;
  775     Value *Shift = Builder.CreateLShr(A, Cst->getZExtValue());
  788     Value *SExt = cast<Instruction>(Src)->getOperand(0);
  805         Value *Shift = Builder.CreateAShr(A, std::min(ShiftAmt, ASize - 1));
  831         Value *NewTrunc = Builder.CreateTrunc(A, DestTy, A->getName() + ".tr");
  860       Value *In = ICI->getOperand(0);
  861       Value *Sh = ConstantInt::get(In->getType(),
  902         Value *In = ICI->getOperand(0);
  918         Value *IntCast = Builder.CreateIntCast(In, CI.getType(), false);
  929       Value *LHS = ICI->getOperand(0);
  930       Value *RHS = ICI->getOperand(1);
  941           Value *Result = Builder.CreateXor(LHS, RHS);
  982 static bool canEvaluateZExtd(Value *V, Type *Ty, unsigned &BitsToClear,
 1098   Value *Src = CI.getOperand(0);
 1113     Value *Res = EvaluateInDifferentType(Src, DestTy, false);
 1146     Value *A = CSrc->getOperand(0);
 1157       Value *And = Builder.CreateAnd(A, AndConst, CSrc->getName() + ".mask");
 1167       Value *Trunc = Builder.CreateTrunc(A, CI.getType());
 1189       Value *LCast = Builder.CreateZExt(LHS, CI.getType(), LHS->getName());
 1190       Value *RCast = Builder.CreateZExt(RHS, CI.getType(), RHS->getName());
 1205   Value *X;
 1212   Value *And;
 1225   Value *Op0 = ICI->getOperand(0), *Op1 = ICI->getOperand(1);
 1236     Value *Sh = ConstantInt::get(Op0->getType(),
 1238     Value *In = Builder.CreateAShr(Op0, Sh, Op0->getName() + ".lobit");
 1257         Value *In = ICI->getOperand(0);
 1261           Value *V = Pred == ICmpInst::ICMP_NE ?
 1312 static bool canEvaluateSExtd(Value *V, Type *Ty) {
 1348     for (Value *IncValue : PN->incoming_values())
 1369   Value *Src = CI.getOperand(0);
 1385     Value *Res = EvaluateInDifferentType(Src, DestTy, true);
 1397     Value *ShAmt = ConstantInt::get(DestTy, DestBitSize-SrcBitSize);
 1404   Value *X;
 1429   Value *A = nullptr;
 1476 static Type *shrinkFPConstantVector(Value *V) {
 1504 static Type *getMinimumFPType(Value *V) {
 1566           Value *LHS = Builder.CreateFPTrunc(BO->getOperand(0), Ty);
 1567           Value *RHS = Builder.CreateFPTrunc(BO->getOperand(1), Ty);
 1580           Value *LHS = Builder.CreateFPTrunc(BO->getOperand(0), Ty);
 1581           Value *RHS = Builder.CreateFPTrunc(BO->getOperand(1), Ty);
 1593           Value *LHS = Builder.CreateFPTrunc(BO->getOperand(0), Ty);
 1594           Value *RHS = Builder.CreateFPTrunc(BO->getOperand(1), Ty);
 1605         Value *LHS, *RHS;
 1614         Value *ExactResult = Builder.CreateFRemFMF(LHS, RHS, BO);
 1621   Value *X;
 1625       Value *InnerTrunc = Builder.CreateFPTrunc(X, Ty);
 1645       Value *Src = II->getArgOperand(0);
 1660       Value *InnerTrunc = Builder.CreateFPTrunc(Src, Ty);
 1692   Value *SrcI = OpI->getOperand(0);
 1768     Value *P = Builder.CreateZExtOrTrunc(CI.getOperand(0), Ty);
 1780   Value *Src = CI.getOperand(0);
 1818   Value *P = Builder.CreatePtrToInt(CI.getOperand(0), PtrTy);
 1827 static Instruction *optimizeVectorResize(Value *InVal, VectorType *DestTy,
 1851   Value *V2;
 1897 static bool collectInsertionElements(Value *V, unsigned Shift,
 1898                                      SmallVectorImpl<Value *> &Elements,
 2006 static Value *optimizeIntegerToVectorInsertions(BitCastInst &CI,
 2009   Value *IntInput = CI.getOperand(0);
 2011   SmallVector<Value*, 8> Elements(DestVecTy->getNumElements());
 2020   Value *Result = Constant::getNullValue(CI.getType());
 2050   auto *NewBC = IC.Builder.CreateBitCast(ExtElt->getVectorOperand(),
 2071   Value *X;
 2075     Value *CastedOp1 = Builder.CreateBitCast(BO->getOperand(1), DestTy);
 2082     Value *CastedOp0 = Builder.CreateBitCast(BO->getOperand(0), DestTy);
 2093     Value *CastedOp0 = Builder.CreateBitCast(BO->getOperand(0), DestTy);
 2094     Value *CastedC = ConstantExpr::getBitCast(C, DestTy);
 2104   Value *Cond, *TVal, *FVal;
 2127   Value *X;
 2131     Value *CastedVal = Builder.CreateBitCast(FVal, DestTy);
 2138     Value *CastedVal = Builder.CreateBitCast(TVal, DestTy);
 2167   Value *Src = CI.getOperand(0);
 2182     for (Value *IncValue : OldPN->incoming_values()) {
 2191         Value *Addr = LI->getOperand(0);
 2232       Value *V = OldPN->getOperand(j);
 2233       Value *NewV = nullptr;
 2292   Value *Src = CI.getOperand(0);
 2340       SmallVector<Value *, 8> Idxs(NumZeros + 1, Builder.getInt32(0));
 2363       Value *Elem = Builder.CreateBitCast(Src, DestVTy->getElementType());
 2385       if (Value *V = optimizeIntegerToVectorInsertions(CI, *this))
 2395         Value *Elem =
 2412     Value *ShufOp0 = Shuf->getOperand(0);
 2413     Value *ShufOp1 = Shuf->getOperand(1);
 2427         Value *LHS = Builder.CreateBitCast(ShufOp0, DestTy);
 2428         Value *RHS = Builder.CreateBitCast(ShufOp1, DestTy);
 2447       Value *ScalarX = Builder.CreateBitCast(ShufOp0, DestTy);
 2475   Value *Src = CI.getOperand(0);
 2487     Value *NewBitCast = Builder.CreateBitCast(Src, MidTy);
lib/Transforms/InstCombine/InstCombineCompares.cpp
  308   Value *Idx = GEP->getOperand(2);
  327     Value *FirstTrueIdx = ConstantInt::get(Idx->getType(), FirstTrueElement);
  334     Value *C1 = Builder.CreateICmpEQ(Idx, FirstTrueIdx);
  335     Value *SecondTrueIdx = ConstantInt::get(Idx->getType(), SecondTrueElement);
  336     Value *C2 = Builder.CreateICmpEQ(Idx, SecondTrueIdx);
  347     Value *FirstFalseIdx = ConstantInt::get(Idx->getType(), FirstFalseElement);
  354     Value *C1 = Builder.CreateICmpNE(Idx, FirstFalseIdx);
  355     Value *SecondFalseIdx = ConstantInt::get(Idx->getType(),SecondFalseElement);
  356     Value *C2 = Builder.CreateICmpNE(Idx, SecondFalseIdx);
  367       Value *Offs = ConstantInt::get(Idx->getType(), -FirstTrueElement);
  371     Value *End = ConstantInt::get(Idx->getType(),
  381       Value *Offs = ConstantInt::get(Idx->getType(), -FirstFalseElement);
  385     Value *End = ConstantInt::get(Idx->getType(),
  405       Value *V = Builder.CreateIntCast(Idx, Ty, false);
  425 static Value *evaluateGEPOffsetExpression(User *GEP, InstCombiner &IC,
  458   Value *VariableIdx = GEP->getOperand(i);
  519 static bool canRewriteGEPAsOffset(Value *Start, Value *Base,
  519 static bool canRewriteGEPAsOffset(Value *Start, Value *Base,
  521                                   SetVector<Value *> &Explored) {
  522   SmallVector<Value *, 16> WorkList(1, Start);
  540       Value *V = WorkList.back();
  591       for (Value *Op : PN->incoming_values())
  599   for (Value *Val : Explored) {
  600     for (Value *Use : Val->uses()) {
  618 static void setInsertionPoint(IRBuilder<> &Builder, Value *V,
  643 static Value *rewriteGEPAsOffset(Value *Start, Value *Base,
  643 static Value *rewriteGEPAsOffset(Value *Start, Value *Base,
  643 static Value *rewriteGEPAsOffset(Value *Start, Value *Base,
  645                                  SetVector<Value *> &Explored) {
  656   DenseMap<Value *, Value *> NewInsts;
  656   DenseMap<Value *, Value *> NewInsts;
  660   for (Value *Val : Explored) {
  672   for (Value *Val : Explored) {
  680       Value *V = NewInsts[CI->getOperand(0)];
  685       Value *Index = NewInsts[GEP->getOperand(1)] ? NewInsts[GEP->getOperand(1)]
  697       auto *Op = NewInsts[GEP->getOperand(0)];
  712   for (Value *Val : Explored) {
  720         Value *NewIncoming = PHI->getIncomingValue(I);
  730   for (Value *Val : Explored) {
  739     Value *NewBase = Base;
  744     Value *GEP = Builder.CreateInBoundsGEP(
  749       Value *Cast = Builder.CreatePointerCast(GEP, Val->getType(),
  762 static std::pair<Value *, Value *>
  762 static std::pair<Value *, Value *>
  763 getAsConstantIndexedAddress(Value *V, const DataLayout &DL) {
  804 static Instruction *transformToIndexedCompare(GEPOperator *GEPLHS, Value *RHS,
  818   Value *PtrBase, *Index;
  822   SetVector<Value *> Nodes;
  833   Value *NewRHS = rewriteGEPAsOffset(RHS, PtrBase, DL, Nodes);
  844 Instruction *InstCombiner::foldGEPICmp(GEPOperator *GEPLHS, Value *RHS,
  860   Value *PtrBase = GEPLHS->getOperand(0);
  868     Value *Offset = evaluateGEPOffsetExpression(GEPLHS, *this, DL);
  898     auto *Base = GEPLHS->getPointerOperand();
  935         Value *LOffset = EmitGEPOffset(GEPLHS);
  936         Value *ROffset = EmitGEPOffset(GEPRHS);
  951         Value *Cmp = Builder.CreateICmp(ICmpInst::getSignedPredicate(Cond),
 1001         Value *LHSV = GEPLHS->getOperand(DiffOperand);
 1002         Value *RHSV = GEPRHS->getOperand(DiffOperand);
 1013       Value *L = EmitGEPOffset(GEPLHS);
 1014       Value *R = EmitGEPOffset(GEPRHS);
 1026                                          const Value *Other) {
 1056     const Value *V = U->getUser();
 1102 Instruction *InstCombiner::foldICmpAddOpConst(Value *X, const APInt &C,
 1152 Instruction *InstCombiner::foldICmpShrConstConst(ICmpInst &I, Value *A,
 1211 Instruction *InstCombiner::foldICmpShlConstConst(ICmpInst &I, Value *A,
 1255 static Instruction *processUGT_ADDCST_ADD(ICmpInst &I, Value *A, Value *B,
 1255 static Instruction *processUGT_ADDCST_ADD(ICmpInst &I, Value *A, Value *B,
 1324   Value *TruncA = Builder.CreateTrunc(A, NewType, A->getName() + ".trunc");
 1325   Value *TruncB = Builder.CreateTrunc(B, NewType, B->getName() + ".trunc");
 1327   Value *Add = Builder.CreateExtractValue(Call, 0, "sadd.result");
 1328   Value *ZExt = Builder.CreateZExt(Add, OrigAdd->getType());
 1347   Value *X, *Y, *Zero;
 1354   Value *Mask = Builder.CreateAdd(Y, Constant::getAllOnesValue(Y->getType()));
 1355   Value *Masked = Builder.CreateAnd(X, Mask);
 1367   Value *X;
 1399     Value *A, *B;
 1416   Value *X, *Y;
 1446   Value *Op0 = Cmp.getOperand(0), *Op1 = Cmp.getOperand(1);
 1447   Value *A, *B;
 1466   Value *DomCond;
 1484   Value *X = Cmp.getOperand(0), *Y = Cmp.getOperand(1);
 1532   Value *X = Trunc->getOperand(0);
 1535     Value *V = nullptr;
 1564   Value *X = Xor->getOperand(0);
 1565   Value *Y = Xor->getOperand(1);
 1702     Value *NewShift =
 1707     Value *NewAnd = Builder.CreateAnd(Shift->getOperand(0), NewShift);
 1729   Value *X;
 1764   Value *W;
 1775       Value *NewAnd = Builder.CreateAnd(W, ZextC2, And->getName());
 1790     Value *Or = And->getOperand(0);
 1791     Value *A, *B, *LShr;
 1803       Value *NewOr = nullptr;
 1814         Value *NewAnd = Builder.CreateAnd(A, NewOr, And->getName());
 1834   Value *X = And->getOperand(0);
 1835   Value *Y = And->getOperand(1);
 1868       Value *Trunc = Builder.CreateTrunc(X, NTy);
 1884     Value *V = nullptr;
 1890   Value *OrOp0 = Or->getOperand(0), *OrOp1 = Or->getOperand(1);
 1903       Value *A = Builder.CreateAnd(OrOp0, ~C);
 1911   Value *P, *Q;
 1915     Value *CmpP =
 1917     Value *CmpQ =
 1925   Value *X1, *X2, *X3, *X4;
 1930     Value *Cmp12 = Builder.CreateICmp(Pred, X1, X2);
 1931     Value *Cmp34 = Builder.CreateICmp(Pred, X3, X4);
 1963   Value *Y;
 2041   Value *X = Shl->getOperand(0);
 2104     Value *And = Builder.CreateAnd(X, Mask, Shl->getName() + ".mask");
 2116     Value *And = Builder.CreateAnd(X, Mask, Shl->getName() + ".mask");
 2126       Value *And = Builder.CreateAnd(X, (~C).lshr(ShiftAmt->getZExtValue()));
 2134       Value *And =
 2168   Value *X = Shr->getOperand(0);
 2249     Value *And = Builder.CreateAnd(X, Mask, Shr->getName() + ".mask");
 2280   Value *And = Builder.CreateAnd(SRem->getOperand(0), MaskC);
 2305   Value *Y = UDiv->getOperand(1);
 2440   Value *X = Div->getOperand(0);
 2497   Value *X = Sub->getOperand(0), *Y = Sub->getOperand(1);
 2559   Value *Y = Add->getOperand(1);
 2565   Value *X = Add->getOperand(0);
 2622 bool InstCombiner::matchThreeWayIntCompare(SelectInst *SI, Value *&LHS,
 2623                                            Value *&RHS, ConstantInt *&Less,
 2637   Value *EqualVal = SI->getTrueValue();
 2638   Value *UnequalVal = SI->getFalseValue();
 2645   Value *LHS2, *RHS2;
 2684   Value *OrigLHS, *OrigRHS;
 2709     Value *Cond = Builder.getFalse();
 2732   Value *Op1 = Cmp.getOperand(1);
 2733   Value *BCSrcOp = Bitcast->getOperand(0);
 2739     Value *X;
 2794   Value *Vec;
 2808         Value *Extract = Builder.CreateExtractElement(Vec, Elem);
 2809         Value *NewC = ConstantInt::get(EltTy, C->trunc(EltTy->getBitWidth()));
 2915   Value *BOp0 = BO->getOperand(0), *BOp1 = BO->getOperand(1);
 2923         Value *NewRem = Builder.CreateURem(BOp0, BOp1, BO->getName());
 2940       if (Value *NegVal = dyn_castNegVal(BOp1))
 2942       if (Value *NegVal = dyn_castNegVal(BOp0))
 2945         Value *Neg = Builder.CreateNeg(BOp1);
 2984       Value *And = Builder.CreateAnd(BOp0, NotBOC);
 3083       Value *Or = Builder.CreateOr(II->getArgOperand(0), II->getArgOperand(1));
 3169   Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1);
 3196     Value *Op1 = nullptr, *Op2 = nullptr;
 3278 static Value *foldICmpWithLowBitMaskedVal(ICmpInst &I,
 3281   Value *X, *M, *Y;
 3378 static Value *
 3382   Value *X;
 3438   Value *T0 = Builder.CreateAdd(X, ConstantInt::get(XType, AddCst));
 3440   Value *T1 = Builder.CreateICmp(DstPred, T0, ConstantInt::get(XType, ICmpCst));
 3452 static Value *
 3493   Value *X, *XShAmt, *Y, *YShAmt;
 3588   Value *T0 = XShiftOpcode == Instruction::BinaryOps::LShr
 3591   Value *T1 = Builder.CreateAnd(T0, Y);
 3603 Value *InstCombiner::foldUnsignedMultiplicationOverflowCheck(ICmpInst &I) {
 3605   Value *X, *Y;
 3656   Value *Res = Builder.CreateExtractValue(Call, 1, "umul.ov");
 3669   Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1);
 3678   Value *X;
 3704   Value *A = nullptr, *B = nullptr, *C = nullptr, *D = nullptr;
 3730     Value *Y, *Z;
 3831             Value *NewAdd = Builder.CreateNSWAdd(A, C3);
 3835             Value *NewAdd = Builder.CreateNSWAdd(C, C3);
 3889     Value *X;
 3969           Value *And1 = Builder.CreateAnd(BO0->getOperand(0), Mask);
 3970           Value *And2 = Builder.CreateAnd(BO1->getOperand(0), Mask);
 4019   if (Value *V = foldUnsignedMultiplicationOverflowCheck(I))
 4022   if (Value *V = foldICmpWithLowBitMaskedVal(I, Builder))
 4025   if (Value *V = foldICmpWithTruncSignExtendedVal(I, Builder))
 4028   if (Value *V = foldShiftIntoShiftInAnotherHandOfAndInICmp(I, SQ, Builder))
 4037   Value *Op0 = Cmp.getOperand(0);
 4038   Value *X = Cmp.getOperand(1);
 4049   Value *Y;
 4125   Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1);
 4127   Value *A, *B, *C, *D;
 4130       Value *OtherVal = A == Op1 ? B : A;
 4140         Value *Xor = Builder.CreateXor(C, NC);
 4158     Value *OtherVal = A == Op0 ? B : A;
 4165     Value *X = nullptr, *Y = nullptr, *Z = nullptr;
 4218       Value *Xor = Builder.CreateXor(A, B, I.getName() + ".unshifted");
 4230       Value *Xor = Builder.CreateXor(A, B, I.getName() + ".unshifted");
 4232       Value *And = Builder.CreateAnd(Xor, Builder.getInt(AndVal),
 4257       Value *Mask = Builder.CreateAnd(A, Builder.getInt(MaskV));
 4302   Value *X;
 4316     Value *Y = CastOp1->getOperand(0);
 4398   Value *Op0Src = CastOp0->getOperand(0);
 4413     Value *NewOp1 = nullptr;
 4415       Value *PtrSrc = PtrToIntOp1->getOperand(0);
 4434 static bool isNeutralValue(Instruction::BinaryOps BinaryOp, Value *RHS) {
 4448     Value *LHS, Value *RHS, Instruction *CxtI) const {
 4448     Value *LHS, Value *RHS, Instruction *CxtI) const {
 4471     Instruction::BinaryOps BinaryOp, bool IsSigned, Value *LHS, Value *RHS,
 4471     Instruction::BinaryOps BinaryOp, bool IsSigned, Value *LHS, Value *RHS,
 4472     Instruction &OrigI, Value *&Result, Constant *&Overflow) {
 4527 static Instruction *processUMulZExtIdiom(ICmpInst &I, Value *MulVal,
 4528                                          Value *OtherVal, InstCombiner &IC) {
 4545   Value *A = LHS->getOperand(0), *B = RHS->getOperand(0);
 4602         Value *ZextArg = Zext->getOperand(0);
 4612     Value *ValToMask;
 4679   Value *MulA = A, *MulB = B;
 4693     Value *Mul = Builder.CreateExtractValue(Call, 0, "umul.value");
 4708         Value *ShortAnd = Builder.CreateAnd(Mul, ShortMask);
 4747     Value *Res = Builder.CreateExtractValue(Call, 1);
 4794 static bool swapMayExposeCSEOpportunities(const Value *Op0, const Value *Op1) {
 4794 static bool swapMayExposeCSEOpportunities(const Value *Op0, const Value *Op1) {
 4926   Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1);
 4990       Value *LHS = nullptr;
 4996       Value *X;
 5213   Value *Op0 = I.getOperand(0);
 5214   Value *Op1 = I.getOperand(1);
 5229   Value *A = I.getOperand(0), *B = I.getOperand(1);
 5309   Value *X, *Y;
 5352   Value *NewX = Builder.CreateLShr(X, Y, X->getName() + ".highbits");
 5361   Value *LHS = Cmp.getOperand(0), *RHS = Cmp.getOperand(1);
 5362   Value *V1, *V2;
 5370     Value *NewCmp = isa<ICmpInst>(Cmp) ? Builder.CreateICmp(P, V1, V2)
 5380   Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1);
 5394   if (Value *V = SimplifyICmpInst(I.getPredicate(), Op0, Op1, Q))
 5400     Value *Cond, *SelectTrue, *SelectFalse;
 5403       if (Value *V = dyn_castNegVal(SelectTrue)) {
 5407       else if (Value *V = dyn_castNegVal(SelectFalse)) {
 5444       Value *A, *B;
 5516     Value *A, *B;
 5542       Value *Result;
 5582     Value *X;
 5891   Value *X;
 5965   Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1);
 5966   if (Value *V = SimplifyFCmpInst(Pred, Op0, Op1, I.getFastMathFlags(),
 6010   Value *X, *Y;
 6023       Value *A, *B;
lib/Transforms/InstCombine/InstCombineInternal.h
   83 static inline unsigned getComplexity(Value *V) {
  161 static inline Value *peekThroughBitcast(Value *V, bool OneUseOnly = false) {
  161 static inline Value *peekThroughBitcast(Value *V, bool OneUseOnly = false) {
  186 static inline bool isFreeToInvert(Value *V, bool WillInvertAllUses) {
  218 static inline bool canFreelyInvertAllUsersOf(Value *V, Value *IgnoredUser) {
  218 static inline bool canFreelyInvertAllUsersOf(Value *V, Value *IgnoredUser) {
  372   Value *OptimizePointerDifference(Value *LHS, Value *RHS, Type *Ty);
  372   Value *OptimizePointerDifference(Value *LHS, Value *RHS, Type *Ty);
  372   Value *OptimizePointerDifference(Value *LHS, Value *RHS, Type *Ty);
  388   Value *simplifyRangeCheck(ICmpInst *Cmp0, ICmpInst *Cmp1, bool Inverted);
  393   Value *reassociateShiftAmtsOfTwoSameDirectionShifts(
  405   Instruction *FoldShiftByConstant(Value *Op0, Constant *Op1,
  466   bool replacePointer(Instruction &I, Value *V);
  471   Value *dyn_castNegVal(Value *V) const;
  471   Value *dyn_castNegVal(Value *V) const;
  473                             SmallVectorImpl<Value *> &NewIndices);
  499                              Value *LHS, Value *RHS,
  499                              Value *LHS, Value *RHS,
  500                              Instruction &CtxI, Value *&OperationResult,
  509   Value *simplifyMaskedLoad(IntrinsicInst &II);
  531   bool willNotOverflowSignedAdd(const Value *LHS, const Value *RHS,
  531   bool willNotOverflowSignedAdd(const Value *LHS, const Value *RHS,
  537   bool willNotOverflowUnsignedAdd(const Value *LHS, const Value *RHS,
  537   bool willNotOverflowUnsignedAdd(const Value *LHS, const Value *RHS,
  543   bool willNotOverflowAdd(const Value *LHS, const Value *RHS,
  543   bool willNotOverflowAdd(const Value *LHS, const Value *RHS,
  549   bool willNotOverflowSignedSub(const Value *LHS, const Value *RHS,
  549   bool willNotOverflowSignedSub(const Value *LHS, const Value *RHS,
  555   bool willNotOverflowUnsignedSub(const Value *LHS, const Value *RHS,
  555   bool willNotOverflowUnsignedSub(const Value *LHS, const Value *RHS,
  561   bool willNotOverflowSub(const Value *LHS, const Value *RHS,
  561   bool willNotOverflowSub(const Value *LHS, const Value *RHS,
  567   bool willNotOverflowSignedMul(const Value *LHS, const Value *RHS,
  567   bool willNotOverflowSignedMul(const Value *LHS, const Value *RHS,
  573   bool willNotOverflowUnsignedMul(const Value *LHS, const Value *RHS,
  573   bool willNotOverflowUnsignedMul(const Value *LHS, const Value *RHS,
  579   bool willNotOverflowMul(const Value *LHS, const Value *RHS,
  579   bool willNotOverflowMul(const Value *LHS, const Value *RHS,
  585   bool willNotOverflow(BinaryOperator::BinaryOps Opcode, const Value *LHS,
  586                        const Value *RHS, const Instruction &CxtI,
  596   Value *EmitGEPOffset(User *GEP);
  619   Value *foldAndOfICmps(ICmpInst *LHS, ICmpInst *RHS, Instruction &CxtI);
  620   Value *foldOrOfICmps(ICmpInst *LHS, ICmpInst *RHS, Instruction &CxtI);
  621   Value *foldXorOfICmps(ICmpInst *LHS, ICmpInst *RHS, BinaryOperator &I);
  626   Value *foldLogicOfFCmps(FCmpInst *LHS, FCmpInst *RHS, bool IsAnd);
  628   Value *foldAndOrOfICmpsOfAndWithPow2(ICmpInst *LHS, ICmpInst *RHS,
  630   Value *matchSelectFromAndOr(Value *A, Value *B, Value *C, Value *D);
  630   Value *matchSelectFromAndOr(Value *A, Value *B, Value *C, Value *D);
  630   Value *matchSelectFromAndOr(Value *A, Value *B, Value *C, Value *D);
  630   Value *matchSelectFromAndOr(Value *A, Value *B, Value *C, Value *D);
  630   Value *matchSelectFromAndOr(Value *A, Value *B, Value *C, Value *D);
  631   Value *getSelectCondition(Value *A, Value *B);
  631   Value *getSelectCondition(Value *A, Value *B);
  631   Value *getSelectCondition(Value *A, Value *B);
  661   Instruction *replaceInstUsesWith(Instruction &I, Value *V) {
  682   Instruction *CreateOverflowTuple(IntrinsicInst *II, Value *Result,
  723   void computeKnownBits(const Value *V, KnownBits &Known,
  728   KnownBits computeKnownBits(const Value *V, unsigned Depth,
  733   bool isKnownToBeAPowerOfTwo(const Value *V, bool OrZero = false,
  739   bool MaskedValueIsZero(const Value *V, const APInt &Mask, unsigned Depth = 0,
  744   unsigned ComputeNumSignBits(const Value *Op, unsigned Depth = 0,
  749   OverflowResult computeOverflowForUnsignedMul(const Value *LHS,
  750                                                const Value *RHS,
  755   OverflowResult computeOverflowForSignedMul(const Value *LHS,
  756                                              const Value *RHS,
  761   OverflowResult computeOverflowForUnsignedAdd(const Value *LHS,
  762                                                const Value *RHS,
  767   OverflowResult computeOverflowForSignedAdd(const Value *LHS,
  768                                              const Value *RHS,
  773   OverflowResult computeOverflowForUnsignedSub(const Value *LHS,
  774                                                const Value *RHS,
  779   OverflowResult computeOverflowForSignedSub(const Value *LHS, const Value *RHS,
  779   OverflowResult computeOverflowForSignedSub(const Value *LHS, const Value *RHS,
  786       Value *LHS, Value *RHS, Instruction *CxtI) const;
  786       Value *LHS, Value *RHS, Instruction *CxtI) const;
  803   Value *SimplifyUsingDistributiveLaws(BinaryOperator &I);
  810   Value *SimplifyAddWithRemainder(BinaryOperator &I);
  814   Value *SimplifySelectsFeedingBinaryOp(BinaryOperator &I, Value *LHS,
  814   Value *SimplifySelectsFeedingBinaryOp(BinaryOperator &I, Value *LHS,
  815                                         Value *RHS);
  819   Value *tryFactorization(BinaryOperator &, Instruction::BinaryOps, Value *,
  819   Value *tryFactorization(BinaryOperator &, Instruction::BinaryOps, Value *,
  820                           Value *, Value *, Value *);
  820                           Value *, Value *, Value *);
  820                           Value *, Value *, Value *);
  827   bool matchThreeWayIntCompare(SelectInst *SI, Value *&LHS, Value *&RHS,
  827   bool matchThreeWayIntCompare(SelectInst *SI, Value *&LHS, Value *&RHS,
  833   Value *SimplifyDemandedUseBits(Value *V, APInt DemandedMask, KnownBits &Known,
  833   Value *SimplifyDemandedUseBits(Value *V, APInt DemandedMask, KnownBits &Known,
  842   Value *SimplifyMultipleUseDemandedBits(Instruction *I,
  849   Value *simplifyShrShlDemandedBits(
  857   Value *simplifyAMDGCNMemoryIntrinsicDemanded(IntrinsicInst *II,
  861   Value *SimplifyDemandedVectorElts(Value *V, APInt DemandedElts,
  861   Value *SimplifyDemandedVectorElts(Value *V, APInt DemandedElts,
  901   Instruction *foldGEPICmp(GEPOperator *GEPLHS, Value *RHS,
  904                              const Value *Other);
  910   Instruction *foldICmpAddOpConst(Value *X, const APInt &C,
  925   Value *foldUnsignedMultiplicationOverflowCheck(ICmpInst &Cmp);
  957   Instruction *foldICmpShrConstConst(ICmpInst &I, Value *ShAmt, const APInt &C1,
  959   Instruction *foldICmpShlConstConst(ICmpInst &I, Value *ShAmt, const APInt &C1,
  973   Instruction *foldSelectIntoOp(SelectInst &SI, Value *, Value *);
  973   Instruction *foldSelectIntoOp(SelectInst &SI, Value *, Value *);
  975                             Value *A, Value *B, Instruction &Outer,
  975                             Value *A, Value *B, Instruction &Outer,
  976                             SelectPatternFlavor SPF2, Value *C);
  982   Value *insertRangeTest(Value *V, const APInt &Lo, const APInt &Hi,
  982   Value *insertRangeTest(Value *V, const APInt &Lo, const APInt &Hi,
  994   Value *EvaluateInDifferentType(Value *V, Type *Ty, bool isSigned);
  994   Value *EvaluateInDifferentType(Value *V, Type *Ty, bool isSigned);
  999   Value *Descale(Value *Val, APInt Scale, bool &NoSignedWrap);
  999   Value *Descale(Value *Val, APInt Scale, bool &NoSignedWrap);
lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
   38 static bool pointsToConstantGlobal(Value *V) {
   59 isOnlyCopiedFromConstantGlobal(Value *V, MemTransferInst *&TheCopy,
   65   SmallVector<std::pair<Value *, bool>, 35> ValuesToInspect;
  171 static bool isDereferenceableForAllocaSize(const Value *V, const AllocaInst *AI,
  190     Value *V = IC.Builder.getInt32(1);
  213       Value *NullIdx = Constant::getNullValue(IdxTy);
  214       Value *Idx[2] = {NullIdx, NullIdx};
  232     Value *V = IC.Builder.CreateIntCast(AI.getArraySize(), IntPtrTy, false);
  254   void replacePointer(Instruction &I, Value *V);
  259   Value *getReplacement(Value *I);
  259   Value *getReplacement(Value *I);
  262   MapVector<Value *, Value *> WorkMap;
  262   MapVector<Value *, Value *> WorkMap;
  287 Value *PointerReplacer::getReplacement(Value *V) {
  287 Value *PointerReplacer::getReplacement(Value *V) {
  299     auto *V = getReplacement(LT->getPointerOperand());
  307     auto *V = getReplacement(GEP->getPointerOperand());
  309     SmallVector<Value *, 8> Indices;
  317     auto *V = getReplacement(BC->getOperand(0));
  330 void PointerReplacer::replacePointer(Instruction &I, Value *V) {
  457   Value *Ptr = LI.getPointerOperand();
  459   Value *NewPtr = nullptr;
  475 static StoreInst *combineStoreToNewValue(InstCombiner &IC, StoreInst &SI, Value *V) {
  479   Value *Ptr = SI.getPointerOperand();
  529 static bool isMinMaxWithLoads(Value *V) {
  538   Value *LHS;
  539   Value *RHS;
  671     auto *Addr = LI.getPointerOperand();
  675     Value *V = UndefValue::get(T);
  677       Value *Indices[2] = {
  681       auto *Ptr = IC.Builder.CreateInBoundsGEP(ST, Addr, makeArrayRef(Indices),
  722     auto *Addr = LI.getPointerOperand();
  726     Value *V = UndefValue::get(T);
  729       Value *Indices[2] = {
  733       auto *Ptr = IC.Builder.CreateInBoundsGEP(AT, Addr, makeArrayRef(Indices),
  757 static bool isObjectSizeLessThanOrEq(Value *V, uint64_t MaxSize,
  759   SmallPtrSet<Value *, 4> Visited;
  760   SmallVector<Value *, 4> Worklist(1, V);
  763     Value *P = Worklist.pop_back_val();
  776       for (Value *IncValue : PN->incoming_values())
  847       Value *V = GEPI->getOperand(I);
  866   SmallVector<Value *, 4> Ops(GEPI->idx_begin(), GEPI->idx_begin() + Idx);
  907 static Instruction *replaceGEPIdxWithZero(InstCombiner &IC, Value *Ptr,
  928   auto *Ptr = SI.getPointerOperand();
  935 static bool canSimplifyNullLoadOrGEP(LoadInst &LI, Value *Op) {
  937     const Value *GEPI0 = GEPI->getOperand(0);
  950   Value *Op = LI.getOperand(0);
  982   if (Value *AvailableVal = FindAvailableLoadedValue(
 1076 static Value *likeBitCastFromVector(InstCombiner &IC, Value *V) {
 1076 static Value *likeBitCastFromVector(InstCombiner &IC, Value *V) {
 1077   Value *U = nullptr;
 1082     auto *W = E->getVectorOperand();
 1147   Value *V = SI.getValueOperand();
 1158   if (Value *U = likeBitCastFromVector(IC, V))
 1175   Value *V = SI.getValueOperand();
 1203     auto *Addr = SI.getPointerOperand();
 1210       Value *Indices[2] = {
 1214       auto *Ptr = IC.Builder.CreateInBoundsGEP(ST, Addr, makeArrayRef(Indices),
 1216       auto *Val = IC.Builder.CreateExtractValue(V, i, EltName);
 1251     auto *Addr = SI.getPointerOperand();
 1260       Value *Indices[2] = {
 1264       auto *Ptr = IC.Builder.CreateInBoundsGEP(AT, Addr, makeArrayRef(Indices),
 1266       auto *Val = IC.Builder.CreateExtractValue(V, i, EltName);
 1289 static bool equivalentAddressValues(Value *A, Value *B) {
 1289 static bool equivalentAddressValues(Value *A, Value *B) {
 1319   Value *LoadAddr;
 1351   Value *Val = SI.getOperand(0);
 1352   Value *Ptr = SI.getOperand(1);
 1568   Value *MergedVal = OtherStore->getOperand(0);
lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
   49 static Value *simplifyValueKnownNonZero(Value *V, InstCombiner &IC,
   49 static Value *simplifyValueKnownNonZero(Value *V, InstCombiner &IC,
   60   Value *A = nullptr, *B = nullptr, *One = nullptr;
   74     if (Value *V2 = simplifyValueKnownNonZero(I->getOperand(0), IC, CxtI)) {
  132 static Value *foldMulSelectToNegate(BinaryOperator &I,
  134   Value *Cond, *OtherOp;
  172   if (Value *V = SimplifyMulInst(I.getOperand(0), I.getOperand(1),
  182   if (Value *V = SimplifyUsingDistributiveLaws(I))
  186   Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1);
  196     Value *NewOp;
  240         Value *X = nullptr, *Y = nullptr;
  243           Value *Sub = nullptr;
  260   if (Value *FoldedMul = foldMulSelectToNegate(I, Builder))
  266     Value *X;
  269       Value *Mul = Builder.CreateMul(C1, Op1);
  278   Value *X, *Y;
  301     Value *Y = Op1;
  308     Value *Neg = dyn_castNegVal(Y);
  313       Value *X = Div->getOperand(0), *DivOp1 = Div->getOperand(1);
  324       Value *Rem = Builder.CreateBinOp(RemOpc, X, DivOp1);
  338     Value *Y;
  394   if (Value *V = SimplifyFMulInst(I.getOperand(0), I.getOperand(1),
  408   if (Value *FoldedMul = foldMulSelectToNegate(I, Builder))
  412   Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1);
  417   Value *X, *Y;
  431   if (Value *V = SimplifySelectsFeedingBinaryOp(I, Op0, Op1))
  464         Value *XC = Builder.CreateFMulFMF(X, C, &I);
  470         Value *XC = Builder.CreateFMulFMF(X, C, &I);
  475     Value *Z;
  479       Value *NewFMul = Builder.CreateFMulFMF(X, Z, &I);
  489       Value *XY = Builder.CreateFMulFMF(X, Y, &I);
  490       Value *Sqrt = Builder.CreateUnaryIntrinsic(Intrinsic::sqrt, XY, &I);
  502         Value *XX = Builder.CreateFMulFMF(X, X, &I);
  508         Value *XX = Builder.CreateFMulFMF(X, X, &I);
  518       Value *XY = Builder.CreateFAddFMF(X, Y, &I);
  519       Value *Exp = Builder.CreateUnaryIntrinsic(Intrinsic::exp, XY, &I);
  528       Value *XY = Builder.CreateFAddFMF(X, Y, &I);
  529       Value *Exp2 = Builder.CreateUnaryIntrinsic(Intrinsic::exp2, XY, &I);
  542       Value *XX = Builder.CreateFMulFMF(Op1, Op1, &I);
  547       Value *XX = Builder.CreateFMulFMF(Op0, Op0, &I);
  568       Value *LogXTimesY = Builder.CreateFMulFMF(Log2, Y, &I);
  605   Value *SelectCond = SI->getCondition();
  681   Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1);
  686   if (Value *V = simplifyValueKnownNonZero(I.getOperand(1), *this, I)) {
  698     Value *X;
  770       Value *Inc = Builder.CreateAdd(Op1, Op0);
  771       Value *Cmp = Builder.CreateICmpULT(Inc, ConstantInt::get(Ty, 3));
  785   Value *X, *Z;
  792   Value *Y;
  816 using FoldUDivOperandCb = Instruction *(*)(Value *Op0, Value *Op1,
  816 using FoldUDivOperandCb = Instruction *(*)(Value *Op0, Value *Op1,
  827   Value *OperandToFold;
  837   UDivFoldAction(FoldUDivOperandCb FA, Value *InputOperand)
  839   UDivFoldAction(FoldUDivOperandCb FA, Value *InputOperand, size_t SLHS)
  846 static Instruction *foldUDivPow2Cst(Value *Op0, Value *Op1,
  846 static Instruction *foldUDivPow2Cst(Value *Op0, Value *Op1,
  859 static Instruction *foldUDivShl(Value *Op0, Value *Op1, const BinaryOperator &I,
  859 static Instruction *foldUDivShl(Value *Op0, Value *Op1, const BinaryOperator &I,
  861   Value *ShiftLeft;
  866   Value *N;
  885 static size_t visitUDivOperand(Value *Op0, Value *Op1, const BinaryOperator &I,
  885 static size_t visitUDivOperand(Value *Op0, Value *Op1, const BinaryOperator &I,
  922   Value *N = I.getOperand(0);
  923   Value *D = I.getOperand(1);
  925   Value *X, *Y;
  930     Value *NarrowOp = Builder.CreateBinOp(Opcode, X, Y);
  946     Value *NarrowOp = isa<Constant>(D) ? Builder.CreateBinOp(Opcode, X, TruncC)
  955   if (Value *V = SimplifyUDivInst(I.getOperand(0), I.getOperand(1),
  966   Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1);
  967   Value *X;
  987     Value *Cmp = Builder.CreateICmpUGE(Op0, Op1);
  992     Value *Cmp = Builder.CreateICmpEQ(Op0, ConstantInt::getAllOnesValue(Ty));
 1004   Value *A, *B;
 1019       Value *ActionOp1 = UDivActions[i].OperandToFold;
 1028         Value *SelectRHS = UDivActions[SelectRHSIdx].FoldResult;
 1030         Value *SelectLHS = UDivActions[SelectLHSIdx].FoldResult;
 1049   if (Value *V = SimplifySDivInst(I.getOperand(0), I.getOperand(1),
 1060   Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1);
 1061   Value *X;
 1076       Value *ShAmt = ConstantInt::get(Op1->getType(), Op1C->exactLogBase2());
 1083     Value *Op0Src;
 1093       Value *NarrowOp = Builder.CreateSDiv(Op0Src, NarrowDivisor);
 1110   Value *Y;
 1147   Value *X;
 1176   Value *X;
 1203   if (Value *V = SimplifyFDivInst(I.getOperand(0), I.getOperand(1),
 1217   Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1);
 1229     Value *X, *Y;
 1233       Value *YZ = Builder.CreateFMulFMF(Y, Op1, &I);
 1239       Value *YZ = Builder.CreateFMulFMF(Y, Op0, &I);
 1247     Value *X;
 1261       Value *Res = emitUnaryFloatFnCall(X, &TLI, LibFunc_tan, LibFunc_tanf,
 1270   Value *X, *Y;
 1294     Value *V = Builder.CreateBinaryIntrinsic(
 1306   Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1);
 1309   if (Value *V = simplifyValueKnownNonZero(I.getOperand(1), *this, I)) {
 1346   if (Value *V = SimplifyURemInst(I.getOperand(0), I.getOperand(1),
 1360   Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1);
 1366     Value *Add = Builder.CreateAdd(Op1, N1);
 1376     Value *Cmp = Builder.CreateICmpULT(Op0, Op1);
 1377     Value *Sub = Builder.CreateSub(Op0, Op1);
 1385   Value *X;
 1387     Value *Cmp = Builder.CreateICmpEQ(Op0, ConstantInt::getAllOnesValue(Ty));
 1395   if (Value *V = SimplifySRemInst(I.getOperand(0), I.getOperand(1),
 1406   Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1);
 1418   Value *X, *Y;
 1473   if (Value *V = SimplifyFRemInst(I.getOperand(0), I.getOperand(1),
lib/Transforms/InstCombine/InstCombinePHI.cpp
  108       Value *Ptr = nullptr;
  130   SmallVector<Value *, 4> AvailablePtrVals;
  132     Value *Arg = PN.getIncomingValue(i);
  141     Value *ArgIntToPtr = nullptr;
  233   SmallDenseMap<Value *, Instruction *> Casts;
  236     auto *IncomingVal = AvailablePtrVals[i];
  287   Value *LHSVal = FirstInst->getOperand(0);
  288   Value *RHSVal = FirstInst->getOperand(1);
  322   Value *InLHS = FirstInst->getOperand(0);
  323   Value *InRHS = FirstInst->getOperand(1);
  346         Value *NewInLHS = InInst->getOperand(0);
  350         Value *NewInRHS = InInst->getOperand(1);
  379   SmallVector<Value*, 16> FixedOperands(FirstInst->op_begin(),
  452     Value *FirstOp = FirstInst->getOperand(i);
  476   Value *Base = FixedOperands[0];
  596   Value *InVal = FirstLI->getOperand(0);
  621     Value *NewInVal = LI->getOperand(0);
  640     for (Value *IncValue : PN.incoming_values())
  666   for (Value *V : Phi.incoming_values()) {
  677   SmallVector<Value *, 4> NewIncoming;
  680   for (Value *V : Phi.incoming_values()) {
  783   Value *InVal = FirstInst->getOperand(0);
  788     Value *NewInVal = cast<Instruction>(PN.getIncomingValue(i))->getOperand(0);
  794   Value *PhiVal;
  854 static bool PHIsEqualValue(PHINode *PN, Value *NonPhiInVal,
  866   for (Value *Op : PN->incoming_values()) {
  881   for (Value *V : PN.operands())
 1031   DenseMap<BasicBlock*, Value*> PredValues;
 1057         Value *&PredVal = PredValues[Pred];
 1066         Value *InVal = PN->getIncomingValue(i);
 1076           if (Value *Res = ExtractedVals[LoweredPHIRecord(InPHI, Offset, Ty)]) {
 1085         Value *Res = InVal;
 1119   Value *Undef = UndefValue::get(FirstPhi.getType());
 1128   if (Value *V = SimplifyInstruction(&PN, SQ.getWithInstruction(&PN)))
 1187         Value *VA = PN.getIncomingValue(i);
 1211       Value *NonPhiInVal = PN.getIncomingValue(InValNo);
 1216         Value *OpVal = PN.getIncomingValue(InValNo);
 1242         Value *VA = PN.getIncomingValue(i);
 1244         Value *VB = PN.getIncomingValue(j);
lib/Transforms/InstCombine/InstCombineSelect.cpp
   49 static Value *createMinMax(InstCombiner::BuilderTy &Builder,
   50                            SelectPatternFlavor SPF, Value *A, Value *B) {
   50                            SelectPatternFlavor SPF, Value *A, Value *B) {
   61   Value *X;
   94   Value *Y;
  123 static Value *foldSelectICmpAnd(SelectInst &Sel, ICmpInst *Cmp,
  135   Value *V;
  295   Value *Cond = SI.getCondition();
  329     Value *NewSI =
  337   Value *X, *Y;
  340     Value *NewSel = Builder.CreateSelect(Cond, X, Y, SI.getName() + ".v", &SI);
  358   Value *MatchOp, *OtherOpT, *OtherOpF;
  394   Value *NewSI = Builder.CreateSelect(Cond, OtherOpT, OtherOpF,
  396   Value *Op0 = MatchIsOpZero ? MatchOp : NewSI;
  397   Value *Op1 = MatchIsOpZero ? NewSI : MatchOp;
  424 Instruction *InstCombiner::foldSelectIntoOp(SelectInst &SI, Value *TrueVal,
  425                                             Value *FalseVal) {
  440           Value *OOp = TVI->getOperand(2-OpToFold);
  446             Value *C = ConstantInt::get(OOp->getType(), CI);
  447             Value *NewSel = Builder.CreateSelect(SI.getCondition(), OOp, C);
  471           Value *OOp = FVI->getOperand(2-OpToFold);
  477             Value *C = ConstantInt::get(OOp->getType(), CI);
  478             Value *NewSel = Builder.CreateSelect(SI.getCondition(), C, OOp);
  502                                          Value *TVal, Value *FVal,
  502                                          Value *TVal, Value *FVal,
  510   Value *B;
  515   Value *X, *Z;
  520   Value *Y;
  527   Value *MaskB = HasShift ? Builder.CreateShl(One, Z) : One;
  528   Value *FullMask = Builder.CreateOr(Y, MaskB);
  529   Value *MaskedX = Builder.CreateAnd(X, FullMask);
  530   Value *ICmpNeZero = Builder.CreateIsNotNull(MaskedX);
  539 static Value *foldSelectICmpLshrAshr(const ICmpInst *IC, Value *TrueVal,
  539 static Value *foldSelectICmpLshrAshr(const ICmpInst *IC, Value *TrueVal,
  540                                      Value *FalseVal,
  543   Value *CmpLHS = IC->getOperand(0);
  544   Value *CmpRHS = IC->getOperand(1);
  548   Value *X, *Y;
  587 static Value *foldSelectICmpAndOr(const ICmpInst *IC, Value *TrueVal,
  587 static Value *foldSelectICmpAndOr(const ICmpInst *IC, Value *TrueVal,
  588                                   Value *FalseVal,
  596   Value *CmpLHS = IC->getOperand(0);
  597   Value *CmpRHS = IC->getOperand(1);
  599   Value *V;
  641   Value *Y = OrOnFalseVal ? TrueVal : FalseVal;
  651   Value *Or = OrOnFalseVal ? FalseVal : TrueVal;
  680 static Value *canonicalizeSaturatedSubtract(const ICmpInst *ICI,
  681                                             const Value *TrueVal,
  682                                             const Value *FalseVal,
  696   Value *A = ICI->getOperand(0);
  697   Value *B = ICI->getOperand(1);
  721   Value *Result = Builder.CreateBinaryIntrinsic(Intrinsic::usub_sat, A, B);
  727 static Value *canonicalizeSaturatedAdd(ICmpInst *Cmp, Value *TVal, Value *FVal,
  727 static Value *canonicalizeSaturatedAdd(ICmpInst *Cmp, Value *TVal, Value *FVal,
  727 static Value *canonicalizeSaturatedAdd(ICmpInst *Cmp, Value *TVal, Value *FVal,
  733   Value *Cmp0 = Cmp->getOperand(0);
  734   Value *Cmp1 = Cmp->getOperand(1);
  736   Value *X;
  767   Value *Y;
  803 static Instruction *foldSelectCtlzToCttz(ICmpInst *ICI, Value *TrueVal,
  804                                          Value *FalseVal,
  820   Value *X = ICI->getOperand(0);
  842 static Value *foldSelectCttzCtlz(ICmpInst *ICI, Value *TrueVal, Value *FalseVal,
  842 static Value *foldSelectCttzCtlz(ICmpInst *ICI, Value *TrueVal, Value *FalseVal,
  842 static Value *foldSelectCttzCtlz(ICmpInst *ICI, Value *TrueVal, Value *FalseVal,
  845   Value *CmpLHS = ICI->getOperand(0);
  846   Value *CmpRHS = ICI->getOperand(1);
  852   Value *Count = FalseVal;
  853   Value *ValueOnZero = TrueVal;
  858   Value *V = nullptr;
  896   Value *CmpLHS = Cmp.getOperand(0);
  897   Value *CmpRHS = Cmp.getOperand(1);
  898   Value *TrueVal = Sel.getTrueValue();
  899   Value *FalseVal = Sel.getFalseValue();
  997   Value *LHS, *RHS;
 1037   Value *LHS, *RHS;
 1043   Value *TVal = Sel.getTrueValue();
 1044   Value *FVal = Sel.getFalseValue();
 1105 static Value *simplifyWithOpReplaced(Value *V, Value *Op, Value *ReplaceOp,
 1105 static Value *simplifyWithOpReplaced(Value *V, Value *Op, Value *ReplaceOp,
 1105 static Value *simplifyWithOpReplaced(Value *V, Value *Op, Value *ReplaceOp,
 1105 static Value *simplifyWithOpReplaced(Value *V, Value *Op, Value *ReplaceOp,
 1137 static Value *foldSelectValueEquivalence(SelectInst &Sel, ICmpInst &Cmp,
 1143   Value *TrueVal = Sel.getTrueValue(), *FalseVal = Sel.getFalseValue();
 1152   Value *CmpLHS = Cmp.getOperand(0), *CmpRHS = Cmp.getOperand(1);
 1180   Value *X = Sel0.getTrueValue();
 1181   Value *Sel1 = Sel0.getFalseValue();
 1187   Value *Cmp00 = Cmp0.getOperand(0);
 1236   Value *Cmp1;
 1239   Value *ReplacementLow, *ReplacementHigh;
 1297   Value *ShouldReplaceLow = Builder.CreateICmpSLT(X, ThresholdLowIncl);
 1298   Value *ShouldReplaceHigh = Builder.CreateICmpSGE(X, ThresholdHighExcl);
 1299   Value *MaybeReplacedLow =
 1319   Value *X;
 1342   Value *SelVal0, *SelVal1; // We do not care which one is from where.
 1373   Value *NewCmp = Builder.CreateICmp(Pred, X, FlippedStrictness->second,
 1385   if (Value *V = foldSelectValueEquivalence(SI, *ICI, SQ))
 1403   if (Value *V = foldSelectICmpAnd(SI, ICI, Builder))
 1407   Value *TrueVal = SI.getTrueValue();
 1408   Value *FalseVal = SI.getFalseValue();
 1410   Value *CmpLHS = ICI->getOperand(0);
 1411   Value *CmpRHS = ICI->getOperand(1);
 1430     Value *X;
 1451       Value *V = nullptr;
 1481   if (Value *V = foldSelectICmpAndOr(ICI, TrueVal, FalseVal, Builder))
 1484   if (Value *V = foldSelectICmpLshrAshr(ICI, TrueVal, FalseVal, Builder))
 1487   if (Value *V = foldSelectCttzCtlz(ICI, TrueVal, FalseVal, Builder))
 1490   if (Value *V = canonicalizeSaturatedSubtract(ICI, TrueVal, FalseVal, Builder))
 1493   if (Value *V = canonicalizeSaturatedAdd(ICI, TrueVal, FalseVal, Builder))
 1508 static bool canSelectOperandBeMappingIntoPredBlock(const Value *V,
 1538                                         Value *A, Value *B,
 1538                                         Value *A, Value *B,
 1540                                         SelectPatternFlavor SPF2, Value *C) {
 1607     Value *NewSI =
 1630   Value *NotA, *NotB, *NotC;
 1653     Value *NewInner = createMinMax(Builder, getInverseMinMaxFlavor(SPF1), NotA,
 1655     Value *NewOuter = Builder.CreateNot(
 1667   Value *CondVal = SI.getCondition();
 1668   Value *TrueVal = SI.getTrueValue();
 1669   Value *FalseVal = SI.getFalseValue();
 1691     Value *OtherAddOp = nullptr;
 1701       Value *NegVal; // Compute -Z
 1713       Value *NewTrueOp = OtherAddOp;
 1714       Value *NewFalseOp = NegVal;
 1717       Value *NewSel = Builder.CreateSelect(CondVal, NewTrueOp, NewFalseOp,
 1752   Value *X = ExtInst->getOperand(0);
 1754   Value *Cond = Sel.getCondition();
 1766     Value *TruncCVal = cast<Value>(TruncC);
 1766     Value *TruncCVal = cast<Value>(TruncC);
 1772     Value *NewSel = Builder.CreateSelect(Cond, X, TruncCVal, "narrow", &Sel);
 1799   Value *CondVal = SI.getCondition();
 1845   Value *Cond = Sel.getCondition();
 1853   Value *SplatCond = Builder.CreateVectorSplat(NumElts, Cond);
 1863   Value *Cond = Sel.getCondition();
 1864   Value *TVal = Sel.getTrueValue();
 1865   Value *FVal = Sel.getFalseValue();
 1868   Value *A, *B;
 1877   Value *C, *D;
 1882   Value *TSrc, *FSrc;
 1890   Value *NewSel;
 1977 static Instruction *moveAddAfterMinMax(SelectPatternFlavor SPF, Value *X,
 1978                                        Value *Y,
 1985   Value *A;
 1991     Value *NewMinMax = createMinMax(Builder, SPF, A,
 2004       Value *NewMinMax = createMinMax(Builder, SPF, A,
 2053   Value *A, *B;
 2073   Value *AT = Builder.CreateSExt(A, NewTy);
 2074   Value *BT = Builder.CreateSExt(B, NewTy);
 2075   Value *Sat = Builder.CreateCall(F, {AT, BT});
 2080 static Instruction *factorizeMinMaxTree(SelectPatternFlavor SPF, Value *LHS,
 2081                                         Value *RHS,
 2089   Value *A, *B, *C, *D;
 2098   Value *MinMaxOp = nullptr;
 2099   Value *ThirdOp = nullptr;
 2132   Value *CmpABC = Builder.CreateICmp(P, MinMaxOp, ThirdOp);
 2142   Value *Or0, *Or1;
 2146   Value *TVal = Sel.getTrueValue();
 2147   Value *SA0, *SA1;
 2166   Value *ShAmt;
 2175   Value *Cond = Sel.getCondition();
 2191   Value *CondVal = SI.getCondition();
 2192   Value *TrueVal = SI.getTrueValue();
 2193   Value *FalseVal = SI.getFalseValue();
 2212   if (Value *V = SimplifySelectInst(CondVal, TrueVal, FalseVal,
 2247       Value *NotCond = Builder.CreateNot(CondVal, "not." + CondVal->getName());
 2256       Value *NotCond = Builder.CreateNot(CondVal, "not." + CondVal->getName());
 2293       Value *NotCond = Builder.CreateNot(CondVal, "not." + CondVal->getName());
 2299       Value *NotCond = Builder.CreateNot(CondVal, "not." + CondVal->getName());
 2316         Value *NewCond = Builder.CreateFCmp(InvPred, TrueVal, FalseVal,
 2334         Value *NewCond = Builder.CreateFCmp(InvPred, FalseVal, TrueVal,
 2357     Value *Fabs = Builder.CreateUnaryIntrinsic(Intrinsic::fabs, FalseVal, FSub);
 2365     Value *Fabs = Builder.CreateUnaryIntrinsic(Intrinsic::fabs, TrueVal, FSub);
 2378     Value *Fabs = Builder.CreateUnaryIntrinsic(Intrinsic::fabs, FalseVal, FNeg);
 2390     Value *Fabs = Builder.CreateUnaryIntrinsic(Intrinsic::fabs, TrueVal, FNeg);
 2417     Value *LHS, *RHS;
 2422       Value *LHS2, *RHS2;
 2441       Value *CmpLHS = cast<CmpInst>(CondVal)->getOperand(0);
 2442       Value *CmpRHS = cast<CmpInst>(CondVal)->getOperand(1);
 2449         Value *Cmp;
 2460         Value *NewSI = Builder.CreateSelect(Cmp, LHS, RHS, SI.getName(), &SI);
 2464         Value *NewCast = Builder.CreateCast(CastOp, NewSI, SelType);
 2473         Value *A;
 2478           Value *B = Builder.CreateNot(Y);
 2479           Value *NewMinMax = createMinMax(Builder, getInverseMinMaxFlavor(SPF),
 2513     Value *X, *Y;
 2544         Value *And = Builder.CreateAnd(CondVal, TrueSI->getCondition());
 2562         Value *Or = Builder.CreateOr(CondVal, FalseSI->getCondition());
 2625   Value *NotCond;
 2638     if (Value *V = SimplifyDemandedVectorElts(&SI, AllOnesEltMask, UndefElts)) {
lib/Transforms/InstCombine/InstCombineShifts.cpp
   31 Value *InstCombiner::reassociateShiftAmtsOfTwoSameDirectionShifts(
   36   Value *ShAmt0;
   45   Value *Trunc = nullptr;
   52   Value *X, *ShAmt1;
  182   Value *Masked, *ShiftShAmt;
  191   Value *MaskShAmt;
  203   Value *X;
  287   Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1);
  291   Value *Y;
  293     Value *NewExt = Builder.CreateZExt(Y, I.getType(), Op1->getName());
  317   Value *A;
  332     Value *Rem = Builder.CreateAnd(A, ConstantInt::get(I.getType(), *B - 1),
  395 static bool canEvaluateShifted(Value *V, unsigned NumBits, bool IsLeftShift,
  448     Value *TrueVal = SI->getTrueValue();
  449     Value *FalseVal = SI->getFalseValue();
  458     for (Value *IncValue : PN->incoming_values())
  468 static Value *foldShiftedShift(BinaryOperator *InnerShift, unsigned OuterShAmt,
  510     Value *And = Builder.CreateAnd(InnerShift->getOperand(0),
  531 static Value *getShiftedValue(Value *V, unsigned NumBits, bool isLeftShift,
  531 static Value *getShiftedValue(Value *V, unsigned NumBits, bool isLeftShift,
  602 Instruction *InstCombiner::FoldShiftByConstant(Value *Op0, Constant *Op1,
  647       Value *NSh = Builder.CreateBinOp(I.getOpcode(), TrOp, ShAmt, I.getName());
  669       Value *And = Builder.CreateAnd(NSh,
  681       Value *V1, *V2;
  694           Value *YS =         // (Y << C)
  697           Value *X = Builder.CreateBinOp(Op0BO->getOpcode(), YS, V1,
  709         Value *Op0BOOp1 = Op0BO->getOperand(1);
  714           Value *YS =   // (Y << C)
  717           Value *XM = Builder.CreateAnd(V1, ConstantExpr::getShl(CC, Op1),
  729           Value *YS =  // (Y << C)
  732           Value *X = Builder.CreateBinOp(Op0BO->getOpcode(), V1, YS,
  748           Value *YS = // (Y << C)
  751           Value *XM = Builder.CreateAnd(V1, ConstantExpr::getShl(CC, Op1),
  770           Value *NewShift =
  787         Value *NewShift = Builder.CreateShl(Op0BO->getOperand(1), Op1);
  802     Value *Cond;
  804     Value *FalseVal;
  814         Value *NewShift =
  816         Value *NewOp = Builder.CreateBinOp(TBO->getOpcode(), NewShift,
  823     Value *TrueVal;
  833         Value *NewShift =
  835         Value *NewOp = Builder.CreateBinOp(FBO->getOpcode(), NewShift,
  848   if (Value *V = SimplifyShlInst(I.getOperand(0), I.getOperand(1),
  861   Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1);
  871     Value *X;
  932   Value *X;
  935     Value *Mask = Builder.CreateShl(AllOnes, Op1);
  942     Value *X;
  968   if (Value *V = SimplifyLShrInst(I.getOperand(0), I.getOperand(1), I.isExact(),
  978   Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1);
  994       Value *Cmp = Builder.CreateICmpEQ(II->getArgOperand(0), RHS);
  998     Value *X;
 1011         Value *NewLShr = Builder.CreateLShr(X, ShiftDiff, "", I.isExact());
 1025         Value *NewShl = Builder.CreateShl(X, ShiftDiff);
 1040       Value *NewLShr = Builder.CreateLShr(X, ShAmt);
 1055           Value *NewLShr = Builder.CreateLShr(X, SrcTyBitWidth - 1);
 1064         Value *AShr = Builder.CreateAShr(X, NewShAmt);
 1086   Value *X;
 1089     Value *Mask = Builder.CreateLShr(AllOnes, Op1);
 1112   Value *NBits;
 1130   Value *X, *NumLowBitsToSkip;
 1166   if (Value *V = SimplifyAShrInst(I.getOperand(0), I.getOperand(1), I.isExact(),
 1176   Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1);
 1186     Value *X;
 1227       Value *NewSh = Builder.CreateAShr(X, ConstantInt::get(SrcTy, ShAmt));
lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
   45   Value *Op = I->getOperand(OpNo);
   69   Value *V = SimplifyDemandedUseBits(&Inst, DemandedMask, Known,
   85   Value *NewVal = SimplifyDemandedUseBits(U.get(), DemandedMask, Known,
  116 Value *InstCombiner::SimplifyDemandedUseBits(Value *V, APInt DemandedMask,
  116 Value *InstCombiner::SimplifyDemandedUseBits(Value *V, APInt DemandedMask,
  317     Value *LHS, *RHS;
  471           if (Value *R = simplifyShrShlDemandedBits(Shr, *ShrAmt, I, *SA,
  762 Value *InstCombiner::SimplifyMultipleUseDemandedBits(Instruction *I,
  903 Value *
  911   Value *VarX = Shr->getOperand(0);
  971 Value *InstCombiner::simplifyAMDGCNMemoryIntrinsicDemanded(IntrinsicInst *II,
 1042   SmallVector<Value *, 16> Args;
 1070   Value *Shuffle =
 1089 Value *InstCombiner::SimplifyDemandedVectorElts(Value *V, APInt DemandedElts,
 1089 Value *InstCombiner::SimplifyDemandedVectorElts(Value *V, APInt DemandedElts,
 1170     Value *Op = II ? II->getArgOperand(OpNum) : Inst->getOperand(OpNum);
 1171     if (Value *V = SimplifyDemandedVectorElts(Op, Demanded, Undef, Depth + 1)) {
 1312       Value *Op = nullptr;
lib/Transforms/InstCombine/InstCombineVectorOps.cpp
   52 static bool cheapToScalarize(Value *V, bool IsConstantExtractIndex) {
   66   Value *V0, *V1;
  120     Value *PHIInVal = PN->getIncomingValue(i);
  122     Value *Elt = EI.getIndexOperand();
  130       Value *Op = InsertNewInstWith(
  134       Value *newPHIUser = InsertNewInstWith(
  165   Value *X;
  180     if (Value *Elt = findScalarElement(X, ExtIndexC))
  186     Value *Scalar;
  257 static APInt findDemandedEltsBySingleUser(Value *V, Instruction *UserInstr) {
  300 static APInt findDemandedEltsByAllUsers(Value *V) {
  320   Value *SrcVec = EI.getVectorOperand();
  321   Value *Index = EI.getIndexOperand();
  322   if (Value *V = SimplifyExtractElementInst(SrcVec, Index,
  344         if (Value *V =
  355           if (Value *V = SimplifyDemandedVectorElts(
  379     Value *X = BO->getOperand(0), *Y = BO->getOperand(1);
  380     Value *E0 = Builder.CreateExtractElement(X, Index);
  381     Value *E1 = Builder.CreateExtractElement(Y, Index);
  385   Value *X, *Y;
  390     Value *E0 = Builder.CreateExtractElement(X, Index);
  391     Value *E1 = Builder.CreateExtractElement(Y, Index);
  412         Value *Src;
  434         Value *EE = Builder.CreateExtractElement(CI->getOperand(0), Index);
  445 static bool collectSingleShuffleElements(Value *V, Value *LHS, Value *RHS,
  445 static bool collectSingleShuffleElements(Value *V, Value *LHS, Value *RHS,
  445 static bool collectSingleShuffleElements(Value *V, Value *LHS, Value *RHS,
  471     Value *VecOp    = IEI->getOperand(0);
  472     Value *ScalarOp = IEI->getOperand(1);
  473     Value *IdxOp    = IEI->getOperand(2);
  546   Value *ExtVecOp = ExtElt->getVectorOperand();
  604 using ShuffleOps = std::pair<Value *, Value *>;
  604 using ShuffleOps = std::pair<Value *, Value *>;
  606 static ShuffleOps collectShuffleElements(Value *V,
  608                                          Value *PermittedRHS,
  626     Value *VecOp    = IEI->getOperand(0);
  627     Value *ScalarOp = IEI->getOperand(1);
  628     Value *IdxOp    = IEI->getOperand(2);
  639           Value *RHS = EI->getOperand(0);
  705   Value *V = &I;
  761   Value *SplatVal = InsElt.getOperand(1);
  828   Value *X = InsElt.getOperand(1);
  829   Value *Op0 = Shuf->getOperand(0);
  864   Value *Scalar = InsElt.getOperand(1);
  865   Value *X = Shuf->getOperand(0);
  912   Value *X, *Y;
  920     Value *NewInsElt1 = Builder.CreateInsertElement(X, ScalarC, IdxC2);
 1027   Value *VecOp    = IE.getOperand(0);
 1028   Value *ScalarOp = IE.getOperand(1);
 1029   Value *IdxOp    = IE.getOperand(2);
 1031   if (auto *V = SimplifyInsertElementInst(
 1037   Value *VecSrc, *ScalarSrc;
 1045     Value *NewInsElt = Builder.CreateInsertElement(VecSrc, ScalarSrc, IdxOp);
 1052   Value *ExtVecOp;
 1100   if (Value *V = SimplifyDemandedVectorElts(&IE, AllOnesEltMask, UndefElts)) {
 1126 static bool canEvaluateShuffled(Value *V, ArrayRef<int> Mask,
 1184       for (Value *Operand : I->operands()) {
 1213 static Value *buildNew(Instruction *I, ArrayRef<Value*> NewOps) {
 1213 static Value *buildNew(Instruction *I, ArrayRef<Value*> NewOps) {
 1278       Value *Ptr = NewOps[0];
 1279       ArrayRef<Value*> Idx = NewOps.slice(1);
 1289 static Value *evaluateInDifferentElementOrder(Value *V, ArrayRef<int> Mask) {
 1289 static Value *evaluateInDifferentElementOrder(Value *V, ArrayRef<int> Mask) {
 1346       SmallVector<Value*, 8> NewOps;
 1349         Value *V;
 1385       Value *V = evaluateInDifferentElementOrder(I->getOperand(0), Mask);
 1431   Value *Op0;
 1432   Value *Op1;
 1434             Value *V0 = nullptr, Value *V1 = nullptr) :
 1434             Value *V0 = nullptr, Value *V1 = nullptr) :
 1444   Value *BO0 = BO->getOperand(0), *BO1 = BO->getOperand(1);
 1474   Value *Op0 = Shuf.getOperand(0), *Op1 = Shuf.getOperand(1);
 1509   Value *X = Op0IsBinop ? Op1 : Op0;
 1527   Value *Op0 = Shuf.getOperand(0), *Op1 = Shuf.getOperand(1);
 1529   Value *X;
 1541   Value *NewIns = Builder.CreateInsertElement(UndefVec, X, Zero);
 1580   Value *X, *Y;
 1632   Value *V;
 1693   Value *Cond, *X, *Y;
 1701   Value *NarrowCond;
 1710   Value *Undef = UndefValue::get(X->getType());
 1711   Value *NarrowX = Builder.CreateShuffleVector(X, Undef, Shuf.getMask());
 1712   Value *NarrowY = Builder.CreateShuffleVector(Y, Undef, Shuf.getMask());
 1718   Value *Op0 = Shuf.getOperand(0), *Op1 = Shuf.getOperand(1);
 1722   Value *X, *Y;
 1758   Value *V0 = Shuf.getOperand(0), *V1 = Shuf.getOperand(1);
 1805   Value *Scalar;
 1836   Value *X = Shuffle0->getOperand(0);
 1837   Value *Y = Shuffle1->getOperand(0);
 1888   Value *LHS = SVI.getOperand(0);
 1889   Value *RHS = SVI.getOperand(1);
 1890   if (auto *V = SimplifyShuffleVectorInst(
 1935   if (Value *V = SimplifyDemandedVectorElts(&SVI, AllOnesEltMask, UndefElts)) {
 1962     Value *V = evaluateInDifferentElementOrder(LHS, Mask);
 1997     Value *V = LHS;
 2005     DenseMap<Type *, Value *> NewBCs;
 2041       auto *NewBC =
 2047       auto *Ext = Builder.CreateExtractElement(
 2110   Value* LHSOp0 = nullptr;
 2111   Value* LHSOp1 = nullptr;
 2112   Value* RHSOp0 = nullptr;
 2124   Value* newLHS = LHS;
 2125   Value* newRHS = RHS;
lib/Transforms/InstCombine/InstructionCombining.cpp
  146 Value *InstCombiner::EmitGEPOffset(User *GEP) {
  203 static bool maintainNoSignedWrap(BinaryOperator &I, Value *B, Value *C) {
  203 static bool maintainNoSignedWrap(BinaryOperator &I, Value *B, Value *C) {
  331         Value *A = Op0->getOperand(0);
  332         Value *B = Op0->getOperand(1);
  333         Value *C = I.getOperand(1);
  336         if (Value *V = SimplifyBinOp(Opcode, B, C, SQ.getWithInstruction(&I))) {
  364         Value *A = I.getOperand(0);
  365         Value *B = Op1->getOperand(0);
  366         Value *C = Op1->getOperand(1);
  369         if (Value *V = SimplifyBinOp(Opcode, A, B, SQ.getWithInstruction(&I))) {
  392         Value *A = Op0->getOperand(0);
  393         Value *B = Op0->getOperand(1);
  394         Value *C = I.getOperand(1);
  397         if (Value *V = SimplifyBinOp(Opcode, C, A, SQ.getWithInstruction(&I))) {
  412         Value *A = I.getOperand(0);
  413         Value *B = Op1->getOperand(0);
  414         Value *C = Op1->getOperand(1);
  417         if (Value *V = SimplifyBinOp(Opcode, C, A, SQ.getWithInstruction(&I))) {
  432       Value *A, *B;
  509 static Value *getIdentityValue(Instruction::BinaryOps Opcode, Value *V) {
  509 static Value *getIdentityValue(Instruction::BinaryOps Opcode, Value *V) {
  523                           Value *&LHS, Value *&RHS) {
  523                           Value *&LHS, Value *&RHS) {
  541 Value *InstCombiner::tryFactorization(BinaryOperator &I,
  543                                       Value *A, Value *B, Value *C, Value *D) {
  543                                       Value *A, Value *B, Value *C, Value *D) {
  543                                       Value *A, Value *B, Value *C, Value *D) {
  543                                       Value *A, Value *B, Value *C, Value *D) {
  546   Value *V = nullptr;
  547   Value *SimplifiedInst = nullptr;
  548   Value *LHS = I.getOperand(0), *RHS = I.getOperand(1);
  646 Value *InstCombiner::SimplifyUsingDistributiveLaws(BinaryOperator &I) {
  647   Value *LHS = I.getOperand(0), *RHS = I.getOperand(1);
  654     Value *A, *B, *C, *D;
  664       if (Value *V = tryFactorization(I, LHSOpcode, A, B, C, D))
  670       if (Value *Ident = getIdentityValue(LHSOpcode, RHS))
  671         if (Value *V = tryFactorization(I, LHSOpcode, A, B, RHS, Ident))
  677       if (Value *Ident = getIdentityValue(RHSOpcode, LHS))
  678         if (Value *V = tryFactorization(I, RHSOpcode, LHS, Ident, C, D))
  686     Value *A = Op0->getOperand(0), *B = Op0->getOperand(1), *C = RHS;
  689     Value *L = SimplifyBinOp(TopLevelOpcode, A, C, SQ.getWithInstruction(&I));
  690     Value *R = SimplifyBinOp(TopLevelOpcode, B, C, SQ.getWithInstruction(&I));
  723     Value *A = LHS, *B = Op1->getOperand(0), *C = Op1->getOperand(1);
  726     Value *L = SimplifyBinOp(TopLevelOpcode, A, B, SQ.getWithInstruction(&I));
  727     Value *R = SimplifyBinOp(TopLevelOpcode, A, C, SQ.getWithInstruction(&I));
  760 Value *InstCombiner::SimplifySelectsFeedingBinaryOp(BinaryOperator &I,
  761                                                     Value *LHS, Value *RHS) {
  761                                                     Value *LHS, Value *RHS) {
  765   Value *A, *B, *C, *D, *E;
  766   Value *SI = nullptr;
  778     Value *V1 = SimplifyBinOp(Opcode, C, E, FMF, SQ.getWithInstruction(&I));
  779     Value *V2 = SimplifyBinOp(Opcode, B, D, FMF, SQ.getWithInstruction(&I));
  796 Value *InstCombiner::dyn_castNegVal(Value *V) const {
  796 Value *InstCombiner::dyn_castNegVal(Value *V) const {
  797   Value *NegV;
  827 static Value *foldOperationIntoSelectOperand(Instruction &I, Value *SO,
  827 static Value *foldOperationIntoSelectOperand(Instruction &I, Value *SO,
  844   Value *Op0 = SO, *Op1 = ConstOperand;
  849   Value *RI = Builder.CreateBinOp(BO->getOpcode(), Op0, Op1,
  862   Value *TV = SI->getTrueValue();
  863   Value *FV = SI->getFalseValue();
  895       Value *Op0 = CI->getOperand(0), *Op1 = CI->getOperand(1);
  902   Value *NewTV = foldOperationIntoSelectOperand(Op, TV, Builder);
  903   Value *NewFV = foldOperationIntoSelectOperand(Op, FV, Builder);
  907 static Value *foldOperationIntoPhiValue(BinaryOperator *I, Value *InV,
  907 static Value *foldOperationIntoPhiValue(BinaryOperator *I, Value *InV,
  918   Value *Op0 = InV, *Op1 = C;
  922   Value *RI = Builder.CreateBinOp(I->getOpcode(), Op0, Op1, "phitmp");
  954     Value *InVal = PN->getIncomingValue(i);
  999     Value *TrueV = SI->getTrueValue();
 1000     Value *FalseV = SI->getFalseValue();
 1004       Value *TrueVInPred = TrueV->DoPHITranslation(PhiTransBB, ThisBB);
 1005       Value *FalseVInPred = FalseV->DoPHITranslation(PhiTransBB, ThisBB);
 1006       Value *InV = nullptr;
 1034       Value *InV = nullptr;
 1047       Value *InV = foldOperationIntoPhiValue(BO, PN->getIncomingValue(i),
 1055       Value *InV;
 1093                                         SmallVectorImpl<Value *> &NewIndices) {
 1162 Value *InstCombiner::Descale(Value *Val, APInt Scale, bool &NoSignedWrap) {
 1162 Value *InstCombiner::Descale(Value *Val, APInt Scale, bool &NoSignedWrap) {
 1196   Value *Op = Val;
 1234         Value *LHS = BO->getOperand(0);
 1235         Value *RHS = BO->getOperand(1);
 1270         Value *LHS = BO->getOperand(0);
 1407   Value *LHS = Inst.getOperand(0), *RHS = Inst.getOperand(1);
 1414   Value *L0, *L1, *R0, *R1;
 1426     Value *NewBO0 = Builder.CreateBinOp(Opcode, L0, R0);
 1429     Value *NewBO1 = Builder.CreateBinOp(Opcode, L1, R1);
 1442     Value *XY = Builder.CreateBinOp(Opcode, X, Y);
 1450   Value *V1, *V2;
 1553       Value *NewLHS = ConstOp1 ? V1 : NewC;
 1554       Value *NewRHS = ConstOp1 ? NewC : V1;
 1567   Value *Op0 = BO.getOperand(0), *Op1 = BO.getOperand(1);
 1574   Value *X;
 1582   Value *Y;
 1608   Value *NarrowBO = Builder.CreateBinOp(BO.getOpcode(), X, Y, "narrow");
 1619   SmallVector<Value*, 8> Ops(GEP.op_begin(), GEP.op_end());
 1622   if (Value *V = SimplifyGEPInst(GEPEltType, Ops, SQ.getWithInstruction(&GEP)))
 1630     if (Value *V = SimplifyDemandedVectorElts(&GEP, AllOnesEltMask,
 1642   Value *PtrOp = GEP.getOperand(0);
 1804         Value *GO1 = GEP.getOperand(1);
 1805         Value *SO1 = Src->getOperand(1);
 1827           auto *SO0 = Src->getOperand(0);
 1857     SmallVector<Value*, 8> Indices;
 1869       Value *SO1 = Src->getOperand(Src->getNumOperands()-1);
 1870       Value *GO1 = GEP.getOperand(1);
 1879       Value *Sum =
 1921       Value *V = nullptr;
 1942           Value *PtrToInt = Builder.CreatePtrToInt(PtrOp, Index->getType());
 1943           Value *NewSub = Builder.CreateSub(PtrToInt, Index->getOperand(1));
 1948         Value *Y;
 1961   Value *StrippedPtr = PtrOp->stripPointerCasts();
 1983           SmallVector<Value*, 8> Idx(GEP.idx_begin()+1, GEP.idx_end());
 2020             SmallVector<Value*, 8> Idx(GEP.idx_begin(), GEP.idx_end());
 2021             Value *NewGEP =
 2039         Value *Idx[2] = { Constant::getNullValue(IdxType), GEP.getOperand(1) };
 2040         Value *NewGEP =
 2061           Value *Idx = GEP.getOperand(1);
 2072           if (Value *NewIdx = Descale(Idx, APInt(BitWidth, Scale), NSW)) {
 2076             Value *NewGEP =
 2102           Value *Idx = GEP.getOperand(1);
 2113           if (Value *NewIdx = Descale(Idx, APInt(BitWidth, Scale), NSW)) {
 2118             Value *Off[2] = {Constant::getNullValue(IndTy), NewIdx};
 2120             Value *NewGEP =
 2138   Value *ASCStrippedPtrOp = PtrOp;
 2149     Value *SrcOp = BCI->getOperand(0);
 2171       Value *NGEP =
 2217       SmallVector<Value*, 8> NewIndices;
 2219         Value *NGEP =
 2239     Value *UnderlyingPtrOp =
 2258 static bool isNeverEqualToUnescapedAlloc(Value *V, const TargetLibraryInfo *TLI,
 2386           Value *Result =
 2447   Value *Op = FI.getArgOperand(0);
 2512   Value *Op = FI.getArgOperand(0);
 2543   Value *ResultOp = RI.getOperand(0);
 2559   Value *X = nullptr;
 2593   Value *Cond = SI.getCondition();
 2594   Value *Op0;
 2631     Value *NewCond = Builder.CreateTrunc(Cond, Ty, "trunc");
 2645   Value *Agg = EV.getAggregateOperand();
 2650   if (Value *V = SimplifyExtractValueInst(Agg, EV.getIndices(),
 2688       Value *NewEV = Builder.CreateExtractValue(IV->getAggregateOperand(),
 2714         Value *LHS = WO->getLHS(), *RHS = WO->getRHS();
 2737       SmallVector<Value*, 4> Indices;
 2747       Value *GEP = Builder.CreateInBoundsGEP(L->getType(),
 2798 static bool shorter_filter(const Value *LHS, const Value *RHS) {
 2798 static bool shorter_filter(const Value *LHS, const Value *RHS) {
 2818   SmallPtrSet<Value *, 16> AlreadyCaught; // Typeinfos known caught already.
 2889         SmallPtrSet<Value *, 16> SeenInFilter; // For uniquing the elements.
 3001     Value *Filter = NewClauses[i];
 3010       Value *LFilter = NewClauses[j];
 3066         Value *FTypeInfo = FArray->getOperand(f)->stripPointerCasts();
 3069           Value *LTypeInfo = LArray->getOperand(l)->stripPointerCasts();
 3191         Value *Undef = UndefValue::get(I->getType());
lib/Transforms/Instrumentation/AddressSanitizer.cpp
  619   Value *isInterestingMemoryAccess(Instruction *I, bool *IsWrite,
  621                                    Value **MaybeMask = nullptr);
  627                          Value *Addr, uint32_t TypeSize, bool IsWrite,
  628                          Value *SizeArgument, bool UseCalls, uint32_t Exp);
  630                                         Instruction *InsertBefore, Value *Addr,
  632                                         Value *SizeArgument, bool UseCalls,
  634   Value *createSlowPathCmp(IRBuilder<> &IRB, Value *AddrLong,
  634   Value *createSlowPathCmp(IRBuilder<> &IRB, Value *AddrLong,
  635                            Value *ShadowValue, uint32_t TypeSize);
  636   Instruction *generateCrashCode(Instruction *InsertBefore, Value *Addr,
  638                                  Value *SizeArgument, uint32_t Exp);
  640   Value *memToShadow(Value *Shadow, IRBuilder<> &IRB);
  640   Value *memToShadow(Value *Shadow, IRBuilder<> &IRB);
  653   bool isSafeAccess(ObjectSizeOffsetVisitor &ObjSizeVis, Value *Addr,
  694   Value *LocalDynamicShadow = nullptr;
  906   using AllocaForValueMapTy = DenseMap<Value *, AllocaInst *>;
  974                                         Value *SavedStack) {
  976     Value *DynamicAreaPtr = IRB.CreatePtrToInt(SavedStack, IntptrTy);
  986       Value *DynamicAreaOffset = IRB.CreateCall(DynamicAreaOffsetFunc, {});
 1095                     IRBuilder<> &IRB, Value *ShadowBase);
 1098                     Value *ShadowBase);
 1101                           size_t End, IRBuilder<> &IRB, Value *ShadowBase);
 1103   void poisonAlloca(Value *V, uint64_t Size, IRBuilder<> &IRB, bool DoPoison);
 1105   Value *createAllocaForLayout(IRBuilder<> &IRB, const ASanStackFrameLayout &L,
 1107   PHINode *createPHI(IRBuilder<> &IRB, Value *Cond, Value *ValueIfTrue,
 1107   PHINode *createPHI(IRBuilder<> &IRB, Value *Cond, Value *ValueIfTrue,
 1108                      Instruction *ThenTerm, Value *ValueIfFalse);
 1284 Value *AddressSanitizer::memToShadow(Value *Shadow, IRBuilder<> &IRB) {
 1284 Value *AddressSanitizer::memToShadow(Value *Shadow, IRBuilder<> &IRB) {
 1289   Value *ShadowBase;
 1343 Value *AddressSanitizer::isInterestingMemoryAccess(Instruction *I,
 1347                                                    Value **MaybeMask) {
 1355   Value *PtrOperand = nullptr;
 1437 static bool isPointerOperand(Value *V) {
 1483   Value *Param[2] = {I->getOperand(0), I->getOperand(1)};
 1484   for (Value *&i : Param) {
 1492                                 Instruction *InsertBefore, Value *Addr,
 1495                                 Value *SizeArgument, bool UseCalls,
 1510                                         Value *Mask, Instruction *I,
 1511                                         Value *Addr, unsigned Alignment,
 1513                                         bool IsWrite, Value *SizeArgument,
 1520     Value *InstrumentedAddress = nullptr;
 1533       Value *MaskElem = IRB.CreateExtractElement(Mask, Idx);
 1553   Value *MaybeMask = nullptr;
 1554   Value *Addr =
 1608                                                  Value *Addr, bool IsWrite,
 1610                                                  Value *SizeArgument,
 1613   Value *ExpVal = Exp == 0 ? nullptr : ConstantInt::get(IRB.getInt32Ty(), Exp);
 1638 Value *AddressSanitizer::createSlowPathCmp(IRBuilder<> &IRB, Value *AddrLong,
 1638 Value *AddressSanitizer::createSlowPathCmp(IRBuilder<> &IRB, Value *AddrLong,
 1639                                            Value *ShadowValue,
 1643   Value *LastAccessedByte =
 1657                                          Instruction *InsertBefore, Value *Addr,
 1659                                          Value *SizeArgument, bool UseCalls,
 1664   Value *AddrLong = IRB.CreatePointerCast(Addr, IntptrTy);
 1682     Value *Tag = IRB.CreateLShr(AddrLong, kMyriadTagShift);
 1684     Value *TagCheck =
 1698   Value *ShadowPtr = memToShadow(AddrLong, IRB);
 1699   Value *CmpVal = Constant::getNullValue(ShadowTy);
 1700   Value *ShadowValue =
 1703   Value *Cmp = IRB.CreateICmpNE(ShadowValue, CmpVal);
 1715     Value *Cmp2 = createSlowPathCmp(IRB, AddrLong, ShadowValue, TypeSize);
 1739     Instruction *I, Instruction *InsertBefore, Value *Addr, uint32_t TypeSize,
 1740     bool IsWrite, Value *SizeArgument, bool UseCalls, uint32_t Exp) {
 1742   Value *Size = ConstantInt::get(IntptrTy, TypeSize / 8);
 1743   Value *AddrLong = IRB.CreatePointerCast(Addr, IntptrTy);
 1752     Value *LastByte = IRB.CreateIntToPtr(
 1767   Value *ModuleNameAddr = ConstantExpr::getPointerCast(ModuleName, IntptrTy);
 2315     Value *Indices2[2];
 2577     Value *GlobalDynamicAddress = F.getParent()->getOrInsertGlobal(
 2600       for (Value *Arg : II->arg_operands()) {
 2642   SmallPtrSet<Value *, 16> TempsToInstrument;
 2659       Value *MaybeMask = nullptr;
 2660       if (Value *Addr = isInterestingMemoryAccess(&Inst, &IsWrite, &TypeSize,
 2794                                                Value *ShadowBase) {
 2833     Value *Ptr = IRB.CreateAdd(ShadowBase, ConstantInt::get(IntptrTy, i));
 2834     Value *Poison = IRB.getIntN(StoreSizeInBytes * 8, Val);
 2844                                          IRBuilder<> &IRB, Value *ShadowBase) {
 2851                                          IRBuilder<> &IRB, Value *ShadowBase) {
 2918 PHINode *FunctionStackPoisoner::createPHI(IRBuilder<> &IRB, Value *Cond,
 2919                                           Value *ValueIfTrue,
 2921                                           Value *ValueIfFalse) {
 2930 Value *FunctionStackPoisoner::createAllocaForLayout(
 3068   Value *StaticAlloca =
 3071   Value *FakeStack;
 3072   Value *LocalStackBase;
 3073   Value *LocalStackBaseAlloca;
 3085     Value *UseAfterReturnIsEnabled = IRB.CreateICmpNE(
 3094     Value *FakeStackValue =
 3102     Value *NoFakeStack =
 3107     Value *AllocaValue =
 3130     Value *NewAllocaPtr = IRB.CreateIntToPtr(
 3138   Value *BasePlus0 = IRB.CreateIntToPtr(LocalStackBase, IntptrPtrTy);
 3142   Value *BasePlus1 = IRB.CreateIntToPtr(
 3149   Value *Description = IRB.CreatePointerCast(StackDescriptionGlobal, IntptrTy);
 3152   Value *BasePlus2 = IRB.CreateIntToPtr(
 3161   Value *ShadowBase = ASan.memToShadow(LocalStackBase, IRB);
 3204       Value *Cmp =
 3216         Value *SavedFlagPtrPtr = IRBPoison.CreateAdd(
 3219         Value *SavedFlagPtr = IRBPoison.CreateLoad(
 3242 void FunctionStackPoisoner::poisonAlloca(Value *V, uint64_t Size,
 3245   Value *AddrArg = IRB.CreatePointerCast(V, IntptrTy);
 3246   Value *SizeArg = ConstantInt::get(IntptrTy, Size);
 3266   Value *Zero = Constant::getNullValue(IntptrTy);
 3267   Value *AllocaRzSize = ConstantInt::get(IntptrTy, kAllocaRzSize);
 3268   Value *AllocaRzMask = ConstantInt::get(IntptrTy, AllocaRedzoneMask);
 3276   Value *OldSize =
 3281   Value *PartialSize = IRB.CreateAnd(OldSize, AllocaRzMask);
 3284   Value *Misalign = IRB.CreateSub(AllocaRzSize, PartialSize);
 3287   Value *Cond = IRB.CreateICmpNE(Misalign, AllocaRzSize);
 3288   Value *PartialPadding = IRB.CreateSelect(Cond, Misalign, Zero);
 3293   Value *AdditionalChunkSize = IRB.CreateAdd(
 3296   Value *NewSize = IRB.CreateAdd(OldSize, AdditionalChunkSize);
 3303   Value *NewAddress = IRB.CreateAdd(IRB.CreatePtrToInt(NewAlloca, IntptrTy),
 3313   Value *NewAddressPtr = IRB.CreateIntToPtr(NewAddress, AI->getType());
 3326                                     Value *Addr, uint64_t TypeSize) const {
lib/Transforms/Instrumentation/BoundsChecking.cpp
   56 static Value *getBoundsCheckCond(Value *Ptr, Value *InstVal,
   56 static Value *getBoundsCheckCond(Value *Ptr, Value *InstVal,
   56 static Value *getBoundsCheckCond(Value *Ptr, Value *InstVal,
   71   Value *Size   = SizeOffset.first;
   72   Value *Offset = SizeOffset.second;
   76   Value *NeededSizeVal = ConstantInt::get(IntTy, NeededSize);
   89   Value *ObjSize = IRB.CreateSub(Size, Offset);
   90   Value *Cmp2 = SizeRange.getUnsignedMin().uge(OffsetRange.getUnsignedMax())
   93   Value *Cmp3 = SizeRange.sub(OffsetRange)
   98   Value *Or = IRB.CreateOr(Cmp2, Cmp3);
  101     Value *Cmp1 = IRB.CreateICmpSLT(Offset, ConstantInt::get(IntTy, 0));
  114 static void insertBoundsCheck(Value *Or, BuilderTy IRB, GetTrapBBT GetTrapBB) {
  151   SmallVector<std::pair<Instruction *, Value *>, 4> TrapInfo;
  153     Value *Or = nullptr;
lib/Transforms/Instrumentation/ControlHeightReduction.cpp
  391                    Value *&MergedCondition, BranchProbability &CHRBranchBias);
  395                    Value *&MergedCondition, BranchProbability &CHRBranchBias);
  396   void addToMergedCondition(bool IsTrueBiased, Value *Cond,
  400                             Value *&MergedCondition);
  515 static std::set<Value *> getBaseValues(
  516     Value *V, DominatorTree &DT,
  517     DenseMap<Value *, std::set<Value *>> &Visited) {
  517     DenseMap<Value *, std::set<Value *>> &Visited) {
  521   std::set<Value *> Result;
  531     for (Value *Op : I->operands()) {
  532       std::set<Value *> OpResult = getBaseValues(Op, DT, Visited);
  555 checkHoistValue(Value *V, Instruction *InsertPoint, DominatorTree &DT,
  584       for (Value *Op : I->operands()) {
 1040 static DenseSet<Value *> getCHRConditionValuesForRegion(RegInfo &RI) {
 1041   DenseSet<Value *> ConditionValues;
 1060                         DenseSet<Value *> &PrevConditionValues,
 1061                         DenseSet<Value *> &ConditionValues,
 1076   for (Value *V : ConditionValues) {
 1088     std::set<Value *> PrevBases, Bases;
 1089     DenseMap<Value *, std::set<Value *>> Visited;
 1089     DenseMap<Value *, std::set<Value *>> Visited;
 1090     for (Value *V : PrevConditionValues) {
 1091       std::set<Value *> BaseValues = getBaseValues(V, DT, Visited);
 1094     for (Value *V : ConditionValues) {
 1095       std::set<Value *> BaseValues = getBaseValues(V, DT, Visited);
 1108     std::set<Value *> Intersection;
 1159   DenseSet<Value *> PrevConditionValues;
 1163   SmallVector<DenseSet<Value *>, 8> SplitsConditionValues;
 1168     DenseSet<Value *> ConditionValues = getCHRConditionValuesForRegion(RI);
 1244     DenseSet<Value *> &SplitConditionValues = SplitsConditionValues[I];
 1449 static void hoistValue(Value *V, Instruction *HoistPoint, Region *R,
 1486     for (Value *Op : I->operands()) {
 1669       Value *V = BI->getCondition();
 1683       Value *V = SI->getCondition();
 1804           Value *V = PN.getIncomingValue(I);
 1845   Value *MergedCondition = ConstantInt::getTrue(F.getContext());
 1884                       Value *&MergedCondition,
 1910   Value *Cond = BI->getCondition();
 1918   Value *NewCondition = ConditionTrue ?
 1928                       Value *&MergedCondition,
 1940   Value *Cond = SI->getCondition();
 1943   Value *NewCondition = IsTrueBiased ?
 1951 void CHR::addToMergedCondition(bool IsTrueBiased, Value *Cond,
 1955                                Value *&MergedCondition) {
 1969       Value *Negate = IRB.CreateXor(
lib/Transforms/Instrumentation/DataFlowSanitizer.cpp
  355   DenseMap<Value *, Function *> UnwrappedFnMap;
  359   Value *getShadowAddress(Value *Addr, Instruction *Pos);
  359   Value *getShadowAddress(Value *Addr, Instruction *Pos);
  390   Value *ArgTLSPtr = nullptr;
  391   Value *RetvalTLSPtr = nullptr;
  393   DenseMap<Value *, Value *> ValShadowMap;
  393   DenseMap<Value *, Value *> ValShadowMap;
  397   std::vector<Value *> NonZeroChecks;
  402     Value *Shadow;
  404   DenseMap<std::pair<Value *, Value *>, CachedCombinedShadow>
  404   DenseMap<std::pair<Value *, Value *>, CachedCombinedShadow>
  406   DenseMap<Value *, std::set<Value *>> ShadowElements;
  406   DenseMap<Value *, std::set<Value *>> ShadowElements;
  416   Value *getArgTLSPtr();
  417   Value *getArgTLS(unsigned Index, Instruction *Pos);
  418   Value *getRetvalTLS();
  419   Value *getShadow(Value *V);
  419   Value *getShadow(Value *V);
  420   void setShadow(Instruction *I, Value *Shadow);
  421   Value *combineShadows(Value *V1, Value *V2, Instruction *Pos);
  421   Value *combineShadows(Value *V1, Value *V2, Instruction *Pos);
  421   Value *combineShadows(Value *V1, Value *V2, Instruction *Pos);
  422   Value *combineOperandShadows(Instruction *Inst);
  423   Value *loadShadow(Value *ShadowAddr, uint64_t Size, uint64_t Align,
  423   Value *loadShadow(Value *ShadowAddr, uint64_t Size, uint64_t Align,
  425   void storeShadow(Value *Addr, uint64_t Size, uint64_t Align, Value *Shadow,
  425   void storeShadow(Value *Addr, uint64_t Size, uint64_t Align, Value *Shadow,
  666     std::vector<Value *> Args;
  688     std::vector<Value *> Args;
  894       Value *WrappedFnCst =
  975       for (Value *V : DFSF.NonZeroChecks) {
  984         Value *Ne = IRB.CreateICmpNE(V, DFSF.DFS.ZeroShadow);
  996 Value *DFSanFunction::getArgTLSPtr() {
 1006 Value *DFSanFunction::getRetvalTLS() {
 1017 Value *DFSanFunction::getArgTLS(unsigned Idx, Instruction *Pos) {
 1023 Value *DFSanFunction::getShadow(Value *V) {
 1023 Value *DFSanFunction::getShadow(Value *V) {
 1026   Value *&Shadow = ValShadowMap[V];
 1033         Value *ArgTLSPtr = getArgTLSPtr();
 1060 void DFSanFunction::setShadow(Instruction *I, Value *Shadow) {
 1066 Value *DataFlowSanitizer::getShadowAddress(Value *Addr, Instruction *Pos) {
 1066 Value *DataFlowSanitizer::getShadowAddress(Value *Addr, Instruction *Pos) {
 1069   Value *ShadowPtrMaskValue;
 1084 Value *DFSanFunction::combineShadows(Value *V1, Value *V2, Instruction *Pos) {
 1084 Value *DFSanFunction::combineShadows(Value *V1, Value *V2, Instruction *Pos) {
 1084 Value *DFSanFunction::combineShadows(Value *V1, Value *V2, Instruction *Pos) {
 1128     Value *Ne = IRB.CreateICmpNE(V1, V2);
 1146   std::set<Value *> UnionElems;
 1165 Value *DFSanFunction::combineOperandShadows(Instruction *Inst) {
 1169   Value *Shadow = getShadow(Inst->getOperand(0));
 1177   Value *CombinedShadow = DFSF.combineOperandShadows(&I);
 1183 Value *DFSanFunction::loadShadow(Value *Addr, uint64_t Size, uint64_t Align,
 1183 Value *DFSanFunction::loadShadow(Value *Addr, uint64_t Size, uint64_t Align,
 1194   SmallVector<const Value *, 2> Objs;
 1197   for (const Value *Obj : Objs) {
 1209   Value *ShadowAddr = DFS.getShadowAddress(Addr, Pos);
 1220     Value *ShadowAddr1 = IRB.CreateGEP(DFS.ShadowTy, ShadowAddr,
 1241     Value *WideAddr =
 1243     Value *WideShadow =
 1245     Value *TruncShadow = IRB.CreateTrunc(WideShadow, DFS.ShadowTy);
 1246     Value *ShlShadow = IRB.CreateShl(WideShadow, DFS.ShadowWidth);
 1247     Value *ShrShadow = IRB.CreateLShr(WideShadow, 64 - DFS.ShadowWidth);
 1248     Value *RotShadow = IRB.CreateOr(ShlShadow, ShrShadow);
 1249     Value *ShadowsEq = IRB.CreateICmpEQ(WideShadow, RotShadow);
 1277       Value *NextWideShadow = NextIRB.CreateAlignedLoad(NextIRB.getInt64Ty(),
 1316   Value *Shadow = DFSF.loadShadow(LI.getPointerOperand(), Size, Align, &LI);
 1318     Value *PtrShadow = DFSF.getShadow(LI.getPointerOperand());
 1327 void DFSanFunction::storeShadow(Value *Addr, uint64_t Size, uint64_t Align,
 1328                                 Value *Shadow, Instruction *Pos) {
 1340   Value *ShadowAddr = DFS.getShadowAddress(Addr, Pos);
 1343     Value *ExtZeroShadow = ConstantInt::get(ShadowTy, 0);
 1344     Value *ExtShadowAddr =
 1354     Value *ShadowVec = UndefValue::get(ShadowVecTy);
 1359     Value *ShadowVecAddr =
 1362       Value *CurShadowVecAddr =
 1371     Value *CurShadowAddr =
 1394   Value* Shadow = DFSF.getShadow(SI.getValueOperand());
 1396     Value *PtrShadow = DFSF.getShadow(SI.getPointerOperand());
 1460   Value *CondShadow = DFSF.getShadow(I.getCondition());
 1461   Value *TrueShadow = DFSF.getShadow(I.getTrueValue());
 1462   Value *FalseShadow = DFSF.getShadow(I.getFalseValue());
 1470     Value *ShadowSel;
 1483   Value *ValShadow = DFSF.getShadow(I.getValue());
 1492   Value *DestShadow = DFSF.DFS.getShadowAddress(I.getDest(), &I);
 1493   Value *SrcShadow = DFSF.DFS.getShadowAddress(I.getSource(), &I);
 1494   Value *LenShadow = IRB.CreateMul(
 1516       Value *S = DFSF.getShadow(RI.getReturnValue());
 1524       Value *InsVal =
 1526       Value *InsShadow =
 1549   DenseMap<Value *, Function *>::iterator i =
 1589         std::vector<Value *> Args;
 1709     Value *Func =
 1711     std::vector<Value *> Args;
 1770   Value *UndefShadow = UndefValue::get(DFSF.DFS.ShadowTy);
lib/Transforms/Instrumentation/GCOVProfiling.cpp
  822             Value *EdgeCounter = BuilderForPhi.CreateConstInBoundsGEP2_64(
  829           Value *Count = Builder.CreateLoad(Builder.getInt64Ty(), Phi);
  838             Value *Counter = Builder.CreateConstInBoundsGEP2_64(
  840             Value *Count = Builder.CreateLoad(Builder.getInt64Ty(), Counter);
 1098   auto *FileInfoPtr = Builder.CreateInBoundsGEP(
 1100   auto *StartFileCallArgsPtr =
 1124   auto *EnterCounterLoopCond =
 1131   auto *EmitFunctionCallArgsPtr = Builder.CreateInBoundsGEP(
 1157   auto *EmitArcsCallArgsPtr =
 1169   auto *NextJV = Builder.CreateAdd(JV, Builder.getInt32(1));
 1170   auto *CounterLoopCond = Builder.CreateICmpSLT(NextJV, NumCounters);
 1177   auto *NextIV = Builder.CreateAdd(IV, Builder.getInt32(1));
 1178   auto *FileLoopCond =
lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
  203   Value *getDynamicShadowIfunc(IRBuilder<> &IRB);
  204   Value *getDynamicShadowNonTls(IRBuilder<> &IRB);
  206   void untagPointerOperand(Instruction *I, Value *Addr);
  207   Value *shadowBase();
  208   Value *memToShadow(Value *Shadow, IRBuilder<> &IRB);
  208   Value *memToShadow(Value *Shadow, IRBuilder<> &IRB);
  209   void instrumentMemAccessInline(Value *Ptr, bool IsWrite,
  214   Value *isInterestingMemoryAccess(Instruction *I, bool *IsWrite,
  216                                    Value **MaybeMask);
  219   bool tagAlloca(IRBuilder<> &IRB, AllocaInst *AI, Value *Tag, size_t Size);
  220   Value *tagPointer(IRBuilder<> &IRB, Type *Ty, Value *PtrLong, Value *Tag);
  220   Value *tagPointer(IRBuilder<> &IRB, Type *Ty, Value *PtrLong, Value *Tag);
  220   Value *tagPointer(IRBuilder<> &IRB, Type *Ty, Value *PtrLong, Value *Tag);
  221   Value *untagPointer(IRBuilder<> &IRB, Value *PtrLong);
  221   Value *untagPointer(IRBuilder<> &IRB, Value *PtrLong);
  225       SmallVectorImpl<Instruction *> &RetVec, Value *StackTag);
  226   Value *readRegister(IRBuilder<> &IRB, StringRef Name);
  228   Value *getNextTagWithCall(IRBuilder<> &IRB);
  229   Value *getStackBaseTag(IRBuilder<> &IRB);
  230   Value *getAllocaTag(IRBuilder<> &IRB, Value *StackTag, AllocaInst *AI,
  230   Value *getAllocaTag(IRBuilder<> &IRB, Value *StackTag, AllocaInst *AI,
  232   Value *getUARTag(IRBuilder<> &IRB, Value *StackTag);
  232   Value *getUARTag(IRBuilder<> &IRB, Value *StackTag);
  234   Value *getHwasanThreadSlotPtr(IRBuilder<> &IRB, Type *Ty);
  291   Value *LocalDynamicShadow = nullptr;
  292   Value *StackBaseTag = nullptr;
  481 Value *HWAddressSanitizer::getDynamicShadowIfunc(IRBuilder<> &IRB) {
  491 Value *HWAddressSanitizer::getDynamicShadowNonTls(IRBuilder<> &IRB) {
  499     Value *GlobalDynamicAddress =
  506 Value *HWAddressSanitizer::isInterestingMemoryAccess(Instruction *I,
  510                                                      Value **MaybeMask) {
  518   Value *PtrOperand = nullptr;
  583 void HWAddressSanitizer::untagPointerOperand(Instruction *I, Value *Addr) {
  588   Value *AddrLong = IRB.CreatePointerCast(Addr, IntptrTy);
  589   Value *UntaggedPtr =
  594 Value *HWAddressSanitizer::shadowBase() {
  601 Value *HWAddressSanitizer::memToShadow(Value *Mem, IRBuilder<> &IRB) {
  601 Value *HWAddressSanitizer::memToShadow(Value *Mem, IRBuilder<> &IRB) {
  603   Value *Shadow = IRB.CreateLShr(Mem, Mapping.Scale);
  610 void HWAddressSanitizer::instrumentMemAccessInline(Value *Ptr, bool IsWrite,
  628   Value *PtrLong = IRB.CreatePointerCast(Ptr, IntptrTy);
  629   Value *PtrTag = IRB.CreateTrunc(IRB.CreateLShr(PtrLong, kPointerTagShift),
  631   Value *AddrLong = untagPointer(IRB, PtrLong);
  632   Value *Shadow = memToShadow(AddrLong, IRB);
  633   Value *MemTag = IRB.CreateLoad(Int8Ty, Shadow);
  634   Value *TagMismatch = IRB.CreateICmpNE(PtrTag, MemTag);
  639     Value *TagNotIgnored = IRB.CreateICmpNE(PtrTag,
  649   Value *OutOfShortGranuleTagRange =
  656   Value *PtrLowBits = IRB.CreateTrunc(IRB.CreateAnd(PtrLong, 15), Int8Ty);
  659   Value *PtrLowBitsOOB = IRB.CreateICmpUGE(PtrLowBits, MemTag);
  665   Value *InlineTagAddr = IRB.CreateOr(AddrLong, 15);
  667   Value *InlineTag = IRB.CreateLoad(Int8Ty, InlineTagAddr);
  668   Value *InlineTagMismatch = IRB.CreateICmpNE(PtrTag, InlineTag);
  724   Value *MaybeMask = nullptr;
  731   Value *Addr =
  775                                    Value *Tag, size_t Size) {
  780   Value *JustTag = IRB.CreateTrunc(Tag, IRB.getInt8Ty());
  787     Value *ShadowPtr = memToShadow(IRB.CreatePointerCast(AI, IntptrTy), IRB);
  826 Value *HWAddressSanitizer::getNextTagWithCall(IRBuilder<> &IRB) {
  830 Value *HWAddressSanitizer::getStackBaseTag(IRBuilder<> &IRB) {
  841   Value *StackPointer = IRB.CreateCall(
  847   Value *StackPointerLong = IRB.CreatePointerCast(StackPointer, IntptrTy);
  848   Value *StackTag =
  854 Value *HWAddressSanitizer::getAllocaTag(IRBuilder<> &IRB, Value *StackTag,
  854 Value *HWAddressSanitizer::getAllocaTag(IRBuilder<> &IRB, Value *StackTag,
  862 Value *HWAddressSanitizer::getUARTag(IRBuilder<> &IRB, Value *StackTag) {
  862 Value *HWAddressSanitizer::getUARTag(IRBuilder<> &IRB, Value *StackTag) {
  871 Value *HWAddressSanitizer::tagPointer(IRBuilder<> &IRB, Type *Ty,
  872                                       Value *PtrLong, Value *Tag) {
  872                                       Value *PtrLong, Value *Tag) {
  873   Value *TaggedPtrLong;
  876     Value *ShiftedTag = IRB.CreateOr(
  882     Value *ShiftedTag = IRB.CreateShl(Tag, kPointerTagShift);
  889 Value *HWAddressSanitizer::untagPointer(IRBuilder<> &IRB, Value *PtrLong) {
  889 Value *HWAddressSanitizer::untagPointer(IRBuilder<> &IRB, Value *PtrLong) {
  890   Value *UntaggedPtrLong;
  903 Value *HWAddressSanitizer::getHwasanThreadSlotPtr(IRBuilder<> &IRB, Type *Ty) {
  910     Value *SlotPtr = IRB.CreatePointerCast(
  934   Value *SlotPtr = getHwasanThreadSlotPtr(IRB, IntptrTy);
  941     Value *ThreadLongEqZero =
  961   Value *ThreadLongMaybeUntagged =
  968     Value *PC;
  977     Value *SP = IRB.CreatePtrToInt(
  990     Value *RecordPtr =
 1001     Value *WrapMask = IRB.CreateXor(
 1004     Value *ThreadLongNew = IRB.CreateAnd(
 1020 Value *HWAddressSanitizer::readRegister(IRBuilder<> &IRB, StringRef Name) {
 1025   Value *Args[] = {MetadataAsValue::get(*C, MD)};
 1044     SmallVectorImpl<Instruction *> &RetVec, Value *StackTag) {
 1055     Value *Tag = getAllocaTag(IRB, StackTag, AI, N);
 1056     Value *AILong = IRB.CreatePointerCast(AI, IntptrTy);
 1057     Value *Replacement = tagPointer(IRB, AI->getType(), AILong, Tag);
 1079       Value *Tag = getUARTag(IRB, StackTag);
 1137       Value *MaybeMask = nullptr;
 1141       Value *Addr = isInterestingMemoryAccess(&Inst, &IsWrite, &TypeSize,
 1173     Value *StackTag =
lib/Transforms/Instrumentation/InstrOrderFile.cpp
  135     Value *IdxFlags[] = {ConstantInt::get(Int32Ty, 0),
  137     Value *MapAddr = entryB.CreateGEP(MapTy, BitMap, IdxFlags, "");
  140     Value *IsNotExecuted =
  145     Value *IdxVal = updateB.CreateAtomicRMW(
  149     Value *WrappedIdx = updateB.CreateAnd(
  151     Value *BufferGEPIdx[] = {ConstantInt::get(Int32Ty, 0), WrappedIdx};
  152     Value *BufferAddr =
lib/Transforms/Instrumentation/InstrProfiling.cpp
  182       Instruction *L, Instruction *S, SSAUpdater &SSA, Value *Init,
  201       Value *LiveInValue = SSA.GetValueInMiddleOfBlock(ExitBlock);
  202       Value *Addr = cast<StoreInst>(Store)->getPointerOperand();
  212         auto *NewVal = Builder.CreateAdd(OldVal, LiveInValue);
  269       Value *InitVal = ConstantInt::get(Cand.first->getType(), 0);
  614     Value *Args[3] = {Ind->getTargetValue(),
  619     Value *Args[6] = {
  640   Value *Addr = Builder.CreateConstInBoundsGEP2_64(Counters->getValueType(),
  647     Value *IncStep = Inc->getStep();
  648     Value *Load = Builder.CreateLoad(IncStep->getType(), Addr, "pgocount");
  649     auto *Count = Builder.CreateAdd(Load, Inc->getStep());
  662     Value *V = NC->stripPointerCasts();
  962   for (Value *Data : UsedVars)
lib/Transforms/Instrumentation/MemorySanitizer.cpp
  508   Value *ParamTLS;
  511   Value *ParamOriginTLS;
  514   Value *RetvalTLS;
  517   Value *RetvalOriginTLS;
  521   Value *VAArgTLS;
  525   Value *VAArgOriginTLS;
  529   Value *VAArgOverflowSizeTLS;
  533   Value *OriginTLS;
 1023   ValueMap<Value*, Value*> ShadowMap, OriginMap;
 1023   ValueMap<Value*, Value*> ShadowMap, OriginMap;
 1037     Value *Shadow;
 1038     Value *Origin;
 1041     ShadowOriginAndInsertPoint(Value *S, Value *O, Instruction *I)
 1041     ShadowOriginAndInsertPoint(Value *S, Value *O, Instruction *I)
 1073   Value *updateOrigin(Value *V, IRBuilder<> &IRB) {
 1073   Value *updateOrigin(Value *V, IRBuilder<> &IRB) {
 1078   Value *originToIntptr(IRBuilder<> &IRB, Value *Origin) {
 1078   Value *originToIntptr(IRBuilder<> &IRB, Value *Origin) {
 1088   void paintOrigin(IRBuilder<> &IRB, Value *Origin, Value *OriginPtr,
 1088   void paintOrigin(IRBuilder<> &IRB, Value *Origin, Value *OriginPtr,
 1099       Value *IntptrOrigin = originToIntptr(IRB, Origin);
 1100       Value *IntptrOriginPtr =
 1103         Value *Ptr = i ? IRB.CreateConstGEP1_32(MS.IntptrTy, IntptrOriginPtr, i)
 1112       Value *GEP =
 1119   void storeOrigin(IRBuilder<> &IRB, Value *Addr, Value *Shadow, Value *Origin,
 1119   void storeOrigin(IRBuilder<> &IRB, Value *Addr, Value *Shadow, Value *Origin,
 1119   void storeOrigin(IRBuilder<> &IRB, Value *Addr, Value *Shadow, Value *Origin,
 1120                    Value *OriginPtr, unsigned Alignment, bool AsCall) {
 1128       Value *ConvertedShadow = convertToShadowTyNoVec(Shadow, IRB);
 1142         Value *ConvertedShadow2 = IRB.CreateZExt(
 1148         Value *Cmp = IRB.CreateICmpNE(
 1162       Value *Val = SI->getValueOperand();
 1163       Value *Addr = SI->getPointerOperand();
 1164       Value *Shadow = SI->isAtomic() ? getCleanShadow(Val) : getShadow(Val);
 1165       Value *ShadowPtr, *OriginPtr;
 1186   void insertWarningFn(IRBuilder<> &IRB, Value *Origin) {
 1203   void materializeOneCheck(Instruction *OrigIns, Value *Shadow, Value *Origin,
 1203   void materializeOneCheck(Instruction *OrigIns, Value *Shadow, Value *Origin,
 1207     Value *ConvertedShadow = convertToShadowTyNoVec(Shadow, IRB);
 1224       Value *ConvertedShadow2 =
 1230       Value *Cmp = IRB.CreateICmpNE(ConvertedShadow,
 1245       Value *Shadow = ShadowData.Shadow;
 1246       Value *Origin = ShadowData.Origin;
 1256     Value *ContextState = IRB.CreateCall(MS.MsanGetContextStateFn, {});
 1332   Type *getShadowTy(Value *V) {
 1375   Value *convertToShadowTyNoVec(Value *V, IRBuilder<> &IRB) {
 1375   Value *convertToShadowTyNoVec(Value *V, IRBuilder<> &IRB) {
 1386   Value *getShadowPtrOffset(Value *Addr, IRBuilder<> &IRB) {
 1386   Value *getShadowPtrOffset(Value *Addr, IRBuilder<> &IRB) {
 1387     Value *OffsetLong = IRB.CreatePointerCast(Addr, MS.IntptrTy);
 1406   std::pair<Value *, Value *> getShadowOriginPtrUserspace(Value *Addr,
 1406   std::pair<Value *, Value *> getShadowOriginPtrUserspace(Value *Addr,
 1406   std::pair<Value *, Value *> getShadowOriginPtrUserspace(Value *Addr,
 1410     Value *ShadowOffset = getShadowPtrOffset(Addr, IRB);
 1411     Value *ShadowLong = ShadowOffset;
 1418     Value *ShadowPtr =
 1420     Value *OriginPtr = nullptr;
 1422       Value *OriginLong = ShadowOffset;
 1438   std::pair<Value *, Value *>
 1438   std::pair<Value *, Value *>
 1439   getShadowOriginPtrKernel(Value *Addr, IRBuilder<> &IRB, Type *ShadowTy,
 1441     Value *ShadowOriginPtrs;
 1446     Value *AddrCast =
 1451       Value *SizeVal = ConstantInt::get(MS.IntptrTy, Size);
 1456     Value *ShadowPtr = IRB.CreateExtractValue(ShadowOriginPtrs, 0);
 1458     Value *OriginPtr = IRB.CreateExtractValue(ShadowOriginPtrs, 1);
 1463   std::pair<Value *, Value *> getShadowOriginPtr(Value *Addr, IRBuilder<> &IRB,
 1463   std::pair<Value *, Value *> getShadowOriginPtr(Value *Addr, IRBuilder<> &IRB,
 1463   std::pair<Value *, Value *> getShadowOriginPtr(Value *Addr, IRBuilder<> &IRB,
 1467     std::pair<Value *, Value *> ret;
 1467     std::pair<Value *, Value *> ret;
 1478   Value *getShadowPtrForArgument(Value *A, IRBuilder<> &IRB,
 1478   Value *getShadowPtrForArgument(Value *A, IRBuilder<> &IRB,
 1480     Value *Base = IRB.CreatePointerCast(MS.ParamTLS, MS.IntptrTy);
 1488   Value *getOriginPtrForArgument(Value *A, IRBuilder<> &IRB,
 1488   Value *getOriginPtrForArgument(Value *A, IRBuilder<> &IRB,
 1492     Value *Base = IRB.CreatePointerCast(MS.ParamOriginTLS, MS.IntptrTy);
 1500   Value *getShadowPtrForRetval(Value *A, IRBuilder<> &IRB) {
 1500   Value *getShadowPtrForRetval(Value *A, IRBuilder<> &IRB) {
 1507   Value *getOriginPtrForRetval(IRBuilder<> &IRB) {
 1513   void setShadow(Value *V, Value *SV) {
 1513   void setShadow(Value *V, Value *SV) {
 1519   void setOrigin(Value *V, Value *Origin) {
 1519   void setOrigin(Value *V, Value *Origin) {
 1537   Constant *getCleanShadow(Value *V) {
 1561   Constant *getPoisonedShadow(Value *V) {
 1569   Value *getCleanOrigin() {
 1577   Value *getShadow(Value *V) {
 1577   Value *getShadow(Value *V) {
 1583       Value *Shadow = ShadowMap[V];
 1592       Value *AllOnes = PoisonUndef ? getPoisonedShadow(V) : getCleanShadow(V);
 1599       Value **ShadowPtr = &ShadowMap[V];
 1617           Value *Base = getShadowPtrForArgument(&FArg, EntryIRB, ArgOffset);
 1627             Value *CpShadowPtr =
 1639               Value *Cpy = EntryIRB.CreateMemCpy(CpShadowPtr, CopyAlign, Base,
 1657             Value *OriginPtr =
 1674   Value *getShadow(Instruction *I, int i) {
 1679   Value *getOrigin(Value *V) {
 1679   Value *getOrigin(Value *V) {
 1689     Value *Origin = OriginMap[V];
 1695   Value *getOrigin(Instruction *I, int i) {
 1703   void insertShadowCheck(Value *Shadow, Value *Origin, Instruction *OrigIns) {
 1703   void insertShadowCheck(Value *Shadow, Value *Origin, Instruction *OrigIns) {
 1719   void insertShadowCheck(Value *Val, Instruction *OrigIns) {
 1721     Value *Shadow, *Origin;
 1784     Value *Addr = I.getPointerOperand();
 1785     Value *ShadowPtr, *OriginPtr;
 1827     Value *Addr = I.getOperand(0);
 1828     Value *ShadowPtr = getShadowOriginPtr(Addr, IRB, I.getType(),
 1946     Value *S1 = getShadow(&I, 0);
 1947     Value *S2 = getShadow(&I, 1);
 1948     Value *V1 = I.getOperand(0);
 1949     Value *V2 = I.getOperand(1);
 1954     Value *S1S2 = IRB.CreateAnd(S1, S2);
 1955     Value *V1S2 = IRB.CreateAnd(V1, S2);
 1956     Value *S1V2 = IRB.CreateAnd(S1, V2);
 1968     Value *S1 = getShadow(&I, 0);
 1969     Value *S2 = getShadow(&I, 1);
 1970     Value *V1 = IRB.CreateNot(I.getOperand(0));
 1971     Value *V2 = IRB.CreateNot(I.getOperand(1));
 1976     Value *S1S2 = IRB.CreateAnd(S1, S2);
 1977     Value *V1S2 = IRB.CreateAnd(V1, S2);
 1978     Value *S1V2 = IRB.CreateAnd(S1, V2);
 2000     Value *Shadow = nullptr;
 2001     Value *Origin = nullptr;
 2010     Combiner &Add(Value *OpShadow, Value *OpOrigin) {
 2010     Combiner &Add(Value *OpShadow, Value *OpOrigin) {
 2029             Value *FlatShadow = MSV->convertToShadowTyNoVec(OpShadow, IRB);
 2030             Value *Cond =
 2040     Combiner &Add(Value *V) {
 2041       Value *OpShadow = MSV->getShadow(V);
 2042       Value *OpOrigin = MSV->MS.TrackOrigins ? MSV->getOrigin(V) : nullptr;
 2084   Value *CreateShadowCast(IRBuilder<> &IRB, Value *V, Type *dstTy,
 2084   Value *CreateShadowCast(IRBuilder<> &IRB, Value *V, Type *dstTy,
 2097     Value *V1 = IRB.CreateBitCast(V, Type::getIntNTy(*MS.C, srcSizeInBits));
 2098     Value *V2 =
 2105   Value *CreateAppToShadowCast(IRBuilder<> &IRB, Value *V) {
 2105   Value *CreateAppToShadowCast(IRBuilder<> &IRB, Value *V) {
 2136                            Value *OtherArg) {
 2212     Value *A = I.getOperand(0);
 2213     Value *B = I.getOperand(1);
 2214     Value *Sa = getShadow(A);
 2215     Value *Sb = getShadow(B);
 2226     Value *C = IRB.CreateXor(A, B);
 2227     Value *Sc = IRB.CreateOr(Sa, Sb);
 2233     Value *Zero = Constant::getNullValue(Sc->getType());
 2234     Value *MinusOne = Constant::getAllOnesValue(Sc->getType());
 2235     Value *Si =
 2246   Value *getLowestPossibleValue(IRBuilder<> &IRB, Value *A, Value *Sa,
 2246   Value *getLowestPossibleValue(IRBuilder<> &IRB, Value *A, Value *Sa,
 2246   Value *getLowestPossibleValue(IRBuilder<> &IRB, Value *A, Value *Sa,
 2250       Value *SaOtherBits = IRB.CreateLShr(IRB.CreateShl(Sa, 1), 1);
 2251       Value *SaSignBit = IRB.CreateXor(Sa, SaOtherBits);
 2263   Value *getHighestPossibleValue(IRBuilder<> &IRB, Value *A, Value *Sa,
 2263   Value *getHighestPossibleValue(IRBuilder<> &IRB, Value *A, Value *Sa,
 2263   Value *getHighestPossibleValue(IRBuilder<> &IRB, Value *A, Value *Sa,
 2267       Value *SaOtherBits = IRB.CreateLShr(IRB.CreateShl(Sa, 1), 1);
 2268       Value *SaSignBit = IRB.CreateXor(Sa, SaOtherBits);
 2285     Value *A = I.getOperand(0);
 2286     Value *B = I.getOperand(1);
 2287     Value *Sa = getShadow(A);
 2288     Value *Sb = getShadow(B);
 2300     Value *S1 = IRB.CreateICmp(I.getPredicate(),
 2303     Value *S2 = IRB.CreateICmp(I.getPredicate(),
 2306     Value *Si = IRB.CreateXor(S1, S2);
 2317     Value *op = nullptr;
 2335       Value *Shadow = IRB.CreateICmpSLT(getShadow(op), getCleanShadow(op),
 2381     Value *S1 = getShadow(&I, 0);
 2382     Value *S2 = getShadow(&I, 1);
 2383     Value *S2Conv = IRB.CreateSExt(IRB.CreateICmpNE(S2, getCleanShadow(S2)),
 2385     Value *V2 = I.getOperand(1);
 2386     Value *Shift = IRB.CreateBinOp(I.getOpcode(), S1, V2);
 2454     Value* Addr = I.getArgOperand(0);
 2455     Value *Shadow = getShadow(&I, 1);
 2456     Value *ShadowPtr, *OriginPtr;
 2478     Value *Addr = I.getArgOperand(0);
 2481     Value *ShadowPtr, *OriginPtr;
 2584     DenseMap<Value *, AllocaInst *> AllocaForValue;
 2594     Value *Op = I.getArgOperand(0);
 2619     Value *CopyOp, *ConvertOp;
 2644     Value *ConvertShadow = getShadow(ConvertOp);
 2645     Value *AggShadow = nullptr;
 2650         Value *MoreShadow = IRB.CreateExtractElement(
 2665       Value *ResultShadow = getShadow(CopyOp);
 2682   Value *Lower64ShadowExtend(IRBuilder<> &IRB, Value *S, Type *T) {
 2682   Value *Lower64ShadowExtend(IRBuilder<> &IRB, Value *S, Type *T) {
 2686     Value *S2 = IRB.CreateICmpNE(S, getCleanShadow(S));
 2692   Value *LowerElementShadowExtend(IRBuilder<> &IRB, Value *S, Type *T) {
 2692   Value *LowerElementShadowExtend(IRBuilder<> &IRB, Value *S, Type *T) {
 2693     Value *S1 = IRB.CreateExtractElement(S, (uint64_t)0);
 2694     Value *S2 = IRB.CreateICmpNE(S1, getCleanShadow(S1));
 2698   Value *VariableShadowExtend(IRBuilder<> &IRB, Value *S) {
 2698   Value *VariableShadowExtend(IRBuilder<> &IRB, Value *S) {
 2701     Value *S2 = IRB.CreateICmpNE(S, getCleanShadow(S));
 2717     Value *S1 = getShadow(&I, 0);
 2718     Value *S2 = getShadow(&I, 1);
 2719     Value *S2Conv = Variable ? VariableShadowExtend(IRB, S2)
 2721     Value *V1 = I.getOperand(0);
 2722     Value *V2 = I.getOperand(1);
 2723     Value *Shift = IRB.CreateCall(I.getFunctionType(), I.getCalledValue(),
 2781     Value *S1 = getShadow(&I, 0);
 2782     Value *S2 = getShadow(&I, 1);
 2793     Value *S1_ext = IRB.CreateSExt(
 2795     Value *S2_ext = IRB.CreateSExt(
 2806     Value *S =
 2822     Value *S = IRB.CreateOr(getShadow(&I, 0), getShadow(&I, 1));
 2838     Value *S = IRB.CreateOr(getShadow(&I, 0), getShadow(&I, 1));
 2853     Value *S0 = IRB.CreateOr(getShadow(&I, 0), getShadow(&I, 1));
 2854     Value *S = IRB.CreateSExt(
 2865     Value *S0 = IRB.CreateOr(getShadow(&I, 0), getShadow(&I, 1));
 2866     Value *S = LowerElementShadowExtend(IRB, S0, getShadowTy(&I));
 2873     Value* Addr = I.getArgOperand(0);
 2875     Value *ShadowPtr =
 2890     Value *Addr = I.getArgOperand(0);
 2893     Value *ShadowPtr, *OriginPtr;
 2900     Value *Shadow = IRB.CreateAlignedLoad(Ty, ShadowPtr, Alignment, "_ldmxcsr");
 2901     Value *Origin = MS.TrackOrigins ? IRB.CreateLoad(MS.OriginTy, OriginPtr)
 2908     Value *V = I.getArgOperand(0);
 2909     Value *Addr = I.getArgOperand(1);
 2911     Value *Mask = I.getArgOperand(3);
 2912     Value *Shadow = getShadow(V);
 2914     Value *ShadowPtr;
 2915     Value *OriginPtr;
 2938     Value *Addr = I.getArgOperand(0);
 2940     Value *Mask = I.getArgOperand(2);
 2941     Value *PassThru = I.getArgOperand(3);
 2944     Value *ShadowPtr, *OriginPtr;
 2962         Value *MaskedPassThruShadow = IRB.CreateAnd(
 2965         Value *Acc = IRB.CreateExtractElement(
 2969           Value *More = IRB.CreateExtractElement(
 2974         Value *Origin = IRB.CreateSelect(
 2996     Value *SMask = getShadow(&I, 1);
 3000     Value *S = IRB.CreateCall(I.getCalledFunction(),
 3296       Value *A = *ArgIt;
 3303       Value *Store = nullptr;
 3307       Value *ArgShadow = getShadow(A);
 3308       Value *ArgShadowBase = getShadowPtrForArgument(A, IRB, ArgOffset);
 3320         Value *AShadowPtr =
 3357     Value *Base = getShadowPtrForRetval(&I, IRBBefore);
 3380     Value *RetvalShadow = IRBAfter.CreateAlignedLoad(
 3389   bool isAMustTailRetVal(Value *RetVal) {
 3401     Value *RetVal = I.getReturnValue();
 3405     Value *ShadowPtr = getShadowPtrForRetval(RetVal, IRB);
 3408       Value *Shadow = getCleanShadow(RetVal);
 3411       Value *Shadow = getShadow(RetVal);
 3434   Value *getLocalVarDescription(AllocaInst &I) {
 3447   void poisonAllocaUserspace(AllocaInst &I, IRBuilder<> &IRB, Value *Len) {
 3452       Value *ShadowBase, *OriginBase;
 3456       Value *PoisonValue = IRB.getInt8(PoisonStack ? ClPoisonStackPattern : 0);
 3461       Value *Descr = getLocalVarDescription(I);
 3469   void poisonAllocaKmsan(AllocaInst &I, IRBuilder<> &IRB, Value *Len) {
 3470     Value *Descr = getLocalVarDescription(I);
 3487     Value *Len = ConstantInt::get(MS.IntptrTy, TypeSize);
 3508     Value *B = I.getCondition();
 3509     Value *C = I.getTrueValue();
 3510     Value *D = I.getFalseValue();
 3511     Value *Sb = getShadow(B);
 3512     Value *Sc = getShadow(C);
 3513     Value *Sd = getShadow(D);
 3516     Value *Sa0 = IRB.CreateSelect(B, Sc, Sd);
 3517     Value *Sa1;
 3536     Value *Sa = IRB.CreateSelect(Sb, Sa1, Sa0, "_msprop_select");
 3580     Value *Agg = I.getAggregateOperand();
 3582     Value *AggShadow = getShadow(Agg);
 3584     Value *ResShadow = IRB.CreateExtractValue(AggShadow, I.getIndices());
 3593     Value *AggShadow = getShadow(I.getAggregateOperand());
 3594     Value *InsShadow = getShadow(I.getInsertedValueOperand());
 3597     Value *Res = IRB.CreateInsertValue(AggShadow, InsShadow, I.getIndices());
 3627   void instrumentAsmArgument(Value *Operand, Instruction &I, IRBuilder<> &IRB,
 3644     Value *Ptr = IRB.CreatePointerCast(Operand, IRB.getInt8PtrTy());
 3645     Value *SizeVal = ConstantInt::get(MS.IntptrTy, Size);
 3653     Type *RetTy = cast<Value>(CB)->getType();
 3703       Value *Operand = CB->getOperand(i);
 3710       Value *Operand = CB->getOperand(i);
 3724       Value *Operand = I.getOperand(i);
 3746   Value *VAArgTLSCopy = nullptr;
 3747   Value *VAArgTLSOriginCopy = nullptr;
 3748   Value *VAArgOverflowSize = nullptr;
 3768   ArgKind classifyArgument(Value* arg) {
 3795       Value *A = *ArgIt;
 3808         Value *ShadowBase = getShadowPtrForVAArgument(
 3810         Value *OriginBase = nullptr;
 3816         Value *ShadowPtr, *OriginPtr;
 3832         Value *ShadowBase, *OriginBase = nullptr;
 3868         Value *Shadow = MSV.getShadow(A);
 3871           Value *Origin = MSV.getOrigin(A);
 3884   Value *getShadowPtrForVAArgument(Type *Ty, IRBuilder<> &IRB,
 3889     Value *Base = IRB.CreatePointerCast(MS.VAArgTLS, MS.IntptrTy);
 3896   Value *getOriginPtrForVAArgument(Type *Ty, IRBuilder<> &IRB, int ArgOffset) {
 3897     Value *Base = IRB.CreatePointerCast(MS.VAArgOriginTLS, MS.IntptrTy);
 3908     Value *VAListTag = I.getArgOperand(0);
 3909     Value *ShadowPtr, *OriginPtr;
 3944       Value *CopySize =
 3960       Value *VAListTag = OrigInst->getArgOperand(0);
 3963       Value *RegSaveAreaPtrPtr = IRB.CreateIntToPtr(
 3967       Value *RegSaveAreaPtr =
 3969       Value *RegSaveAreaShadowPtr, *RegSaveAreaOriginPtr;
 3980       Value *OverflowArgAreaPtrPtr = IRB.CreateIntToPtr(
 3984       Value *OverflowArgAreaPtr =
 3986       Value *OverflowArgAreaShadowPtr, *OverflowArgAreaOriginPtr;
 3990       Value *SrcPtr = IRB.CreateConstGEP1_32(IRB.getInt8Ty(), VAArgTLSCopy,
 4009   Value *VAArgTLSCopy = nullptr;
 4010   Value *VAArgSize = nullptr;
 4024       Value *A = *ArgIt;
 4025       Value *Base;
 4048   Value *getShadowPtrForVAArgument(Type *Ty, IRBuilder<> &IRB,
 4053     Value *Base = IRB.CreatePointerCast(MS.VAArgTLS, MS.IntptrTy);
 4062     Value *VAListTag = I.getArgOperand(0);
 4063     Value *ShadowPtr, *OriginPtr;
 4074     Value *VAListTag = I.getArgOperand(0);
 4075     Value *ShadowPtr, *OriginPtr;
 4088     Value *CopySize = IRB.CreateAdd(ConstantInt::get(MS.IntptrTy, 0),
 4103       Value *VAListTag = OrigInst->getArgOperand(0);
 4105       Value *RegSaveAreaPtrPtr =
 4108       Value *RegSaveAreaPtr =
 4110       Value *RegSaveAreaShadowPtr, *RegSaveAreaOriginPtr;
 4137   Value *VAArgTLSCopy = nullptr;
 4138   Value *VAArgOverflowSize = nullptr;
 4147   ArgKind classifyArgument(Value* arg) {
 4174       Value *A = *ArgIt;
 4182       Value *Base;
 4217   Value *getShadowPtrForVAArgument(Type *Ty, IRBuilder<> &IRB,
 4222     Value *Base = IRB.CreatePointerCast(MS.VAArgTLS, MS.IntptrTy);
 4231     Value *VAListTag = I.getArgOperand(0);
 4232     Value *ShadowPtr, *OriginPtr;
 4243     Value *VAListTag = I.getArgOperand(0);
 4244     Value *ShadowPtr, *OriginPtr;
 4253   Value* getVAField64(IRBuilder<> &IRB, Value *VAListTag, int offset) {
 4253   Value* getVAField64(IRBuilder<> &IRB, Value *VAListTag, int offset) {
 4254     Value *SaveAreaPtrPtr =
 4263   Value* getVAField32(IRBuilder<> &IRB, Value *VAListTag, int offset) {
 4263   Value* getVAField32(IRBuilder<> &IRB, Value *VAListTag, int offset) {
 4264     Value *SaveAreaPtr =
 4269     Value *SaveArea32 = IRB.CreateLoad(IRB.getInt32Ty(), SaveAreaPtr);
 4282       Value *CopySize =
 4289     Value *GrArgSize = ConstantInt::get(MS.IntptrTy, kAArch64GrArgSize);
 4290     Value *VrArgSize = ConstantInt::get(MS.IntptrTy, kAArch64VrArgSize);
 4298       Value *VAListTag = OrigInst->getArgOperand(0);
 4314       Value *StackSaveAreaPtr = getVAField64(IRB, VAListTag, 0);
 4317       Value *GrTopSaveAreaPtr = getVAField64(IRB, VAListTag, 8);
 4318       Value *GrOffSaveArea = getVAField32(IRB, VAListTag, 24);
 4320       Value *GrRegSaveAreaPtr = IRB.CreateAdd(GrTopSaveAreaPtr, GrOffSaveArea);
 4323       Value *VrTopSaveAreaPtr = getVAField64(IRB, VAListTag, 16);
 4324       Value *VrOffSaveArea = getVAField32(IRB, VAListTag, 28);
 4326       Value *VrRegSaveAreaPtr = IRB.CreateAdd(VrTopSaveAreaPtr, VrOffSaveArea);
 4332       Value *GrRegSaveAreaShadowPtrOff =
 4335       Value *GrRegSaveAreaShadowPtr =
 4340       Value *GrSrcPtr = IRB.CreateInBoundsGEP(IRB.getInt8Ty(), VAArgTLSCopy,
 4342       Value *GrCopySize = IRB.CreateSub(GrArgSize, GrRegSaveAreaShadowPtrOff);
 4347       Value *VrRegSaveAreaShadowPtrOff =
 4350       Value *VrRegSaveAreaShadowPtr =
 4355       Value *VrSrcPtr = IRB.CreateInBoundsGEP(
 4360       Value *VrCopySize = IRB.CreateSub(VrArgSize, VrRegSaveAreaShadowPtrOff);
 4365       Value *StackSaveAreaShadowPtr =
 4370       Value *StackSrcPtr =
 4385   Value *VAArgTLSCopy = nullptr;
 4386   Value *VAArgSize = nullptr;
 4414       Value *A = *ArgIt;
 4427           Value *Base = getShadowPtrForVAArgument(
 4430             Value *AShadowPtr, *AOriginPtr;
 4441         Value *Base;
 4484   Value *getShadowPtrForVAArgument(Type *Ty, IRBuilder<> &IRB,
 4489     Value *Base = IRB.CreatePointerCast(MS.VAArgTLS, MS.IntptrTy);
 4498     Value *VAListTag = I.getArgOperand(0);
 4499     Value *ShadowPtr, *OriginPtr;
 4509     Value *VAListTag = I.getArgOperand(0);
 4510     Value *ShadowPtr, *OriginPtr;
 4525     Value *CopySize = IRB.CreateAdd(ConstantInt::get(MS.IntptrTy, 0),
 4540       Value *VAListTag = OrigInst->getArgOperand(0);
 4542       Value *RegSaveAreaPtrPtr =
 4545       Value *RegSaveAreaPtr =
 4547       Value *RegSaveAreaShadowPtr, *RegSaveAreaOriginPtr;
lib/Transforms/Instrumentation/PGOInstrumentation.cpp
  265   Value *Cond = BI->getCondition();
  275   Value *RHS = CI->getOperand(1);
  855       Value *ToProfile = nullptr;
 1352   auto *Step = Builder.CreateZExt(SI.getCondition(), Int64Ty);
lib/Transforms/Instrumentation/PGOMemOPSizeOpt.cpp
  164     Value *Length = MI.getLength();
  355   Value *SizeVar = MI->getLength();
lib/Transforms/Instrumentation/PoisonChecking.cpp
   84 static bool isConstantFalse(Value* V) {
   91 static Value *buildOrChain(IRBuilder<> &B, ArrayRef<Value*> Ops) {
   91 static Value *buildOrChain(IRBuilder<> &B, ArrayRef<Value*> Ops) {
   98   Value *Accum = Ops[i++];
  106                                          SmallVector<Value*, 2> &Checks) {
  110   Value *LHS = I.getOperand(0);
  111   Value *RHS = I.getOperand(1);
  156       auto *Check =
  165       auto *Check =
  175     Value *ShiftCheck =
  185 static Value* generatePoisonChecks(Instruction &I) {
  187   SmallVector<Value*, 2> Checks;
  196     Value *Vec = I.getOperand(0);
  199     Value *Idx = I.getOperand(1);
  201     Value *Check =
  208     Value *Vec = I.getOperand(0);
  211     Value *Idx = I.getOperand(2);
  213     Value *Check =
  223 static Value *getPoisonFor(DenseMap<Value *, Value *> &ValToPoison, Value *V) {
  223 static Value *getPoisonFor(DenseMap<Value *, Value *> &ValToPoison, Value *V) {
  223 static Value *getPoisonFor(DenseMap<Value *, Value *> &ValToPoison, Value *V) {
  223 static Value *getPoisonFor(DenseMap<Value *, Value *> &ValToPoison, Value *V) {
  237 static void CreateAssert(IRBuilder<> &B, Value *Cond) {
  251 static void CreateAssertNot(IRBuilder<> &B, Value *Cond) {
  259   DenseMap<Value *, Value *> ValToPoison;
  259   DenseMap<Value *, Value *> ValToPoison;
  281       if (Value *Op = const_cast<Value*>(getGuaranteedNonFullPoisonOp(&I)))
  287             Value *Op = RI->getOperand(0);
  291       SmallVector<Value*, 4> Checks;
  293         for (Value *V : I.operands())
  296       if (auto *Check = generatePoisonChecks(I))
  308         auto *OldVal = OldPHI->getIncomingValue(i);
lib/Transforms/Instrumentation/SanitizerCoverage.cpp
  216   std::pair<Value *, Value *> CreateSecStartEnd(Module &M, const char *Section,
  216   std::pair<Value *, Value *> CreateSecStartEnd(Module &M, const char *Section,
  302 std::pair<Value *, Value *>
  302 std::pair<Value *, Value *>
  314   Value *SecEndPtr = IRB.CreatePointerCast(SecEnd, Ty);
  733     Value *Callee = CS.getCalledValue();
  750       Value *Cond = SI->getCondition();
  787     Value *A1 = BO->getOperand(1);
  817       Value *A0 = ICMP->getOperand(0);
  818       Value *A1 = ICMP->getOperand(1);
lib/Transforms/Instrumentation/ThreadSanitizer.cpp
  105   bool addrPointsToConstantData(Value *Addr);
  106   int getMemoryAccessFuncIndex(Value *Addr, const DataLayout &DL);
  307 static bool shouldInstrumentReadWriteFromAddress(const Module *M, Value *Addr) {
  338 bool ThreadSanitizer::addrPointsToConstantData(Value *Addr) {
  374   SmallPtrSet<Value*, 8> WriteTargets;
  378       Value *Addr = Store->getPointerOperand();
  384       Value *Addr = Load->getPointerOperand();
  397     Value *Addr = isa<StoreInst>(*I)
  504     Value *ReturnAddress = IRB.CreateCall(
  522   Value *Addr = IsWrite
  537     Value *StoredValue = cast<StoreInst>(I)->getValueOperand();
  631     Value *Addr = LI->getPointerOperand();
  639     Value *Args[] = {IRB.CreatePointerCast(Addr, PtrTy),
  642     Value *C = IRB.CreateCall(TsanAtomicLoad[Idx], Args);
  643     Value *Cast = IRB.CreateBitOrPointerCast(C, OrigTy);
  646     Value *Addr = SI->getPointerOperand();
  654     Value *Args[] = {IRB.CreatePointerCast(Addr, PtrTy),
  660     Value *Addr = RMWI->getPointerOperand();
  671     Value *Args[] = {IRB.CreatePointerCast(Addr, PtrTy),
  677     Value *Addr = CASI->getPointerOperand();
  685     Value *CmpOperand =
  687     Value *NewOperand =
  689     Value *Args[] = {IRB.CreatePointerCast(Addr, PtrTy),
  695     Value *Success = IRB.CreateICmpEQ(C, CmpOperand);
  696     Value *OldVal = C;
  703     Value *Res =
  710     Value *Args[] = {createOrdering(&IRB, FI->getOrdering())};
  720 int ThreadSanitizer::getMemoryAccessFuncIndex(Value *Addr,
lib/Transforms/Instrumentation/ValueProfileCollector.h
   56     Value *V;                   // The value to profile.
lib/Transforms/Instrumentation/ValueProfilePlugins.inc
   39     Value *Length = MI.getLength();
   62       Value *Callee = CallSite(I).getCalledValue();
lib/Transforms/ObjCARC/DependencyAnalysis.cpp
   34 bool llvm::objcarc::CanAlterRefCount(const Instruction *Inst, const Value *Ptr,
   55     for (const Value *Op : Call->args()) {
   68                                          const Value *Ptr,
   81 bool llvm::objcarc::CanUse(const Instruction *Inst, const Value *Ptr,
  102       const Value *Op = *OI;
  111     const Value *Op = GetUnderlyingObjCPtr(SI->getPointerOperand(), DL);
  121     const Value *Op = *OI;
  132                        const Value *Arg, ProvenanceAnalysis &PA) {
  220                                 const Value *Arg,
lib/Transforms/ObjCARC/DependencyAnalysis.h
   54                       const Value *Arg,
   61 Depends(DependenceKind Flavor, Instruction *Inst, const Value *Arg,
   66 bool CanUse(const Instruction *Inst, const Value *Ptr, ProvenanceAnalysis &PA,
   71 bool CanAlterRefCount(const Instruction *Inst, const Value *Ptr,
   76 bool CanDecrementRefCount(const Instruction *Inst, const Value *Ptr,
   80                                         const Value *Ptr,
lib/Transforms/ObjCARC/ObjCARC.h
   52   Value *OldArg = cast<CallInst>(CI)->getArgOperand(0);
   78   const auto *Opnd = Inst.getOperand(0)->stripPointerCasts();
   94       auto *PNOpnd = PN.getIncomingValue(I)->stripPointerCasts();
   95       auto *POpnd = P.getIncomingValueForBlock(BB)->stripPointerCasts();
lib/Transforms/ObjCARC/ObjCARCAPElim.cpp
  158     Value *Op = *OI;
lib/Transforms/ObjCARC/ObjCARCContract.cpp
  158   const Value *Arg = GetArgRCIdentityRoot(Autorelease);
  293 findRetainForStoreStrongContraction(Value *New, StoreInst *Store,
  320 createCallInst(FunctionType *FTy, Value *Func, ArrayRef<Value *> Args,
  320 createCallInst(FunctionType *FTy, Value *Func, ArrayRef<Value *> Args,
  336 createCallInst(FunctionCallee Func, ArrayRef<Value *> Args, const Twine &NameStr,
  392   Value *New = GetRCIdentityRoot(Store->getValueOperand());
  418   Value *Args[] = { Load->getPointerOperand(), New };
  509       Value *Null = ConstantPointerNull::get(cast<PointerType>(CI->getType()));
  621       for (Value::use_iterator UI = Arg->use_begin(), UE = Arg->use_end();
  691     Value *Arg = cast<CallInst>(Inst)->getArgOperand(0);
  692     Value *OrigArg = Arg;
  711           SmallVector<Value *, 1> PHIList;
  713           for (Value *PHI : PHIList)
lib/Transforms/ObjCARC/ObjCARCExpand.cpp
  113       Value *Value = cast<CallInst>(Inst)->getArgOperand(0);
lib/Transforms/ObjCARC/ObjCARCOpts.cpp
   86 static const Value *FindSingleUseIdentifiedObject(const Value *Arg) {
   86 static const Value *FindSingleUseIdentifiedObject(const Value *Arg) {
  193     BlotMapVector<const Value *, TopDownPtrState> PerPtrTopDown;
  197     BlotMapVector<const Value *, BottomUpPtrState> PerPtrBottomUp;
  264     TopDownPtrState &getPtrTopDownState(const Value *Arg) {
  271     BottomUpPtrState &getPtrBottomUpState(const Value *Arg) {
  277     bottom_up_ptr_iterator findPtrBottomUpState(const Value *Arg) {
  513                                   BlotMapVector<Value *, RRInfo> &Retains,
  517                        BlotMapVector<Value *, RRInfo> &Retains);
  519                                  DenseMap<Value *, RRInfo> &Releases,
  523                       DenseMap<Value *, RRInfo> &Releases);
  525                BlotMapVector<Value *, RRInfo> &Retains,
  526                DenseMap<Value *, RRInfo> &Releases);
  528     void MoveCalls(Value *Arg, RRInfo &RetainsToMove, RRInfo &ReleasesToMove,
  529                    BlotMapVector<Value *, RRInfo> &Retains,
  530                    DenseMap<Value *, RRInfo> &Releases,
  535                              BlotMapVector<Value *, RRInfo> &Retains,
  536                              DenseMap<Value *, RRInfo> &Releases, Module *M,
  540                              Value *Arg, bool KnownSafe,
  544                               BlotMapVector<Value *, RRInfo> &Retains,
  545                               DenseMap<Value *, RRInfo> &Releases, Module *M);
  597   const Value *Arg = GetArgRCIdentityRoot(RetainRV);
  620   SmallDenseSet<const Value*, 2> EquivalentArgs;
  625     SmallVector<const Value *, 2> ArgUsers;
  675   const Value *Ptr = GetArgRCIdentityRoot(AutoreleaseRV);
  682   SmallVector<const Value *, 2> Users;
  766       Value *Opnd = Inst->getOperand(0);
  807         Value *NewValue = UndefValue::get(CI->getType());
  829         Value *NewValue = UndefValue::get(CI->getType());
  853       const Value *Arg = Call->getArgOperand(0);
  912     const Value *Arg = GetArgRCIdentityRoot(Inst);
  938     SmallVector<std::pair<Instruction *, const Value *>, 4> Worklist;
  941       std::pair<Instruction *, const Value *> Pair = Worklist.pop_back_val();
  953         Value *Incoming =
 1008             Value *Incoming =
 1011               Value *Op = PN->getIncomingValue(i);
 1126     const Value *Arg = I->first;
 1196     Instruction *Inst, BasicBlock *BB, BlotMapVector<Value *, RRInfo> &Retains,
 1200   const Value *Arg = nullptr;
 1250     const Value *Ptr = MI->first;
 1266                                BlotMapVector<Value *, RRInfo> &Retains) {
 1331                                     DenseMap<Value *, RRInfo> &Releases,
 1335   const Value *Arg = nullptr;
 1386     const Value *Ptr = MI->first;
 1402                          DenseMap<Value *, RRInfo> &Releases) {
 1532                        BlotMapVector<Value *, RRInfo> &Retains,
 1533                        DenseMap<Value *, RRInfo> &Releases) {
 1565 void ObjCARCOpt::MoveCalls(Value *Arg, RRInfo &RetainsToMove,
 1567                            BlotMapVector<Value *, RRInfo> &Retains,
 1568                            DenseMap<Value *, RRInfo> &Releases,
 1578     Value *MyArg = ArgTy == ParamTy ? Arg :
 1591     Value *MyArg = ArgTy == ParamTy ? Arg :
 1623     BlotMapVector<Value *, RRInfo> &Retains,
 1624     DenseMap<Value *, RRInfo> &Releases, Module *M,
 1627     RRInfo &ReleasesToMove, Value *Arg, bool KnownSafe,
 1822     BlotMapVector<Value *, RRInfo> &Retains,
 1823     DenseMap<Value *, RRInfo> &Releases, Module *M) {
 1830   for (BlotMapVector<Value *, RRInfo>::const_iterator I = Retains.begin(),
 1833     Value *V = I->first;
 1840     Value *Arg = GetArgRCIdentityRoot(Retain);
 1922         Value *Arg = Call->getArgOperand(0);
 1923         Value *EarlierArg = EarlierCall->getArgOperand(0);
 1951         Value *Arg = Call->getArgOperand(0);
 1952         Value *EarlierArg = EarlierCall->getArgOperand(0);
 2002     Value *Arg = Call->getArgOperand(0);
 2045   DenseMap<Value *, RRInfo> Releases;
 2046   BlotMapVector<Value *, RRInfo> Retains;
 2070 HasSafePathToPredecessorCall(const Value *Arg, Instruction *Retain,
 2094 FindPredecessorRetainWithSafePath(const Value *Arg, BasicBlock *BB,
 2119 FindPredecessorAutoreleaseWithSafePath(const Value *Arg, BasicBlock *BB,
 2164     const Value *Arg = GetRCIdentityRoot(Ret->getOperand(0));
lib/Transforms/ObjCARC/ProvenanceAnalysis.cpp
   42                                        const Value *B) {
   57                                     const Value *B) {
   72   SmallPtrSet<const Value *, 4> UniqueSrc;
   73   for (Value *PV1 : A->incoming_values()) {
   84 static bool IsStoredObjCPointer(const Value *P) {
   85   SmallPtrSet<const Value *, 8> Visited;
   86   SmallVector<const Value *, 8> Worklist;
  115 bool ProvenanceAnalysis::relatedCheck(const Value *A, const Value *B,
  115 bool ProvenanceAnalysis::relatedCheck(const Value *A, const Value *B,
  163 bool ProvenanceAnalysis::related(const Value *A, const Value *B,
  163 bool ProvenanceAnalysis::related(const Value *A, const Value *B,
lib/Transforms/ObjCARC/ProvenanceAnalysis.h
   54   using ValuePairTy = std::pair<const Value *, const Value *>;
   54   using ValuePairTy = std::pair<const Value *, const Value *>;
   59   DenseMap<const Value *, WeakTrackingVH> UnderlyingObjCPtrCache;
   61   bool relatedCheck(const Value *A, const Value *B, const DataLayout &DL);
   61   bool relatedCheck(const Value *A, const Value *B, const DataLayout &DL);
   62   bool relatedSelect(const SelectInst *A, const Value *B);
   63   bool relatedPHI(const PHINode *A, const Value *B);
   74   bool related(const Value *A, const Value *B, const DataLayout &DL);
   74   bool related(const Value *A, const Value *B, const DataLayout &DL);
lib/Transforms/ObjCARC/ProvenanceAnalysisEvaluator.cpp
   40 static StringRef getName(Value *V) {
   47 static void insertIfNamed(SetVector<Value *> &Values, Value *V) {
   47 static void insertIfNamed(SetVector<Value *> &Values, Value *V) {
   54   SetVector<Value *> Values;
   70   for (Value *V1 : Values) {
   72     for (Value *V2 : Values) {
lib/Transforms/ObjCARC/PtrState.cpp
  229                                                     const Value *Ptr,
  257                                           const Value *Ptr,
  381                                                    const Value *Ptr,
  415 void TopDownPtrState::HandlePotentialUse(Instruction *Inst, const Value *Ptr,
lib/Transforms/ObjCARC/PtrState.h
  183   void HandlePotentialUse(BasicBlock *BB, Instruction *Inst, const Value *Ptr,
  185   bool HandlePotentialAlterRefCount(Instruction *Inst, const Value *Ptr,
  201   void HandlePotentialUse(Instruction *Inst, const Value *Ptr,
  204   bool HandlePotentialAlterRefCount(Instruction *Inst, const Value *Ptr,
lib/Transforms/Scalar/AlignmentFromAssumptions.cpp
  126                                 const SCEV *OffSCEV, Value *Ptr,
  198                                                         Value *&AAPtr,
  212   Value *CmpLHS = ICI->getOperand(0);
  213   Value *CmpRHS = ICI->getOperand(1);
  227   Value *AndLHS = CmpBO->getOperand(0);
  228   Value *AndRHS = CmpBO->getOperand(1);
  251   Alignment = std::min(1u << TrailingOnes, +Value::MaximumAlignment);
  292   Value *AAPtr;
lib/Transforms/Scalar/CallSiteSplitting.cpp
   86 static void addNonNullAttribute(CallSite CS, Value *Op) {
   95 static void setConstantInArgument(CallSite CS, Value *Op,
  111   Value *Op0 = Cmp->getOperand(0);
  137   Value *Cond = BI->getCondition();
  168     Value *Arg = Cond.first->getOperand(0);
  224                                          Value *V) {
  254   Value *V = NewCI;
  523       CallSite CS(cast<Value>(I));
lib/Transforms/Scalar/ConstantHoisting.cpp
  174     Value *Opnd = Inst->getOperand(Idx);
  436   Value *Opnd = Inst->getOperand(Idx);
  715         Value *IncomingVal = PHI->getIncomingValue(i);
  760   Value *Opnd = ConstUser.Inst->getOperand(ConstUser.OpndIdx);
lib/Transforms/Scalar/CorrelatedValuePropagation.cpp
  135   Value *ReplaceWith = S->getTrueValue();
  136   Value *Other = S->getFalseValue();
  163   Value *CommonValue = nullptr;
  165     Value *Incoming = P->getIncomingValue(i);
  217     Value *Incoming = P->getIncomingValue(i);
  220     Value *V = LVI->getConstantOnEdge(Incoming, P->getIncomingBlock(i), BB, P);
  230       Value *Condition = SI->getCondition();
  266   if (Value *V = SimplifyInstruction(P, SQ)) {
  282   Value *Pointer = nullptr;
  303   Value *Op0 = Cmp->getOperand(0);
  339   Value *Cond = I->getCondition();
  444 static void setDeducedOverflowingFlags(Value *V, Instruction::BinaryOps Opcode,
  500   Value *NewOp =
  508   Value *NewI = B.CreateInsertValue(Struct, NewOp, 0);
  566       Value *V = U.get();
  579   for (Value *V : CS.args()) {
  609   for (Value *O : SDI->operands()) {
  629   for (Value *Operand : Instr->operands()) {
  644   auto *LHS = B.CreateTruncOrBitCast(Instr->getOperand(0), TruncTy,
  646   auto *RHS = B.CreateTruncOrBitCast(Instr->getOperand(1), TruncTy,
  648   auto *BO = B.CreateBinOp(Instr->getOpcode(), LHS, RHS, Instr->getName());
  649   auto *Zext = B.CreateZExt(BO, Instr->getType(), Instr->getName() + ".zext");
  723   Value *Base = SDI->getOperand(0);
  757   Value *LHS = BinOp->getOperand(0);
  758   Value *RHS = BinOp->getOperand(1);
  790   Value *LHS = BinOp->getOperand(0);
  806 static Constant *getConstantAt(Value *V, Instruction *At, LazyValueInfo *LVI) {
  815   Value *Op0 = C->getOperand(0);
  898       auto *RetVal = RI->getReturnValue();
lib/Transforms/Scalar/DCE.cpp
   95       Value *OpV = I->getOperand(i);
lib/Transforms/Scalar/DeadStoreElimination.cpp
  102                       SmallSetVector<const Value *, 16> *ValueSet = nullptr) {
  126       Value *Op = DeadInst->getOperand(op);
  302 static Value *getStoredPointerOperand(Instruction *I) {
  311 static uint64_t getPointerSize(const Value *V, const DataLayout &DL,
  359   const Value *P1 = Earlier.Ptr->stripPointerCasts();
  360   const Value *P2 = Later.Ptr->stripPointerCasts();
  373   const Value *UO1 = GetUnderlyingObject(P1, DL),
  392   const Value *BP1 = GetPointerBaseWithConstantOffset(P1, EarlierOff, DL);
  393   const Value *BP2 = GetPointerBaseWithConstantOffset(P2, LaterOff, DL);
  680       Value *DepPointer =
  716                                   SmallSetVector<const Value *, 16> &DeadStackObjects,
  720   const Value *UnderlyingPointer = GetUnderlyingObject(LoadedLoc.Ptr, DL);
  756   SmallSetVector<const Value*, 16> DeadStackObjects;
  785       SmallVector<const Value *, 4> Pointers;
  790       for (const Value *Pointer : Pointers)
  939   Value *EarlierWriteLength = EarlierIntrinsic->getLength();
  940   Value *TrimmedLength =
  947     Value *Indices[1] = {
 1011     const Value *Ptr = Loc.Ptr->stripPointerCasts();
 1160         const Value* Underlying = GetUnderlyingObject(DepLoc.Ptr, DL);
lib/Transforms/Scalar/DivRemPairs.cpp
   51   Value *Dividend, *XroundedDownToMultipleOfY;
   55   Value *Divisor;
  100   Value *getDividend() const { return DivInst->getOperand(0); }
  101   Value *getDivisor() const { return DivInst->getOperand(1); }
  203       Value *X = E.getDividend();
  204       Value *Y = E.getDivisor();
  263       Value *X = E.getDividend();
  264       Value *Y = E.getDivisor();
lib/Transforms/Scalar/EarlyCSE.cpp
  140 static bool matchSelectWithOptionalNotCond(Value *V, Value *&Cond, Value *&A,
  140 static bool matchSelectWithOptionalNotCond(Value *V, Value *&Cond, Value *&A,
  140 static bool matchSelectWithOptionalNotCond(Value *V, Value *&Cond, Value *&A,
  141                                            Value *&B,
  148   Value *CondNot;
  169     Value *LHS = BinOp->getOperand(0);
  170     Value *RHS = BinOp->getOperand(1);
  182     Value *LHS = CI->getOperand(0);
  183     Value *RHS = CI->getOperand(1);
  195   Value *Cond, *A, *B;
  217     Value *X, *Y;
  303   Value *CondL, *CondR, *LHSA, *RHSA, *LHSB, *RHSB;
  343       Value *X, *Y;
  456       ScopedHashTable<SimpleValue, Value *, DenseMapInfo<SimpleValue>,
  498       ScopedHashTable<Value *, LoadValue, DenseMapInfo<Value *>,
  498       ScopedHashTable<Value *, LoadValue, DenseMapInfo<Value *>,
  675     Value *getPointerOperand() const {
  701   Value *getOrCreateResult(Value *Inst, Type *ExpectedType) const {
  701   Value *getOrCreateResult(Value *Inst, Type *ExpectedType) const {
  970           if (auto *KnownCond = AvailableValues.lookup(CondI)) {
  999     if (Value *V = SimplifyInstruction(Inst, SQ)) {
 1026       if (Value *V = AvailableValues.lookup(Inst)) {
 1086         Value *Op = getOrCreateResult(InVal.DefInst, Inst->getType());
lib/Transforms/Scalar/Float2Int.cpp
  224     for (Value *O : I->operands()) {
  298     for (Value *O : I->operands()) {
  435 Value *Float2IntPass::convert(Instruction *I, Type *ToTy) {
  440   SmallVector<Value*,4> NewOperands;
  441   for (Value *V : I->operands()) {
  462   Value *NewV = nullptr;
lib/Transforms/Scalar/GVN.cpp
  173   PointerIntPair<Value *, 2, ValType> Val;
  178   static AvailableValue get(Value *V, unsigned Offset = 0) {
  215   Value *getSimpleValue() const {
  232   Value *MaterializeAdjustedValue(LoadInst *LI, Instruction *InsertPt,
  252   static AvailableValueInBlock get(BasicBlock *BB, Value *V,
  263   Value *MaterializeAdjustedValue(LoadInst *LI, GVN &gvn) const {
  310                                                Value *LHS, Value *RHS) {
  310                                                Value *LHS, Value *RHS) {
  369 void GVN::ValueTable::add(Value *V, uint32_t num) {
  477 bool GVN::ValueTable::exists(Value *V) const { return valueNumbering.count(V) != 0; }
  481 uint32_t GVN::ValueTable::lookupOrAdd(Value *V) {
  482   DenseMap<Value*, uint32_t>::iterator VI = valueNumbering.find(V);
  557 uint32_t GVN::ValueTable::lookup(Value *V, bool Verify) const {
  558   DenseMap<Value*, uint32_t>::const_iterator VI = valueNumbering.find(V);
  572                                          Value *LHS, Value *RHS) {
  572                                          Value *LHS, Value *RHS) {
  590 void GVN::ValueTable::erase(Value *V) {
  600 void GVN::ValueTable::verifyRemoved(const Value *V) const {
  601   for (DenseMap<Value*, uint32_t>::const_iterator
  636 LLVM_DUMP_METHOD void GVN::dump(DenseMap<uint32_t, Value*>& d) const {
  638   for (DenseMap<uint32_t, Value*>::iterator I = d.begin(),
  730 static Value *ConstructSSAForLoadSet(LoadInst *LI,
  770 Value *AvailableValue::MaterializeAdjustedValue(LoadInst *LI,
  773   Value *Res;
  859                                   Value *Address, AvailableValue &Res) {
 1006     Value *Address = Deps[i].getAddress();
 1085   MapVector<BasicBlock *, Value *> PredLoads;
 1173     Value *LoadPtr = LI->getPointerOperand();
 1242     Value *LoadPtr = PredLoad.second;
 1277   Value *V = ConstructSSAForLoadSet(LI, ValuesPerBlock, *this);
 1294 static void reportLoadElim(LoadInst *LI, Value *AvailableValue,
 1364     Value *V = ConstructSSAForLoadSet(LI, ValuesPerBlock, *this);
 1390 static bool hasUsersIn(Value *V, BasicBlock *BB) {
 1401   Value *V = IntrinsicI->getArgOperand(0);
 1458       Value *CmpLHS = CmpI->getOperand(0);
 1459       Value *CmpRHS = CmpI->getOperand(1);
 1509 static void patchAndReplaceAllUsesWith(Instruction *I, Value *Repl) {
 1548     Value *AvailableValue = AV.MaterializeAdjustedValue(L, L, *this);
 1708 Value *GVN::findLeader(const BasicBlock *BB, uint32_t num) {
 1712   Value *Val = nullptr;
 1759     Value *Operand = Instr->getOperand(OpNum); 
 1776 bool GVN::propagateEquality(Value *LHS, Value *RHS, const BasicBlockEdge &Root,
 1776 bool GVN::propagateEquality(Value *LHS, Value *RHS, const BasicBlockEdge &Root,
 1778   SmallVector<std::pair<Value*, Value*>, 4> Worklist;
 1778   SmallVector<std::pair<Value*, Value*>, 4> Worklist;
 1786     std::pair<Value*, Value*> Item = Worklist.pop_back_val();
 1786     std::pair<Value*, Value*> Item = Worklist.pop_back_val();
 1863     Value *A, *B;
 1875       Value *Op0 = Cmp->getOperand(0), *Op1 = Cmp->getOperand(1);
 1910         Value *NotCmp = findLeader(Root.getEnd(), Num);
 1950   if (Value *V = SimplifyInstruction(I, {DL, TLI, DT, AC})) {
 1990     Value *BranchCond = BI->getCondition();
 2000     Value *TrueVal = ConstantInt::getTrue(TrueSucc->getContext());
 2004     Value *FalseVal = ConstantInt::getFalse(FalseSucc->getContext());
 2013     Value *SwitchCond = SI->getCondition();
 2059   Value *Repl = findLeader(I->getParent(), Num);
 2204     Value *Op = Instr->getOperand(i);
 2217     if (Value *V = findLeader(Pred, TValNo)) {
 2289   SmallVector<std::pair<Value *, BasicBlock *>, 8> predMap;
 2313     Value *predV = findLeader(P, TValNo);
 2386     if (Value *V = predMap[i].first) {
lib/Transforms/Scalar/GVNHoist.cpp
  207     Value *Ptr = Store->getPointerOperand();
  208     Value *Val = Store->getValueOperand();
  306   unsigned int rank(const Value *V) const {
  336   DenseMap<const Value *, unsigned> DFSNumber;
lib/Transforms/Scalar/GVNSink.cpp
  230   SmallVector<Value *, 4> Values;
  238     SmallVector<std::pair<BasicBlock *, Value *>, 4> Ops;
  291   ArrayRef<Value *> getValues() const { return Values; }
  354   InstructionUseExpr(Instruction *I, ArrayRecycler<Value *> &R,
  377     for (auto *V : operands())
  384   DenseMap<Value *, uint32_t> ValueNumbering;
  388   ArrayRecycler<Value *> Recycler;
  423   uint32_t lookupOrAdd(Value *V) {
  512   uint32_t lookup(Value *V) const {
  591       ModelledPHISet &NeededPHIs, SmallPtrSetImpl<Value *> &PHIContents);
  595                           SmallPtrSetImpl<Value *> &PHIContents) {
  599       for (auto *V : MPHI.getValues())
  631   ModelledPHISet &NeededPHIs, SmallPtrSetImpl<Value *> &PHIContents) {
  706   for (auto *V : NewPHI.getValues())
  789   SmallPtrSet<Value *, 4> PHIContents;
  839   SmallVector<Value *, 4> NewOperands;
  850     auto *Op = I0->getOperand(O);
lib/Transforms/Scalar/GuardWidening.cpp
   94 static Value *getCondition(Instruction *I) {
  101     auto *Cond = cast<BranchInst>(I)->getCondition();
  109 static void setCondition(Instruction *I, Value *NewCond) {
  181   bool isAvailableAt(const Value *V, const Instruction *InsertPos) const {
  186   bool isAvailableAt(const Value *V, const Instruction *InsertPos,
  191   void makeAvailableAt(Value *V, Instruction *InsertPos) const;
  200   bool widenCondCommon(Value *Cond0, Value *Cond1, Instruction *InsertPt,
  200   bool widenCondCommon(Value *Cond0, Value *Cond1, Instruction *InsertPt,
  201                        Value *&Result, bool InvertCondition);
  208     const Value *Base;
  210     const Value *Length;
  214     explicit RangeCheck(const Value *Base, const ConstantInt *Offset,
  215                         const Value *Length, ICmpInst *CheckInst)
  218     void setBase(const Value *NewBase) { Base = NewBase; }
  221     const Value *getBase() const { return Base; }
  224     const Value *getLength() const { return Length; };
  245   bool parseRangeChecks(Value *CheckCond, SmallVectorImpl<RangeCheck> &Checks) {
  246     SmallPtrSet<const Value *, 8> Visited;
  250   bool parseRangeChecks(Value *CheckCond, SmallVectorImpl<RangeCheck> &Checks,
  251                         SmallPtrSetImpl<const Value *> &Visited);
  262   bool isWideningCondProfitable(Value *Cond0, Value *Cond1, bool InvertCond) {
  262   bool isWideningCondProfitable(Value *Cond0, Value *Cond1, bool InvertCond) {
  263     Value *ResultUnused;
  271   void widenGuard(Instruction *ToWiden, Value *NewCondition,
  273     Value *Result;
  276     Value *WidenableCondition = nullptr;
  278       auto *Cond = cast<BranchInst>(ToWiden)->getCondition();
  498     const Value *V, const Instruction *Loc,
  519 void GuardWideningImpl::makeAvailableAt(Value *V, Instruction *Loc) const {
  527   for (Value *Op : Inst->operands())
  533 bool GuardWideningImpl::widenCondCommon(Value *Cond0, Value *Cond1,
  533 bool GuardWideningImpl::widenCondCommon(Value *Cond0, Value *Cond1,
  534                                         Instruction *InsertPt, Value *&Result,
  541     Value *LHS;
  616     Value *CheckCond, SmallVectorImpl<GuardWideningImpl::RangeCheck> &Checks,
  617     SmallPtrSetImpl<const Value *> &Visited) {
  624     Value *AndLHS, *AndRHS;
  636   const Value *CmpLHS = IC->getOperand(0), *CmpRHS = IC->getOperand(1);
  656     Value *OpLHS;
  694     const Value *CurrentBase = Checks.front().getBase();
  695     const Value *CurrentLength = Checks.front().getLength();
lib/Transforms/Scalar/IndVarSimplify.cpp
  145   bool isValidRewrite(Value *FromVal, Value *ToVal);
  145   bool isValidRewrite(Value *FromVal, Value *ToVal);
  183 bool IndVarSimplify::isValidRewrite(Value *FromVal, Value *ToVal) {
  183 bool IndVarSimplify::isValidRewrite(Value *FromVal, Value *ToVal) {
  194   Value *FromPtr = FromVal;
  195   Value *ToPtr = ToVal;
  237 static Instruction *getInsertPointForUses(Instruction *User, Value *Def,
  333   Value::user_iterator IncrUse = Incr->user_begin();
  462   Value *NewAdd =
  493     Value *Conv = new SIToFPInst(NewPHI, PN->getType(), "indvar.conv",
  535   Value *Val;
  540   RewritePhi(PHINode *P, unsigned I, Value *V, bool H)
  624         Value *InVal = PN->getIncomingValue(i);
  674         Value *ExitVal = Rewriter.expandCodeFor(ExitValue, PN->getType(), Inst);
  707     Value *ExitVal = Phi.Val;
  777         Value *Cond = nullptr;
  839     Value *Incoming = P->getIncomingValueForBlock(ExitingBlocks[0]);
  997   using DefUserPair = std::pair<AssertingVH<Value>, AssertingVH<Instruction>>;
 1005   Optional<ConstantRange> getPostIncRangeInfo(Value *Def,
 1017   void updatePostIncRangeInfo(Value *Def, Instruction *UseI, ConstantRange R) {
 1040   Value *createExtendInst(Value *NarrowOper, Type *WideType, bool IsSigned,
 1040   Value *createExtendInst(Value *NarrowOper, Type *WideType, bool IsSigned,
 1070 Value *WidenIV::createExtendInst(Value *NarrowOper, Type *WideType,
 1070 Value *WidenIV::createExtendInst(Value *NarrowOper, Type *WideType,
 1121   Value *LHS = (NarrowUse->getOperand(0) == NarrowDef)
 1125   Value *RHS = (NarrowUse->getOperand(1) == NarrowDef)
 1212   Value *LHS = (NarrowUse->getOperand(0) == NarrowDef)
 1216   Value *RHS = (NarrowUse->getOperand(1) == NarrowDef)
 1351   Value *Trunc = Builder.CreateTrunc(DU.WideDef, DU.NarrowDef->getType());
 1381   Value *Op = Cmp->getOperand(Cmp->getOperand(0) == DU.NarrowDef ? 1 : 0);
 1395     Value *ExtOp = createExtendInst(Op, WideType, Cmp->isSigned(), Cmp);
 1494   Value *LHS = (NarrowUse->getOperand(0) == NarrowDef)
 1498   Value *RHS = (NarrowUse->getOperand(1) == NarrowDef)
 1567         Value *Trunc = Builder.CreateTrunc(WidePhi, DU.NarrowDef->getType());
 1589     Value *NewDef = DU.WideDef;
 1824   Value *NarrowDefLHS;
 1834     Value *CmpRHS;
 1857       Value *C = nullptr;
 2020 static PHINode *getLoopPhiForCounter(Value *IncV, Loop *L) {
 2058 static bool isLoopExitTestBasedOn(Value *V, BasicBlock *ExitingBB) {
 2093   Value *LHS = Cond->getOperand(0);
 2094   Value *RHS = Cond->getOperand(1);
 2114   Value *IncV = Phi->getIncomingValue(Idx);
 2135   SmallSet<const Value *, 16> KnownPoison;
 2163 static bool hasConcreteDefImpl(Value *V, SmallPtrSetImpl<Value*> &Visited,
 2163 static bool hasConcreteDefImpl(Value *V, SmallPtrSetImpl<Value*> &Visited,
 2182   for (Value *Op : I->operands()) {
 2196 static bool hasConcreteDef(Value *V) {
 2197   SmallPtrSet<Value*, 8> Visited;
 2204 static bool AlmostDeadIV(PHINode *Phi, BasicBlock *LatchBlock, Value *Cond) {
 2206   Value *IncV = Phi->getIncomingValue(LatchIdx);
 2236   Value *IncV = Phi->getIncomingValue(LatchIdx);
 2252   Value *Cond = cast<BranchInst>(ExitingBB->getTerminator())->getCondition();
 2285       Value *IncPhi = Phi->getIncomingValueForBlock(LatchBlock);
 2331 static Value *genLoopLimit(PHINode *IndVar, BasicBlock *ExitingBB,
 2431   Value *CmpIndVar = IndVar;
 2472   Value *ExitCnt = genLoopLimit(
 2545   Value *Cond = Builder.CreateICmp(P, CmpIndVar, ExitCnt, "exitcond");
 2546   Value *OrigCond = BI->getCondition();
 2740     auto *OldCond = BI->getCondition();
 2938   Value *ExactBTCV = nullptr; //lazy generated if needed
 2943     Value *NewCond;
 2948       Value *ECV = Rewriter.expandCodeFor(ExitCount);
 2951       Value *RHS = ExactBTCV;
 2961     Value *OldCond = BI->getCondition();
lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp
  148                                   Value *&Index, Value *&Length,
  148                                   Value *&Index, Value *&Length,
  154                              SmallPtrSetImpl<Value *> &Visited);
  277                                          ScalarEvolution &SE, Value *&Index,
  278                                          Value *&Length, bool &IsSigned) {
  284   Value *LHS = ICI->getOperand(0);
  285   Value *RHS = ICI->getOperand(1);
  338     SmallPtrSetImpl<Value *> &Visited) {
  339   Value *Condition = ConditionUse.get();
  356   Value *Length = nullptr, *Index;
  403   SmallPtrSet<Value *, 8> Visited;
  464   Value *IndVarBase = nullptr;
  465   Value *IndVarStart = nullptr;
  466   Value *IndVarStep = nullptr;
  467   Value *LoopExitAt = nullptr;
  578                           Value *ExitLoopAt,
  795   Value *LeftValue = ICI->getOperand(0);
  799   Value *RightValue = ICI->getOperand(1);
 1014   Value *IndVarStartV =
 1171         Value *OldIncoming = PN.getIncomingValueForBlock(OriginalBB);
 1179     const LoopStructure &LS, BasicBlock *Preheader, Value *ExitSubloopAt,
 1274   Value *EnterLoopCond = nullptr;
 1279   Value *IndVarStart = NoopOrExt(LS.IndVarStart);
 1287   Value *IndVarBase = NoopOrExt(LS.IndVarBase);
 1288   Value *TakeBackedgeLoopCond = B.CreateICmp(Pred, IndVarBase, ExitSubloopAt);
 1290   Value *CondForBranch = LS.LatchBrExitIdx == 1
 1301   Value *LoopExitAt = NoopOrExt(LS.LoopExitAt);
 1302   Value *IterationsLeft = B.CreateICmp(Pred, IndVarBase, LoopExitAt);
 1420   Value *ExitPreLoopAt = nullptr;
 1421   Value *ExitMainLoopAt = nullptr;
lib/Transforms/Scalar/InferAddressSpaces.cpp
  140 using ValueToAddrSpaceMapTy = DenseMap<const Value *, unsigned>;
  167   updateAddressSpace(const Value &V,
  185     Value *V, std::vector<std::pair<Value *, bool>> &PostorderStack,
  185     Value *V, std::vector<std::pair<Value *, bool>> &PostorderStack,
  186     DenseSet<Value *> &Visited) const;
  189                                 Value *OldV, Value *NewV) const;
  189                                 Value *OldV, Value *NewV) const;
  192     std::vector<std::pair<Value *, bool>> &PostorderStack,
  193     DenseSet<Value *> &Visited) const;
  197   Value *cloneValueWithNewAddressSpace(
  198     Value *V, unsigned NewAddrSpace,
  220 static bool isAddressExpression(const Value &V) {
  243 static SmallVector<Value *, 2> getPointerOperands(const Value &V) {
  264                                                   Value *OldV,
  265                                                   Value *NewV) const {
  284     IntrinsicInst *II, std::vector<std::pair<Value *, bool>> &PostorderStack,
  285     DenseSet<Value *> &Visited) const {
  308     Value *V, std::vector<std::pair<Value *, bool>> &PostorderStack,
  308     Value *V, std::vector<std::pair<Value *, bool>> &PostorderStack,
  309     DenseSet<Value *> &Visited) const {
  344   std::vector<std::pair<Value *, bool>> PostorderStack;
  346   DenseSet<Value *> Visited;
  391     Value *TopVal = PostorderStack.back().first;
  402     for (Value *PtrOperand : getPointerOperands(*TopVal)) {
  413 static Value *operandWithNewAddressSpaceOrCreateUndef(
  417   Value *Operand = OperandUse.get();
  425   if (Value *NewOperand = ValueWithNewAddrSpace.lookup(Operand))
  441 static Value *cloneInstructionWithNewAddressSpace(
  449     Value *Src = I->getOperand(0);
  460   SmallVector<Value *, 4> NewPointerOperands;
  503 static Value *cloneConstantExprWithNewAddressSpace(
  519     if (Value *NewOperand = ValueWithNewAddrSpace.lookup(CE->getOperand(0)))
  546     if (Value *NewOperand = ValueWithNewAddrSpace.lookup(Operand)) {
  552       if (Value *NewOperand = cloneConstantExprWithNewAddressSpace(
  583 Value *InferAddressSpaces::cloneValueWithNewAddressSpace(
  584   Value *V, unsigned NewAddrSpace,
  592     Value *NewV = cloneInstructionWithNewAddressSpace(
  653   SetVector<Value *> Worklist(Postorder.begin(), Postorder.end());
  655   for (Value *V : Postorder)
  659     Value *V = Worklist.pop_back_val();
  672     for (Value *User : V->users()) {
  695     const Value &V, const ValueToAddrSpaceMapTy &InferredAddrSpace) const {
  704     Value *Src0 = Op.getOperand(1);
  705     Value *Src1 = Op.getOperand(2);
  732     for (Value *PtrOperand : getPointerOperands(V)) {
  786 static bool handleMemIntrinsicPtrUse(MemIntrinsic *MI, Value *OldV,
  787                                      Value *NewV) {
  799     Value *Src = MTI->getRawSource();
  800     Value *Dest = MTI->getRawDest();
  861 static Value::use_iterator skipToNextUser(Value::use_iterator I,
  861 static Value::use_iterator skipToNextUser(Value::use_iterator I,
  862                                           Value::use_iterator End) {
  881   for (Value* V : Postorder) {
  906     Value *V = WVH;
  907     Value *NewV = ValueWithNewAddrSpace.lookup(V);
  925     Value::use_iterator I, E, Next;
  965           Value *OtherSrc = Cmp->getOperand(OtherIdx);
  967           if (Value *OtherNewV = ValueWithNewAddrSpace.lookup(OtherSrc)) {
lib/Transforms/Scalar/InstSimplifyPass.cpp
   55           if (Value *V = SimplifyInstruction(&I, SQ, ORE)) {
lib/Transforms/Scalar/JumpThreading.cpp
  248     Value *PhiOpnd = PN->getIncomingValue(i);
  451 static void ReplaceFoldableUses(Instruction *Cond, Value *ToVal) {
  573 static Constant *getKnownConstant(Value *Val, ConstantPreference Preference) {
  594     Value *V, BasicBlock *BB, PredValueInfo &Result,
  596     DenseSet<std::pair<Value *, BasicBlock *>> &RecursionSet,
  653       Value *InVal = PN->getIncomingValue(i);
  671     Value *Source = CI->getOperand(0);
  771     Value *CmpLHS = Cmp->getOperand(0);
  772     Value *CmpRHS = Cmp->getOperand(1);
  788         Value *LHS, *RHS;
  796         Value *Res = SimplifyCmpInst(Pred, LHS, RHS, {DL});
  855         Value *AddLHS;
 1061   Value *Condition;
 1081     Value *SimpleVal =
 1201   Value *SimplifyValue = CondInst;
 1247   Value *Cond = BI->getCondition();
 1282 static bool isOpDefinedInBlock(Value *Op, BasicBlock *BB) {
 1309   Value *LoadedPtr = LoadI->getOperand(0);
 1320   if (Value *AvailableVal = FindAvailableLoadedValue(
 1355   using AvailablePredsTy = SmallVector<std::pair<BasicBlock *, Value *>, 8>;
 1370     Value *PredAvailable = nullptr;
 1377     Value *Ptr = LoadedPtr->DoPHITranslation(LoadBB, PredBB);
 1509     Value *&PredV = I->second;
 1592 bool JumpThreadingPass::ProcessThreadableEdges(Value *Cond, BasicBlock *BB,
 1906                                      DenseMap<Instruction*, Value*> &ValueMap) {
 1910     Value *IV = PN.getIncomingValueForBlock(OldPred);
 1914       DenseMap<Instruction*, Value*>::iterator I = ValueMap.find(Inst);
 1983   DenseMap<Instruction*, Value*> ValueMapping;
 2018         DenseMap<Instruction*, Value*>::iterator I = ValueMapping.find(Inst);
 2318   DenseMap<Instruction*, Value*> ValueMapping;
 2331         DenseMap<Instruction*, Value*>::iterator I = ValueMapping.find(Inst);
 2339     if (Value *IV = SimplifyInstruction(
 2579       Value *Cond = SI->getCondition();
 2690   Value *GuardCond = Guard->getArgOperand(0);
 2691   Value *BranchCond = BI->getCondition();
lib/Transforms/Scalar/LICM.cpp
  270   void deleteAnalysisValue(Value *V, Loop *L) override;
  447         SmallSetVector<Value *, 8> PointerMustAliases;
  983   Value *Addr = LI->getOperand(0);
 1155         for (Value *Op : CI->arg_operands())
 1290   for (const Value *IncValue : PN.incoming_values())
 1580   for (Value::user_iterator UI = I.user_begin(), UE = I.user_end(); UI != UE;) {
 1734   Value *SomePtr; // Designated pointer to store to.
 1735   const SmallSetVector<Value *, 8> &PointerMustAliases;
 1749   Value *maybeInsertLCSSAPHI(Value *V, BasicBlock *BB) const {
 1749   Value *maybeInsertLCSSAPHI(Value *V, BasicBlock *BB) const {
 1765   LoopPromoter(Value *SP, ArrayRef<const Instruction *> Insts, SSAUpdater &S,
 1766                const SmallSetVector<Value *, 8> &PMA,
 1781     Value *Ptr;
 1796       Value *LiveInValue = SSA.GetValueInMiddleOfBlock(ExitBlock);
 1798       Value *Ptr = maybeInsertLCSSAPHI(SomePtr, ExitBlock);
 1825   void replaceLoadWithValue(LoadInst *LI, Value *V) const override {
 1840 bool isKnownNonEscaping(Value *Object, const TargetLibraryInfo *TLI) {
 1868     const SmallSetVector<Value *, 8> &PointerMustAliases,
 1880   Value *SomePtr = *PointerMustAliases.begin();
 1942     Value *Object = GetUnderlyingObject(SomePtr, MDL);
 1953   for (Value *ASIV : PointerMustAliases) {
 2081       Value *Object = GetUnderlyingObject(SomePtr, MDL);
 2220 void LegacyLICMPass::deleteAnalysisValue(Value *V, Loop *L) {
lib/Transforms/Scalar/LoopDataPrefetch.cpp
  219   SmallPtrSet<const Value *, 32> EphValues;
  253       Value *PtrValue;
  310       Value *PrefPtrValue = SCEVE.expandCodeFor(NextLSCEV, I8Ptr, MemI);
lib/Transforms/Scalar/LoopDeletion.cpp
   54     Value *incoming = P.getIncomingValueForBlock(ExitingBlocks[0]);
lib/Transforms/Scalar/LoopDistribute.cpp
  172       for (Value *V : I->operand_values()) {
  512       Value *Ptr = RtPtrCheck->Pointers[I].PointerValue;
lib/Transforms/Scalar/LoopFuse.cpp
  879     Value *Ptr0 = getLoadStorePointerOperand(&I0);
  880     Value *Ptr1 = getLoadStorePointerOperand(&I1);
 1234       Value *LCV = LCPHI->getIncomingValue(L1LatchBBIdx);
 1476       Value *LCV = LCPHI->getIncomingValue(L1LatchBBIdx);
lib/Transforms/Scalar/LoopIdiomRecognize.cpp
  167   using StoreListMap = MapVector<Value *, StoreList>;
  203   bool processLoopStridedStore(Value *DestPtr, unsigned StoreSize,
  204                                unsigned StoreAlignment, Value *StoredVal,
  220     Value *BCmpValue, *LatchCmpValue;
  227     Value *LoadSrcA, *LoadSrcB;
  228     Value *LoadA, *LoadB;
  230   bool matchBCmpOfLoads(Value *BCmpValue, CmpOfLoads &CmpOfLoads) const;
  247                                PHINode *CntPhi, Value *Var);
  251                                 Value *Var, Instruction *DefX,
  433 static Constant *getMemSetPatternValue(Value *V, const DataLayout *DL) {
  489   Value *StoredVal = SI->getValueOperand();
  490   Value *StorePtr = SI->getPointerOperand();
  515   Value *SplatValue = isBytewiseValue(StoredVal, *DL);
  593       Value *Ptr = GetUnderlyingObject(SI->getPointerOperand(), *DL);
  598       Value *Ptr = GetUnderlyingObject(SI->getPointerOperand(), *DL);
  675     Value *FirstStoredVal = SL[i]->getValueOperand();
  676     Value *FirstStorePtr = SL[i]->getPointerOperand();
  688     Value *FirstSplatValue = nullptr;
  712       Value *SecondStorePtr = SL[k]->getPointerOperand();
  720       Value *SecondStoredVal = SL[k]->getValueOperand();
  721       Value *SecondSplatValue = nullptr;
  754   SmallPtrSet<Value *, 16> TransformedStores;
  782     Value *StoredVal = HeadStore->getValueOperand();
  783     Value *StorePtr = HeadStore->getPointerOperand();
  816   Value *Pointer = MSI->getDest();
  842   Value *SplatValue = MSI->getValue();
  858 mayLoopAccessLocation(Value *Ptr, ModRefInfo Access, Loop *L,
  941     Value *DestPtr, unsigned StoreSize, unsigned StoreAlignment,
  942     Value *StoredVal, Instruction *TheStore,
  945   Value *SplatValue = isBytewiseValue(StoredVal, *DL);
  980   Value *BasePtr =
 1003   Value *NumBytes =
 1027     Value *PatternPtr = ConstantExpr::getBitCast(GV, Int8PtrTy);
 1059   Value *StorePtr = SI->getPointerOperand();
 1096   Value *StoreBasePtr = Expander.expandCodeFor(
 1118   Value *LoadBasePtr = Expander.expandCodeFor(
 1138   Value *NumBytes =
 1223 static Value *matchCondition(BranchInst *BI, BasicBlock *LoopEntry,
 1251 static PHINode *getRecurrenceVar(Value *VarX, Instruction *DefX,
 1286                                 Value *&Var) {
 1291   Value *VarX1, *VarX0;
 1301     if (Value *T = matchCondition(
 1380     Value *T = matchCondition(PreCondBr, CurLoop->getLoopPreheader());
 1420                                       Intrinsic::ID &IntrinID, Value *&InitX,
 1424   Value *VarX = nullptr;
 1432   if (Value *T = matchCondition(
 1500   Value *InitX;
 1564   const Value *Args[] =
 1626   Value *Val;
 1634 static CallInst *createPopcntIntrinsic(IRBuilder<> &IRBuilder, Value *Val,
 1636   Value *Ops[] = {Val};
 1647 static CallInst *createFFSIntrinsic(IRBuilder<> &IRBuilder, Value *Val,
 1650   Value *Ops[] = {Val, ZeroCheck ? IRBuilder.getTrue() : IRBuilder.getFalse()};
 1694     PHINode *CntPhi, Value *InitX, Instruction *DefX, const DebugLoc &DL,
 1701   Value *FFS, *Count, *CountPrev, *NewCount, *InitXNext;
 1737   Value *CntInitVal = CntPhi->getIncomingValueForBlock(Preheader);
 1785                                                  PHINode *CntPhi, Value *Var) {
 1796   Value *PopCnt, *PopCntZext, *NewCount, *TripCnt;
 1809     Value *CntInitVal = CntPhi->getIncomingValueForBlock(PreHead);
 1824     Value *Opnd0 = PopCntZext;
 1825     Value *Opnd1 = ConstantInt::get(PopCntZext->getType(), 0);
 1928 bool LoopIdiomRecognize::matchBCmpOfLoads(Value *BCmpValue,
 2605   Value *PtrA, *PtrB, *Len;
lib/Transforms/Scalar/LoopInstSimplify.cpp
  103         Value *V = SimplifyInstruction(&I, SQ.getWithInstruction(&I));
  107         for (Value::use_iterator UI = I.use_begin(), UE = I.use_end();
lib/Transforms/Scalar/LoopInterchange.cpp
   87   using ValueVector = SmallVector<Value *, 16>;
  631     Value *Val = InnerInduction->getOperand(i);
  652 static Value *followLCSSA(Value *SV) {
  652 static Value *followLCSSA(Value *SV) {
  663 static PHINode *findInnerReductionPhi(Loop *L, Value *V) {
  664   for (Value *User : V->users()) {
  701         Value *V = followLCSSA(PHI.getIncomingValueForBlock(L->getLoopLatch()));
 1272         for (Value *Op : WorkList[i]->operands()) {
lib/Transforms/Scalar/LoopLoadElimination.cpp
   99     Value *LoadPtr = Load->getPointerOperand();
  100     Value *StorePtr = Store->getPointerOperand();
  130   Value *getLoadPtr() const { return Load->getPointerOperand(); }
  310                      const SmallPtrSet<Value *, 4> &PtrsWrittenOnFwdingPath,
  312     Value *Ptr1 =
  314     Value *Ptr2 =
  324   SmallPtrSet<Value *, 4> findPointersWrittenOnForwardingPath(
  362     SmallPtrSet<Value *, 4> PtrsWrittenOnFwdingPath;
  382     SmallPtrSet<Value *, 4> PtrsWrittenOnFwdingPath =
  387     std::set<Value *> CandLoadPtrs;
  431     Value *Ptr = Cand.Load->getPointerOperand();
  434     Value *InitialPtr = SEE.expandCodeFor(PtrSCEV->getStart(), Ptr->getType(),
  436     Value *Initial = new LoadInst(
lib/Transforms/Scalar/LoopPredication.cpp
  267   Instruction *findInsertPt(Instruction *User, ArrayRef<Value*> Ops);
  279   Value *expandCheck(SCEVExpander &Expander, Instruction *Guard,
  283   Optional<Value *> widenICmpRangeCheck(ICmpInst *ICI, SCEVExpander &Expander,
  285   Optional<Value *> widenICmpRangeCheckIncrementingLoop(LoopICmp LatchCheck,
  289   Optional<Value *> widenICmpRangeCheckDecrementingLoop(LoopICmp LatchCheck,
  293   unsigned collectChecks(SmallVectorImpl<Value *> &Checks, Value *Condition,
  293   unsigned collectChecks(SmallVectorImpl<Value *> &Checks, Value *Condition,
  365   auto *LHS = ICI->getOperand(0);
  366   auto *RHS = ICI->getOperand(1);
  389 Value *LoopPredication::expandCheck(SCEVExpander &Expander,
  405   Value *LHSV = Expander.expandCodeFor(LHS, Ty, findInsertPt(Guard, {LHS}));
  406   Value *RHSV = Expander.expandCodeFor(RHS, Ty, findInsertPt(Guard, {RHS}));
  495                                            ArrayRef<Value*> Ops) {
  496   for (Value *Op : Ops)
  551 Optional<Value *> LoopPredication::widenICmpRangeCheckIncrementingLoop(
  592   auto *LimitCheck =
  594   auto *FirstIterationCheck = expandCheck(Expander, Guard, RangeCheck.Pred,
  600 Optional<Value *> LoopPredication::widenICmpRangeCheckDecrementingLoop(
  639   auto *FirstIterationCheck = expandCheck(Expander, Guard,
  642   auto *LimitCheck = expandCheck(Expander, Guard, LimitCheckPred, LatchLimit,
  663 Optional<Value *> LoopPredication::widenICmpRangeCheck(ICmpInst *ICI,
  727 unsigned LoopPredication::collectChecks(SmallVectorImpl<Value *> &Checks,
  728                                         Value *Condition,
  737   SmallVector<Value *, 4> Worklist(1, Condition);
  738   SmallPtrSet<Value *, 4> Visited;
  739   Value *WideableCond = nullptr;
  741     Value *Condition = Worklist.pop_back_val();
  745     Value *LHS, *RHS;
  787   SmallVector<Value *, 4> Checks;
  797   Value *AllChecks = Builder.CreateAnd(Checks);
  798   auto *OldCond = Guard->getOperand(0);
  813   SmallVector<Value *, 4> Checks;
  823   Value *AllChecks = Builder.CreateAnd(Checks);
  824   auto *OldCond = BI->getCondition();
lib/Transforms/Scalar/LoopRerollPass.cpp
  795       Value *LastOperand = GEP->getOperand(GEP->getNumOperands()-1);
 1216     DenseMap<Value *, Value *> BaseMap;
 1216     DenseMap<Value *, Value *> BaseMap;
 1349           Value *Op2 = RootInst->getOperand(j);
 1359           DenseMap<Value *, Value *>::iterator BMI = BaseMap.find(Op2);
 1359           DenseMap<Value *, Value *>::iterator BMI = BaseMap.find(Op2);
 1459     Value *NewIV =
 1467     Value *TakenCount =
 1470     Value *Cond =
 1494     Value *NewIV = Expander.expandCodeFor(NewIVSCEV, Inst->getType(),
lib/Transforms/Scalar/LoopStrengthReduce.cpp
  798                          Instruction *Inst, Value *OperandVal) {
  838                                  Instruction *Inst, Value *OperandVal) {
  942         Value *UVal = U->getValue();
  971     Value *V = DeadInsts.pop_back_val();
 1081   Value *OperandValToReplace = nullptr;
 1857   Value* IVOperand;
 1860   IVInc(Instruction *U, Value *O, const SCEV *E)
 2041   Value *Expand(const LSRUse &LU, const LSRFixup &LF, const Formula &F,
 2312   Value *NewRHS = nullptr;
 2737 static Value *getWideOperand(Value *Oper) {
 2737 static Value *getWideOperand(Value *Oper) {
 2744 static bool isCompatibleIVType(Value *LVal, Value *RVal) {
 2744 static bool isCompatibleIVType(Value *LVal, Value *RVal) {
 2908   Value *const NextIV = getWideOperand(IVOper);
 2926     Value *PrevIV = getWideOperand(Chain.Incs.back().IVOperand);
 3119                              Value *Operand, const TargetTransformInfo &TTI) {
 3147   Value *IVSrc = nullptr;
 3183     Value *IVOper = IVSrc;
 3194       Value *IncV = Rewriter.expandCodeFor(LeftOverExpr, IntTy, InsertPt);
 3226       Value *IVOper = IVSrc;
 3279         Value *NV = CI->getOperand(1);
 3408       const Value *V = US->getValue();
 3453           Value *OtherOp = const_cast<Value *>(ICI->getOperand(OtherIdx));
 5127 Value *LSRInstance::Expand(const LSRUse &LU, const LSRFixup &LF,
 5169   Value *ICmpScaledV = nullptr;
 5198         Value *FullV = Rewriter.expandCodeFor(SE.getAddExpr(Ops), nullptr);
 5214       Value *FullV = Rewriter.expandCodeFor(SE.getAddExpr(Ops), Ty);
 5224     Value *FullV = Rewriter.expandCodeFor(SE.getAddExpr(Ops), Ty);
 5260   Value *FullV = Rewriter.expandCodeFor(FullS, Ty);
 5308   DenseMap<BasicBlock *, Value *> Inserted;
 5356       std::pair<DenseMap<BasicBlock *, Value *>::iterator, bool> Pair =
 5361         Value *FullV = Expand(LU, LF, F, BB->getTerminator()->getIterator(),
 5428     Value *FullV =
lib/Transforms/Scalar/LoopUnrollAndJamPass.cpp
  156     const SmallPtrSetImpl<const Value *> &EphValues,
  260         Value *V = Ld->getPointerOperand();
  334   SmallPtrSet<const Value *, 32> EphValues;
lib/Transforms/Scalar/LoopUnrollPass.cpp
  335     const SmallPtrSetImpl<const Value *> &EphValues,
  356   DenseMap<Value *, Constant *> SimplifiedValues;
  357   SmallVector<std::pair<Value *, Constant *>, 4> SimplifiedInputValues;
  438         for (Value *Op : I->operands()) {
  489       Value *V = PHI->getIncomingValueForBlock(
  625       Value *Op = PN->getIncomingValueForBlock(ExitingBB);
  642     const SmallPtrSetImpl<const Value *> &EphValues, unsigned BEInsns) {
  738     ScalarEvolution &SE, const SmallPtrSetImpl<const Value *> &EphValues,
 1055   SmallPtrSet<const Value *, 32> EphValues;
lib/Transforms/Scalar/LoopUnswitch.cpp
  104         DenseMap<const SwitchInst *, SmallPtrSet<const Value *, 8>>;
  153     void setUnswitched(const SwitchInst *SI, const Value *V);
  156     bool isUnswitched(const SwitchInst *SI, const Value *V);
  247     bool UnswitchIfProfitable(Value *LoopCond, Constant *Val,
  249     void UnswitchTrivialCondition(Loop *L, Value *Cond, Constant *Val,
  251     void UnswitchNontrivialCondition(Value *LIC, Constant *OnVal, Loop *L,
  254     void RewriteLoopBodyWithConditionConstant(Loop *L, Value *LIC,
  257     void EmitPreheaderBranchOnCondition(Value *LIC, Constant *Val,
  266     Value *SimplifyInstructionWithNotEqual(Instruction *Inst, Value *Invariant,
  266     Value *SimplifyInstructionWithNotEqual(Instruction *Inst, Value *Invariant,
  291     SmallPtrSet<const Value *, 32> EphValues;
  340 void LUAnalysisCache::setUnswitched(const SwitchInst *SI, const Value *V) {
  345 bool LUAnalysisCache::isUnswitched(const SwitchInst *SI, const Value *V) {
  378     Value *NewI = VMap.lookup(OldInst);
  421 static Value *FindLIVLoopCondition(Value *Cond, Loop *L, bool &Changed,
  421 static Value *FindLIVLoopCondition(Value *Cond, Loop *L, bool &Changed,
  423                                    DenseMap<Value *, Value *> &Cache,
  423                                    DenseMap<Value *, Value *> &Cache,
  481         if (Value *LHS = FindLIVLoopCondition(BO->getOperand(0), L, Changed,
  489         if (Value *RHS = FindLIVLoopCondition(BO->getOperand(1), L, Changed,
  504 static std::pair<Value *, OperatorChain>
  505 FindLIVLoopCondition(Value *Cond, Loop *L, bool &Changed,
  507   DenseMap<Value *, Value *> Cache;
  507   DenseMap<Value *, Value *> Cache;
  509   Value *FCond = FindLIVLoopCondition(Cond, L, Changed, OpChain, Cache, MSSAU);
  571     Value *Cond = BInst->getCondition();
  593 static bool EqualityPropUnSafe(Value &LoopCond) {
  598   Value *LHS = CI->getOperand(0);
  599   Value *RHS = CI->getOperand(1);
  604     for (Value *Opd : PN.incoming_values()) {
  698     Value *LoopCond = FindLIVLoopCondition(Guard->getOperand(0), currentLoop,
  740         Value *LoopCond = FindLIVLoopCondition(BI->getCondition(), currentLoop,
  750       Value *SC = SI->getCondition();
  751       Value *LoopCond;
  814         Value *LoopCond = FindLIVLoopCondition(SI->getCondition(), currentLoop,
  880 bool LoopUnswitch::UnswitchIfProfitable(Value *LoopCond, Constant *Val,
  932 void LoopUnswitch::EmitPreheaderBranchOnCondition(Value *LIC, Constant *Val,
  941   Value *BranchVal = LIC;
  999 void LoopUnswitch::UnswitchTrivialCondition(Loop *L, Value *Cond, Constant *Val,
 1130     Value *LoopCond = FindLIVLoopCondition(BI->getCondition(), currentLoop,
 1165     Value *LoopCond = FindLIVLoopCondition(SI->getCondition(), currentLoop,
 1233 void LoopUnswitch::UnswitchNontrivialCondition(Value *LIC, Constant *Val,
 1321       Value *V = PN.getIncomingValueForBlock(ExitBlocks[i]);
 1415 static void ReplaceUsesOfWith(Instruction *I, Value *V,
 1442 void LoopUnswitch::RewriteLoopBodyWithConditionConstant(Loop *L, Value *LIC,
 1463     Value *Replacement;
 1494     if (Value *Replacement = SimplifyInstructionWithNotEqual(UI, LIC, Val)) {
 1607     if (Value *V = SimplifyInstruction(I, DL))
 1654 Value *LoopUnswitch::SimplifyInstructionWithNotEqual(Instruction *Inst,
 1655                                                      Value *Invariant,
 1660     Value *Op0 = CI->getOperand(0);
 1661     Value *Op1 = CI->getOperand(1);
lib/Transforms/Scalar/LoopVersioningLICM.cpp
  290     Value *SomePtr = AS.begin()->getValue();
  296       Value *Ptr = A.getValue();
  358     Value *Ptr = Ld->getPointerOperand();
  372     Value *Ptr = St->getPointerOperand();
lib/Transforms/Scalar/LowerAtomic.cpp
   25   Value *Ptr = CXI->getPointerOperand();
   26   Value *Cmp = CXI->getCompareOperand();
   27   Value *Val = CXI->getNewValOperand();
   30   Value *Equal = Builder.CreateICmpEQ(Orig, Cmp);
   31   Value *Res = Builder.CreateSelect(Equal, Val, Orig);
   44   Value *Ptr = RMWI->getPointerOperand();
   45   Value *Val = RMWI->getValOperand();
   48   Value *Res = nullptr;
lib/Transforms/Scalar/LowerConstantIntrinsics.cpp
   42 static Value *lowerIsConstantIntrinsic(IntrinsicInst *II) {
   43   Value *Op = II->getOperand(0);
   50                                                  Value *NewValue) {
  115     Value *NewValue;
lib/Transforms/Scalar/LowerExpectIntrinsic.cpp
   66   Value *ArgValue = CI->getArgOperand(0);
  100   Value &Arg = *Expect->getArgOperand(0);
  116   Value *V = &Arg;
  187     Value *PhiOpnd = PhiDef->getIncomingValue(i);
  282   Value *ArgValue = CI->getArgOperand(0);
  354         Value *Exp = CI->getArgOperand(0);
lib/Transforms/Scalar/MakeGuardsExplicit.cpp
   72   auto *NewCond =
lib/Transforms/Scalar/MemCpyOptimizer.cpp
   91   Value *StartPtr;
  184   void addRange(int64_t Start, int64_t Size, Value *Ptr,
  193 void MemsetRanges::addRange(int64_t Start, int64_t Size, Value *Ptr,
  305                                                  Value *StartPtr,
  306                                                  Value *ByteVal) {
  331       Value *StoredByte = isBytewiseValue(NextStore->getOperand(0), DL);
  628         Value *CpyDest = SI->getPointerOperand()->stripPointerCasts();
  671   auto *V = SI->getOperand(0);
  672   if (Value *ByteVal = isBytewiseValue(V, DL)) {
  722 bool MemCpyOptPass::performCallSlotOptzn(Instruction *cpy, Value *cpyDest,
  723                                          Value *cpySrc, uint64_t cpyLen,
  885       Value *Dest = cpySrc->getType() == cpyDest->getType() ?  cpyDest
 1028   Value *Dest = MemCpy->getRawDest();
 1029   Value *DestSize = MemSet->getLength();
 1030   Value *SrcSize = MemCpy->getLength();
 1053   Value *Ule = Builder.CreateICmpULE(DestSize, SrcSize);
 1054   Value *SizeDiff = Builder.CreateSub(DestSize, SrcSize);
 1055   Value *MemsetLen = Builder.CreateSelect(
 1152       if (Value *ByteVal = isBytewiseValue(GV->getInitializer(),
 1261   Value *ByValArg = CS.getArgument(ArgNo);
 1317   Value *TmpCast = MDep->getSource();
lib/Transforms/Scalar/MergeICmps.cpp
  125   int getBaseId(const Value *Base) {
  135   DenseMap<const Value*, int> BaseToIndex;
  141 BCEAtom visitICmpLoadOperand(Value *const Val, BaseIdentifier &BaseId) {
  155   Value *const Addr = LoadI->getOperand(0);
  352 BCECmpBlock visitCmpBlock(Value *const Val, BasicBlock *const Block,
  620   Value *const Lhs = Builder.Insert(FirstCmp.Lhs().GEP->clone());
  621   Value *const Rhs = Builder.Insert(FirstCmp.Rhs().GEP->clone());
  623   Value *IsEqual = nullptr;
  628     Value *const LhsLoad =
  630     Value *const RhsLoad =
  652     Value *const MemCmpCall = emitMemCmp(
lib/Transforms/Scalar/MergedLoadStoreMotion.cpp
  212   Value *Opd1 = S0->getValueOperand();
  213   Value *Opd2 = S1->getValueOperand();
lib/Transforms/Scalar/NaryReassociate.cpp
  299   SmallVector<const Value*, 4> Indices;
  323 bool NaryReassociatePass::requiresSignExtension(Value *Index,
  333   Value *IndexToSplit = GEP->getOperand(I + 1);
  351     Value *LHS = AO->getOperand(0), *RHS = AO->getOperand(1);
  367                                               unsigned I, Value *LHS,
  368                                               Value *RHS, Type *IndexedType) {
  389   Value *Candidate = findClosestMatchingDominator(CandidateExpr, GEP);
  437   Value *LHS = I->getOperand(0), *RHS = I->getOperand(1);
  448 Instruction *NaryReassociatePass::tryReassociateBinaryOp(Value *LHS, Value *RHS,
  448 Instruction *NaryReassociatePass::tryReassociateBinaryOp(Value *LHS, Value *RHS,
  450   Value *A = nullptr, *B = nullptr;
  473                                                           Value *RHS,
  496 bool NaryReassociatePass::matchTernaryOp(BinaryOperator *I, Value *V,
  497                                          Value *&Op1, Value *&Op2) {
  497                                          Value *&Op1, Value *&Op2) {
  539     if (Value *Candidate = Candidates.back()) {
lib/Transforms/Scalar/NewGVN.cpp
  195   const SmallPtrSetImpl<const Value *> &getComponentFor(const Value *V) const {
  195   const SmallPtrSetImpl<const Value *> &getComponentFor(const Value *V) const {
  244   SmallPtrSet<const Value *, 8> InComponent;
  245   DenseMap<const Value *, unsigned int> Root;
  246   SmallVector<const Value *, 8> Stack;
  250   SmallVector<SmallPtrSet<const Value *, 8>, 8> Components;
  252   DenseMap<const Value *, unsigned> ValueToComponent;
  295   using MemberType = Value;
  301   CongruenceClass(unsigned ID, Value *Leader, const Expression *E)
  315   Value *getLeader() const { return RepLeader; }
  316   void setLeader(Value *Leader) { RepLeader = Leader; }
  317   const std::pair<Value *, unsigned int> &getNextLeader() const {
  321   void addPossibleNextLeader(std::pair<Value *, unsigned int> LeaderPair) {
  326   Value *getStoredValue() const { return RepStoredValue; }
  327   void setStoredValue(Value *Leader) { RepStoredValue = Leader; }
  398   Value *RepLeader = nullptr;
  402   std::pair<Value *, unsigned int> NextLeader = {nullptr, ~0U};
  405   Value *RepStoredValue = nullptr;
  503   mutable ArrayRecycler<Value *> ArgRecycler;
  524   DenseMap<Value *, CongruenceClass *> ValueToClass;
  525   DenseMap<Value *, const Expression *> ValueToExpression;
  533   DenseMap<const Value *, bool> OpSafeForPHIOfOps;
  536   DenseMap<const Value *, BasicBlock *> TempToBlock;
  540   DenseMap<const Value *, PHINode *> RealToTemp;
  550   mutable DenseMap<const Value *, SmallPtrSet<Value *, 2>> AdditionalUsers;
  550   mutable DenseMap<const Value *, SmallPtrSet<Value *, 2>> AdditionalUsers;
  576   mutable DenseMap<const Value *, SmallPtrSet<Instruction *, 2>>
  619   SmallPtrSet<Value *, 8> LeaderChanges;
  641   DenseMap<const Value *, unsigned> ProcessedCount;
  648   DenseMap<const Value *, unsigned> InstrDFS;
  651   SmallVector<Value *, 32> DFSToInstr;
  669   const Expression *createBinaryExpression(unsigned, Type *, Value *, Value *,
  669   const Expression *createBinaryExpression(unsigned, Type *, Value *, Value *,
  674   using ValPair = std::pair<Value *, BasicBlock *>;
  680   const VariableExpression *createVariableExpression(Value *) const;
  682   const Expression *createVariableOrConstant(Value *V) const;
  686   LoadExpression *createLoadExpression(Type *, Value *, LoadInst *,
  695   CongruenceClass *createCongruenceClass(Value *Leader, const Expression *E) {
  714   CongruenceClass *createSingletonCongruenceClass(Value *Member) {
  723                                          SmallPtrSetImpl<Value *> &);
  724   Value *findLeaderForInst(Instruction *ValueOp,
  725                            SmallPtrSetImpl<Value *> &Visited,
  728   bool OpIsSafeForPHIOfOpsHelper(Value *V, const BasicBlock *PHIBlock,
  729                                  SmallPtrSetImpl<const Value *> &Visited,
  731   bool OpIsSafeForPHIOfOps(Value *Op, const BasicBlock *PHIBlock,
  732                            SmallPtrSetImpl<const Value *> &);
  742                                                Value *) const;
  743   const Expression *performSymbolicEvaluation(Value *,
  744                                               SmallPtrSetImpl<Value *> &) const;
  745   const Expression *performSymbolicLoadCoercion(Type *, Value *, LoadInst *,
  761   Value *lookupOperandLeader(Value *) const;
  761   Value *lookupOperandLeader(Value *) const;
  768   Value *getNextValueLeader(CongruenceClass *) const;
  776   unsigned int getRank(const Value *) const;
  777   bool shouldSwapOperands(const Value *, const Value *) const;
  777   bool shouldSwapOperands(const Value *, const Value *) const;
  782   Value *findConditionEquivalence(Value *) const;
  782   Value *findConditionEquivalence(Value *) const;
  788                                 DenseMap<const Value *, unsigned int> &,
  794   void replaceInstruction(Instruction *, Value *);
  797   Value *findPHIOfOpsLeader(const Expression *, const Instruction *,
  808   void markUsersTouched(Value *);
  817   void addAdditionalUsers(Value *To, Value *User) const;
  817   void addAdditionalUsers(Value *To, Value *User) const;
  825   void updateProcessedCount(const Value *V);
  831   BasicBlock *getBlockForValue(Value *V) const;
  838   unsigned InstrToDFSNum(const Value *V) const {
  847   Value *InstrFromDFSNum(unsigned DFSNum) { return DFSToInstr[DFSNum]; }
  852   unsigned MemoryToDFSNum(const Value *MA) const {
  916 BasicBlock *NewGVN::getBlockForValue(Value *V) const {
  942 static Value *getCopyOf(const Value *V) {
  942 static Value *getCopyOf(const Value *V) {
  950 static bool isCopyOfPHI(const Value *V, const PHINode *PN) {
  954 static bool isCopyOfAPHI(const Value *V) {
  955   auto *CO = getCopyOf(V);
  972 static bool alwaysAvailable(Value *V) {
 1038                                                  Value *Arg1, Value *Arg2,
 1038                                                  Value *Arg1, Value *Arg2,
 1056   Value *V = SimplifyBinOp(Opcode, E->getOperand(0), E->getOperand(1), SQ);
 1067                                                      Value *V) const {
 1152     Value *V =
 1161       Value *V = SimplifySelectInst(E->getOperand(0), E->getOperand(1),
 1167     Value *V =
 1172     Value *V =
 1177     Value *V = SimplifyGEPInst(
 1190     for (Value *Arg : E->operands())
 1193     if (Value *V = ConstantFoldInstOperands(I, C, DL, TLI))
 1226 const VariableExpression *NewGVN::createVariableExpression(Value *V) const {
 1232 const Expression *NewGVN::createVariableOrConstant(Value *V) const {
 1296 Value *NewGVN::lookupOperandLeader(Value *V) const {
 1296 Value *NewGVN::lookupOperandLeader(Value *V) const {
 1325 LoadExpression *NewGVN::createLoadExpression(Type *LoadType, Value *PointerOp,
 1347   auto *StoredValueLeader = lookupOperandLeader(SI->getValueOperand());
 1415 NewGVN::performSymbolicLoadCoercion(Type *LoadType, Value *LoadPtr,
 1498   Value *LoadAddressLeader = lookupOperandLeader(LI->getPointerOperand());
 1544   auto *CopyOf = I->getOperand(0);
 1545   auto *Cond = PWC->Condition;
 1581   Value *FirstOp = lookupOperandLeader(Cmp->getOperand(0));
 1582   Value *SecondOp = lookupOperandLeader(Cmp->getOperand(1));
 1632     if (auto *ReturnedValue = II->getReturnedArgOperand()) {
 1776   Value *AllSameValue = *(Filtered.begin());
 1907       auto *BranchOp0 = lookupOperandLeader(BranchCond->getOperand(0));
 1908       auto *BranchOp1 = lookupOperandLeader(BranchCond->getOperand(1));
 1956 NewGVN::performSymbolicEvaluation(Value *V,
 1957                                   SmallPtrSetImpl<Value *> &Visited) const {
 2065 void NewGVN::addAdditionalUsers(Value *To, Value *User) const {
 2065 void NewGVN::addAdditionalUsers(Value *To, Value *User) const {
 2071 void NewGVN::markUsersTouched(Value *V) {
 2133 T *NewGVN::getMinDFSOfRange(const Range &R) const {
 2134   std::pair<T *, unsigned> MinDFS = {nullptr, ~0U};
 2155     auto *V = getMinDFSOfRange<Value>(make_filter_range(
 2155     auto *V = getMinDFSOfRange<Value>(make_filter_range(
 2171 Value *NewGVN::getNextValueLeader(CongruenceClass *CC) const {
 2186     return getMinDFSOfRange<Value>(*CC);
 2464 Value *NewGVN::findConditionEquivalence(Value *Cond) const {
 2464 Value *NewGVN::findConditionEquivalence(Value *Cond) const {
 2472   Value *Cond;
 2475     Value *CondEvaluated = findConditionEquivalence(Cond);
 2505     Value *SwitchCond = SI->getCondition();
 2506     Value *CondEvaluated = findConditionEquivalence(SwitchCond);
 2583     Value *V, const BasicBlock *PHIBlock,
 2584     SmallPtrSetImpl<const Value *> &Visited,
 2606   for (auto *Op : OrigI->operand_values()) {
 2632 bool NewGVN::OpIsSafeForPHIOfOps(Value *V, const BasicBlock *PHIBlock,
 2633                                  SmallPtrSetImpl<const Value *> &Visited) {
 2651 Value *NewGVN::findLeaderForInst(Instruction *TransInst,
 2652                                  SmallPtrSetImpl<Value *> &Visited,
 2672   auto *FoundVal = findPHIOfOpsLeader(E, OrigInst, PredBB);
 2688                              SmallPtrSetImpl<Value *> &Visited) {
 2701   SmallPtrSet<const Value *, 8> ProcessedPHIs;
 2714   SmallPtrSet<const Value *, 10> VisitedOps;
 2715   SmallVector<Value *, 4> Ops(I->operand_values());
 2720   for (auto *Op : Ops) {
 2748   SmallPtrSet<Value *, 4> Deps;
 2753     Value *FoundVal = nullptr;
 2754     SmallPtrSet<Value *, 4> CurrentDeps;
 2766         auto *OrigOp = &*Op;
 3007 void NewGVN::updateProcessedCount(const Value *V) {
 3082     SmallPtrSet<Value *, 2> Visited;
 3151   SmallVector<const Value *, 32> OperandList;
 3268   std::map<const Value *, CongruenceClass> BeforeIteration;
 3313       std::pair<const Value *,
 3314                 std::tuple<const Value *, const CongruenceClass *, Value *>>>
 3314                 std::tuple<const Value *, const CongruenceClass *, Value *>>>
 3366       Value *V = InstrFromDFSNum(InstrNum);
 3506   PointerIntPair<Value *, 1, bool> Def;
 3561     DenseMap<const Value *, unsigned int> &UseCounts,
 3674 static void patchAndReplaceAllUsesWith(Instruction *I, Value *Repl) {
 3711 void NewGVN::replaceInstruction(Instruction *I, Value *V) {
 3725   Value *back() const { return ValueStack.back(); }
 3728   void push_back(Value *V, int DFSIn, int DFSOut) {
 3755   SmallVector<Value *, 8> ValueStack;
 3772 Value *NewGVN::findPHIOfOpsLeader(const Expression *E,
 3779     auto *V = VE->getVariableValue();
 3859       auto *Inst = InstrFromDFSNum(InstNum);
 3871   DenseMap<const Value *, unsigned int> UseCounts;
 3900     Value *Leader =
 3905         Value *Member = M;
 3938           Value *Def = VD.Def.getPointer();
 4042           Value *DominatingLeader = EliminationStack.back();
 4091     for (auto *Member : *CC)
 4139 unsigned int NewGVN::getRank(const Value *V) const {
 4163 bool NewGVN::shouldSwapOperands(const Value *A, const Value *B) const {
 4163 bool NewGVN::shouldSwapOperands(const Value *A, const Value *B) const {
lib/Transforms/Scalar/PartiallyInlineLibCalls.cpp
   75   Value *FCmp = TTI->isFCmpOrdCheaperThanFCmpZero(Ty)
lib/Transforms/Scalar/Reassociate.cpp
   97   XorOpnd(Value *V);
  101   Value *getValue() const { return OrigVal; }
  102   Value *getSymbolicPart() const { return SymbolicPart; }
  110   Value *OrigVal;
  111   Value *SymbolicPart;
  117 XorOpnd::XorOpnd(Value *V) {
  125     Value *V0 = I->getOperand(0);
  126     Value *V1 = I->getOperand(1);
  147 static BinaryOperator *isReassociableOp(Value *V, unsigned Opcode) {
  155 static BinaryOperator *isReassociableOp(Value *V, unsigned Opcode1,
  189 unsigned ReassociatePass::getRank(Value *V) {
  224   Value *LHS = I->getOperand(0);
  225   Value *RHS = I->getOperand(1);
  232 static BinaryOperator *CreateAdd(Value *S1, Value *S2, const Twine &Name,
  232 static BinaryOperator *CreateAdd(Value *S1, Value *S2, const Twine &Name,
  233                                  Instruction *InsertBefore, Value *FlagsOp) {
  244 static BinaryOperator *CreateMul(Value *S1, Value *S2, const Twine &Name,
  244 static BinaryOperator *CreateMul(Value *S1, Value *S2, const Twine &Name,
  245                                  Instruction *InsertBefore, Value *FlagsOp) {
  256 static BinaryOperator *CreateNeg(Value *S1, const Twine &Name,
  257                                  Instruction *InsertBefore, Value *FlagsOp) {
  376 using RepeatedValue = std::pair<Value*, APInt>;
  490   using LeafMap = DenseMap<Value *, APInt>;
  492   SmallVector<Value *, 8> LeafOrder; // Ensure deterministic leaf output order.
  495   SmallPtrSet<Value *, 8> Visited; // For sanity checking the iteration scheme.
  502       Value *Op = I->getOperand(OpIdx);
  605     Value *V = LeafOrder[i];
  663   SmallPtrSet<Value*, 8> NotRewritable;
  676       Value *NewLHS = Ops[i].Op;
  677       Value *NewRHS = Ops[i+1].Op;
  678       Value *OldLHS = Op->getOperand(0);
  679       Value *OldRHS = Op->getOperand(1);
  721     Value *NewRHS = Ops[i].Op;
  815 static Value *NegateValue(Value *V, Instruction *BI,
  815 static Value *NegateValue(Value *V, Instruction *BI,
  933   Value *V0 = Sub->getOperand(0);
  937   Value *V1 = Sub->getOperand(1);
  941   Value *VB = Sub->user_back();
  959   Value *NegVal = NegateValue(Sub->getOperand(1), Sub, ToRedo);
 1003                                   unsigned i, Value *X) {
 1028 static Value *EmitAddTreeOfValues(Instruction *I,
 1032   Value *V1 = Ops.back();
 1034   Value *V2 = EmitAddTreeOfValues(I, Ops);
 1041 Value *ReassociatePass::RemoveFactorFromExpression(Value *V, Value *Factor) {
 1041 Value *ReassociatePass::RemoveFactorFromExpression(Value *V, Value *Factor) {
 1041 Value *ReassociatePass::RemoveFactorFromExpression(Value *V, Value *Factor) {
 1115 static void FindSingleUseMultiplyFactors(Value *V,
 1116                                          SmallVectorImpl<Value*> &Factors) {
 1131 static Value *OptimizeAndOrXor(unsigned Opcode,
 1138     Value *X;
 1181 static Value *createAndInstr(Instruction *InsertBefore, Value *Opnd,
 1181 static Value *createAndInstr(Instruction *InsertBefore, Value *Opnd,
 1203                                      APInt &ConstOpnd, Value *&Res) {
 1218   Value *X = Opnd1->getSymbolicPart();
 1238                                      Value *&Res) {
 1239   Value *X = Opnd1->getSymbolicPart();
 1311 Value *ReassociatePass::OptimizeXor(Instruction *I,
 1313   if (Value *V = OptimizeAndOrXor(Instruction::Xor, Ops))
 1326     Value *V = Ops[i].Op;
 1369     Value *CV;
 1415       Value *C = ConstantInt::get(Ty, ConstOpnd);
 1434 Value *ReassociatePass::OptimizeAdd(Instruction *I,
 1442     Value *TheOp = Ops[i].Op;
 1484     Value *X;
 1514       Value *V = Constant::getAllOnesValue(X->getType());
 1525   DenseMap<Value*, unsigned> FactorOccurrences;
 1530   Value *MaxOccVal = nullptr;
 1538     SmallVector<Value*, 8> Factors;
 1543     SmallPtrSet<Value*, 8> Duplicates;
 1545       Value *Factor = Factors[i];
 1609       if (Value *V = RemoveFactorFromExpression(Ops[i].Op, MaxOccVal)) {
 1627     Value *V = EmitAddTreeOfValues(I, NewMulOps);
 1675     Value *Op = Ops[Idx-1].Op;
 1696     Value *Op = Ops[Idx-1].Op;
 1723 static Value *buildMultiplyTree(IRBuilder<> &Builder,
 1724                                 SmallVectorImpl<Value*> &Ops) {
 1728   Value *LHS = Ops.pop_back_val();
 1745 Value *
 1749   SmallVector<Value *, 4> OuterProduct;
 1760     SmallVector<Value *, 4> InnerProduct;
 1769     Value *M = Factors[LastIdx].Base = buildMultiplyTree(Builder, InnerProduct);
 1792     Value *SquareRoot = buildMinimalMultiplyDAG(Builder, Factors);
 1799   Value *V = buildMultiplyTree(Builder, OuterProduct);
 1803 Value *ReassociatePass::OptimizeMul(BinaryOperator *I,
 1824   Value *V = buildMinimalMultiplyDAG(Builder, Factors);
 1833 Value *ReassociatePass::OptimizeExpression(BinaryOperator *I,
 1865     if (Value *Result = OptimizeAndOrXor(Opcode, Ops))
 1870     if (Value *Result = OptimizeXor(I, Ops))
 1876     if (Value *Result = OptimizeAdd(I, Ops))
 1882     if (Value *Result = OptimizeMul(I, Ops))
 1897   SmallVector<Value *, 4> Ops(I->op_begin(), I->op_end());
 1913   SmallVector<Value*, 8> Ops(I->op_begin(), I->op_end());
 1944 static void getNegatibleInsts(Value *V,
 1992                                                               Value *OtherOp) {
 2038   Value *NewInst = IsFSub ? Builder.CreateFAddFMF(OtherOp, Op, I)
 2055   Value *X;
 2148       Value *Op = isa<BinaryOperator>(I) ? I->getOperand(1) :
 2221   if (Value *V = OptimizeExpression(I, Ops)) {
 2288         Value *Op0 = Ops[i].Op;
 2289         Value *Op1 = Ops[j].Op;
 2339       SmallVector<Value *, 8> Worklist = { I.getOperand(0), I.getOperand(1) };
 2340       SmallVector<Value *, 8> Ops;
 2342         Value *Op = Worklist.pop_back_val();
 2360       SmallSet<std::pair<Value *, Value*>, 32> Visited;
 2360       SmallSet<std::pair<Value *, Value*>, 32> Visited;
 2364           Value *Op0 = Ops[i];
 2365           Value *Op1 = Ops[j];
lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
  234   MapVector<BasicBlock *, SetVector<Value *>> KillSet;
  238   MapVector<BasicBlock *, SetVector<Value *>> LiveSet;
  242   MapVector<BasicBlock *, SetVector<Value *>> LiveIn;
  246   MapVector<BasicBlock *, SetVector<Value *>> LiveOut;
  259 using DefiningValueMapTy = MapVector<Value *, Value *>;
  259 using DefiningValueMapTy = MapVector<Value *, Value *>;
  260 using StatepointLiveSetTy = SetVector<Value *>;
  262     MapVector<AssertingVH<Instruction>, AssertingVH<Value>>;
  269   MapVector<Value *, Value *> PointerToBase;
  269   MapVector<Value *, Value *> PointerToBase;
  362 static std::string suffixed_name_or(Value *V, StringRef Suffix,
  379     for (Value *V : LiveSet)
  389 static bool isKnownBaseResult(Value *V);
  403   Value * const BDV;
  409   BaseDefiningValueResult(Value *BDV, bool IsKnownBase)
  422 static BaseDefiningValueResult findBaseDefiningValue(Value *I);
  434 findBaseDefiningValueOfVector(Value *I) {
  492 static BaseDefiningValueResult findBaseDefiningValue(Value *I) {
  520     Value *Def = CI->stripPointerCasts();
  611 static Value *findBaseDefiningValueCached(Value *I, DefiningValueMapTy &Cache) {
  611 static Value *findBaseDefiningValueCached(Value *I, DefiningValueMapTy &Cache) {
  612   Value *&Cached = Cache[I];
  624 static Value *findBaseOrBDV(Value *I, DefiningValueMapTy &Cache) {
  624 static Value *findBaseOrBDV(Value *I, DefiningValueMapTy &Cache) {
  625   Value *Def = findBaseDefiningValueCached(I, Cache);
  637 static bool isKnownBaseResult(Value *V) {
  666   explicit BDVState(Status Status, Value *BaseValue = nullptr)
  671   explicit BDVState(Value *BaseValue) : Status(Base), BaseValue(BaseValue) {}
  674   Value *getBaseValue() const { return BaseValue; }
  710   AssertingVH<Value> BaseValue; // Non-null only if Status == Base.
  761 static Value *findBasePointer(Value *I, DefiningValueMapTy &Cache) {
  761 static Value *findBasePointer(Value *I, DefiningValueMapTy &Cache) {
  762   Value *Def = findBaseOrBDV(I, Cache);
  802   MapVector<Value *, BDVState> States;
  807     SmallVector<Value*, 16> Worklist;
  811       Value *Current = Worklist.pop_back_val();
  815         Value *Base = findBaseOrBDV(InVal, Cache);
  826         for (Value *InVal : PN->incoming_values())
  874       Value *BDV = Pair.first;
  880         Value *BDV = findBaseOrBDV(V, Cache);
  890         for (Value *Val : PN->incoming_values())
 1008     Value *BDV = findBaseOrBDV(Input, Cache);
 1009     Value *Base = nullptr;
 1040         Value *InVal = PN->getIncomingValue(i);
 1054           Value *OldBase = BasePHI->getIncomingValue(BlockIndex);
 1058           Value *Base = getBaseForInput(InVal, nullptr);
 1074         Value *Base = getBaseForInput(InVal, InBB->getTerminator());
 1088       Value *InVal = cast<ExtractElementInst>(BDV)->getVectorOperand();
 1095         Value *InVal = BdvIE->getOperand(OperandIdx);
 1096         Value *Base = getBaseForInput(InVal, BaseIE);
 1105         Value *InVal = BdvSV->getOperand(OperandIdx);
 1106         Value *Base = getBaseForInput(InVal, BaseSV);
 1118     auto *BDV = Pair.first;
 1119     Value *Base = Pair.second.getBaseValue();
 1160                  MapVector<Value *, Value *> &PointerToBase,
 1160                  MapVector<Value *, Value *> &PointerToBase,
 1162   for (Value *ptr : live) {
 1163     Value *base = findBasePointer(ptr, DVCache);
 1178   MapVector<Value *, Value *> PointerToBase;
 1178   MapVector<Value *, Value *> PointerToBase;
 1268 static void CreateGCRelocates(ArrayRef<Value *> LiveVariables,
 1270                               ArrayRef<Value *> BasePtrs,
 1309     Value *BaseIdx =
 1311     Value *LiveIdx = Builder.getInt32(LiveStart + i);
 1415                            const SmallVectorImpl<Value *> &BasePtrs,
 1416                            const SmallVectorImpl<Value *> &LiveVariables,
 1427   ArrayRef<Value *> GCArgs(LiveVariables);
 1461   Value *CallTarget = Call->getCalledValue();
 1469       for (Value *Arg : CallArgs)
 1608   SmallVector<Value *, 64> BaseVec, LiveVec;
 1611   for (Value *L : LiveSet) {
 1614     Value *Base = PointerToBase.find(L)->second;
 1630 insertRelocationStores(iterator_range<Value::user_iterator> GCRelocs,
 1631                        DenseMap<Value *, AllocaInst *> &AllocaMap,
 1632                        DenseSet<Value *> &VisitedLiveValues) {
 1638     Value *OriginalValue = Relocate->getDerivedPtr();
 1640     Value *Alloca = AllocaMap[OriginalValue];
 1648     Value *CastedRelocatedValue =
 1666     DenseMap<Value *, AllocaInst *> &AllocaMap,
 1667     DenseSet<Value *> &VisitedLiveValues) {
 1670     Value *OriginalValue = RematerializedValuePair.second;
 1674     Value *Alloca = AllocaMap[OriginalValue];
 1687     Function &F, DominatorTree &DT, ArrayRef<Value *> Live,
 1699   DenseMap<Value *, AllocaInst *> AllocaMap;
 1717   for (Value *V : Live)
 1723       Value *OriginalValue = RematerializedValuePair.second;
 1741     Value *Statepoint = Info.StatepointToken;
 1744     DenseSet<Value *> VisitedLiveValues;
 1768         Value *Def = Pair.first;
 1800     Value *Def = Pair.first;
 1890 static void insertUseHolderAfter(CallBase *Call, const ArrayRef<Value *> Values,
 1932 static Value* findRematerializableChainToBasePointer(
 1934   Value *CurrentValue) {
 1996   SmallDenseMap<Value *, BasicBlock *, 8> CurrentIncomingValues;
 2026   SmallVector<Value *, 32> LiveValuesToBeDeleted;
 2028   for (Value *LiveValue: Info.LiveSet) {
 2032     Value *RootOfChain =
 2205     SmallVector<Value *, 64> DeoptValues;
 2207     for (Value *Arg : GetDeoptBundleOperands(Call)) {
 2253     SmallVector<Value *, 128> Bases;
 2337   SmallVector<Value *, 128> Live;
 2356     for (Value *V : Statepoint.gc_args()) {
 2372   for (auto *Ptr : Live)
 2620       auto *Splat = B.CreateVectorSplat(VF, I.getOperand(0));
 2651     for (Value *V : I.operands()) {
 2671 static void computeLiveOutSeed(BasicBlock *BB, SetVector<Value *> &LiveTmp) {
 2678       Value *V = PN->getIncomingValueForBlock(BB);
 2687 static SetVector<Value *> computeKillSet(BasicBlock *BB) {
 2688   SetVector<Value *> KillSet;
 2698 static void checkBasicSSA(DominatorTree &DT, SetVector<Value *> &Live,
 2700   for (Value *V : Live) {
 2735     for (Value *Kill : Data.KillSet[&BB])
 2754     SetVector<Value *> LiveOut = Data.LiveOut[BB];
 2770     SetVector<Value *> LiveTmp = LiveOut;
 2775     const SetVector<Value *> &OldLiveIn = Data.LiveIn[BB];
 2797   SetVector<Value *> LiveOut = Data.LiveOut[BB];
 2832   DenseSet<Value *> ToErase;
 2837   for (auto *V : ToErase)
lib/Transforms/Scalar/SCCP.cpp
  196   DenseMap<Value *, LatticeVal> ValueState;  // The state each value is in.
  198   DenseMap<Value *, ValueLatticeElement> ParamState;
  202   DenseMap<std::pair<Value *, unsigned>, LatticeVal> StructValueState;
  239   SmallVector<Value *, 64> OverdefinedInstWorkList;
  240   SmallVector<Value *, 64> InstWorkList;
  251   DenseMap<Value *, SmallPtrSet<User *, 2>> AdditionalUsers;
  354   std::vector<LatticeVal> getStructLatticeValueFor(Value *V) const {
  366   const LatticeVal &getLatticeValueFor(Value *V) const {
  369     DenseMap<Value *, LatticeVal>::const_iterator I = ValueState.find(V);
  400   void markOverdefined(Value *V) {
  424   void pushToWorkList(LatticeVal &IV, Value *V) {
  433   bool markConstant(LatticeVal &IV, Value *V, Constant *C) {
  440   bool markConstant(Value *V, Constant *C) {
  445   void markForcedConstant(Value *V, Constant *C) {
  456   bool markOverdefined(LatticeVal &IV, Value *V) {
  468   bool mergeInValue(LatticeVal &IV, Value *V, LatticeVal MergeWithV) {
  480   bool mergeInValue(Value *V, LatticeVal MergeWithV) {
  489   LatticeVal &getValueState(Value *V) {
  492     std::pair<DenseMap<Value*, LatticeVal>::iterator, bool> I =
  509   ValueLatticeElement &getParamState(Value *V) {
  512     std::pair<DenseMap<Value*, ValueLatticeElement>::iterator, bool>
  524   LatticeVal &getStructValueState(Value *V, unsigned i) {
  529     std::pair<DenseMap<std::pair<Value*, unsigned>, LatticeVal>::iterator,
  584   void addAdditionalUser(Value *V, User *U) {
  590   void markUsersAsChanged(Value *I) {
  838   Value *ResultOp = I.getOperand(0);
  897   Value *AggVal = EVI.getAggregateOperand();
  918   Value *Aggr = IVI.getAggregateOperand();
  930     Value *Val = IVI.getInsertedValueOperand();
  952     Value *OpVal = CondCB->isZero() ? I.getFalseValue() : I.getTrueValue();
 1067   Value *Op1 = I.getOperand(0);
 1068   Value *Op2 = I.getOperand(1);
 1211       Value *CopyOf = I->getOperand(0);
 1218       Value *Cond = PBranch->Condition;
 1227       Value *CmpOp0 = Cmp->getOperand(0);
 1228       Value *CmpOp1 = Cmp->getOperand(1);
 1372       Value *I = OverdefinedInstWorkList.pop_back_val();
 1388       Value *I = InstWorkList.pop_back_val();
 1752 static bool tryToReplaceWithConstant(SCCPSolver &Solver, Value *V) {
 2128       for (Value::user_iterator UI = DeadBB->user_begin(),
 2169               Value *Op = II->getOperand(0);
lib/Transforms/Scalar/SROA.cpp
  622 static Value *foldSelectInst(SelectInst &SI) {
  635 static Value *foldPHINodeOrSelectInst(Instruction &I) {
  795     Value *ValOp = SI.getValueOperand();
  967         Value *Op = SI->getOperand(0);
 1004     if (Value *Result = foldPHINodeOrSelectInst(I)) {
 1237     Value *InVal = PN.getIncomingValue(Idx);
 1285   DenseMap<BasicBlock*, Value*> InjectedLoads;
 1288     Value *InVal = PN.getIncomingValue(Idx);
 1294     if (Value* V = InjectedLoads.lookup(Pred)) {
 1331   Value *TValue = SI.getTrueValue();
 1332   Value *FValue = SI.getFalseValue();
 1358   Value *TV = SI.getTrueValue();
 1359   Value *FV = SI.getFalseValue();
 1383     Value *V = IRB.CreateSelect(SI.getCondition(), TL, FL,
 1397 static Value *buildGEP(IRBuilderTy &IRB, Value *BasePtr,
 1397 static Value *buildGEP(IRBuilderTy &IRB, Value *BasePtr,
 1398                        SmallVectorImpl<Value *> &Indices, Twine NamePrefix) {
 1420 static Value *getNaturalGEPWithType(IRBuilderTy &IRB, const DataLayout &DL,
 1421                                     Value *BasePtr, Type *Ty, Type *TargetTy,
 1422                                     SmallVectorImpl<Value *> &Indices,
 1464 static Value *getNaturalGEPRecursively(IRBuilderTy &IRB, const DataLayout &DL,
 1465                                        Value *Ptr, Type *Ty, APInt &Offset,
 1467                                        SmallVectorImpl<Value *> &Indices,
 1538 static Value *getNaturalGEPWithOffset(IRBuilderTy &IRB, const DataLayout &DL,
 1539                                       Value *Ptr, APInt Offset, Type *TargetTy,
 1540                                       SmallVectorImpl<Value *> &Indices,
 1578 static Value *getAdjustedPtr(IRBuilderTy &IRB, const DataLayout &DL, Value *Ptr,
 1578 static Value *getAdjustedPtr(IRBuilderTy &IRB, const DataLayout &DL, Value *Ptr,
 1582   SmallPtrSet<Value *, 4> Visited;
 1584   SmallVector<Value *, 4> Indices;
 1589   Value *OffsetPtr = nullptr;
 1590   Value *OffsetBasePtr;
 1594   Value *Int8Ptr = nullptr;
 1620     if (Value *P = getNaturalGEPWithOffset(IRB, DL, Ptr, Offset, TargetTy,
 1760 static Value *convertValue(const DataLayout &DL, IRBuilderTy &IRB, Value *V,
 1760 static Value *convertValue(const DataLayout &DL, IRBuilderTy &IRB, Value *V,
 2130 static Value *extractInteger(const DataLayout &DL, IRBuilderTy &IRB, Value *V,
 2130 static Value *extractInteger(const DataLayout &DL, IRBuilderTy &IRB, Value *V,
 2153 static Value *insertInteger(const DataLayout &DL, IRBuilderTy &IRB, Value *Old,
 2153 static Value *insertInteger(const DataLayout &DL, IRBuilderTy &IRB, Value *Old,
 2154                             Value *V, uint64_t Offset, const Twine &Name) {
 2184 static Value *extractVector(IRBuilderTy &IRB, Value *V, unsigned BeginIndex,
 2184 static Value *extractVector(IRBuilderTy &IRB, Value *V, unsigned BeginIndex,
 2210 static Value *insertVector(IRBuilderTy &IRB, Value *Old, Value *V,
 2210 static Value *insertVector(IRBuilderTy &IRB, Value *Old, Value *V,
 2210 static Value *insertVector(IRBuilderTy &IRB, Value *Old, Value *V,
 2392   Value *getNewAllocaSlicePtr(IRBuilderTy &IRB, Type *PointerTy) {
 2453   void deleteIfTriviallyDead(Value *V) {
 2459   Value *rewriteVectorizedLoadInst() {
 2464     Value *V = IRB.CreateAlignedLoad(NewAI.getAllocatedType(), &NewAI,
 2469   Value *rewriteIntegerLoad(LoadInst &LI) {
 2472     Value *V = IRB.CreateAlignedLoad(NewAI.getAllocatedType(), &NewAI,
 2495     Value *OldOp = LI.getOperand(0);
 2507     Value *V;
 2581       Value *Placeholder = new LoadInst(
 2598   bool rewriteVectorizedStoreInst(Value *V, StoreInst &SI, Value *OldOp,
 2598   bool rewriteVectorizedStoreInst(Value *V, StoreInst &SI, Value *OldOp,
 2613       Value *Old = IRB.CreateAlignedLoad(NewAI.getAllocatedType(), &NewAI,
 2626   bool rewriteIntegerStore(Value *V, StoreInst &SI, AAMDNodes AATags) {
 2630       Value *Old = IRB.CreateAlignedLoad(NewAI.getAllocatedType(), &NewAI,
 2650     Value *OldOp = SI.getOperand(1);
 2656     Value *V = SI.getValueOperand();
 2704       Value *NewPtr = getNewAllocaSlicePtr(IRB, V->getType()->getPointerTo(AS));
 2730   Value *getIntegerSplat(Value *V, unsigned Size) {
 2730   Value *getIntegerSplat(Value *V, unsigned Size) {
 2749   Value *getVectorSplat(Value *V, unsigned NumElements) {
 2749   Value *getVectorSplat(Value *V, unsigned NumElements) {
 2815     Value *V;
 2827       Value *Splat =
 2833       Value *Old = IRB.CreateAlignedLoad(NewAI.getAllocatedType(), &NewAI,
 2846         Value *Old = IRB.CreateAlignedLoad(NewAI.getAllocatedType(), &NewAI,
 2899       Value *AdjustedPtr = getNewAllocaSlicePtr(IRB, OldPtr->getType());
 2945     Value *OtherPtr = IsDest ? II.getRawSource() : II.getRawDest();
 2970       Value *OurPtr = getNewAllocaSlicePtr(IRB, OldPtr->getType());
 2974       Value *DestPtr, *SrcPtr;
 3020     Value *SrcPtr = getAdjustedPtr(IRB, DL, OtherPtr, OtherOffset, OtherPtrTy,
 3023     Value *DstPtr = &NewAI;
 3030     Value *Src;
 3050       Value *Old = IRB.CreateAlignedLoad(NewAI.getAllocatedType(), &NewAI,
 3054       Value *Old = IRB.CreateAlignedLoad(NewAI.getAllocatedType(), &NewAI,
 3095     Value *Ptr = getNewAllocaSlicePtr(IRB, PointerTy);
 3096     Value *New;
 3129           Value *Op = SI->getOperand(0);
 3161     Value *NewPtr = getNewAllocaSlicePtr(PtrBuilder, OldPtr->getType());
 3163     std::replace(PN.op_begin(), PN.op_end(), cast<Value>(OldPtr), NewPtr);
 3185     Value *NewPtr = getNewAllocaSlicePtr(IRB, OldPtr->getType());
 3270     SmallVector<Value *, 4> GEPIndices;
 3274     Value *Ptr;
 3288     OpSplitter(Instruction *InsertionPoint, Value *Ptr, Type *BaseTy,
 3307     void emitSplitOps(Type *Ty, Value *&Agg, const Twine &Name) {
 3351     LoadOpSplitter(Instruction *InsertionPoint, Value *Ptr, Type *BaseTy,
 3358     void emitFunc(Type *Ty, Value *&Agg, unsigned Align, const Twine &Name) {
 3361       Value *GEP =
 3382     Value *V = UndefValue::get(LI.getType());
 3390     StoreOpSplitter(Instruction *InsertionPoint, Value *Ptr, Type *BaseTy,
 3398     void emitFunc(Type *Ty, Value *&Agg, unsigned Align, const Twine &Name) {
 3404       Value *ExtractValue =
 3406       Value *InBoundsGEP =
 3419     Value *V = SI.getValueOperand();
 3907       Value *StoreBasePtr = SI->getPointerOperand();
 3973     Value *LoadBasePtr = LI->getPointerOperand();
 4416   Value *OldV = U;
lib/Transforms/Scalar/Scalarizer.cpp
   62 using ValueVector = SmallVector<Value *, 8>;
   67 using ScatterMap = std::map<Value *, ValueVector>;
   82   Scatterer(BasicBlock *bb, BasicBlock::iterator bbi, Value *v,
   86   Value *operator[](unsigned I);
   94   Value *V;
  106   Value *operator()(IRBuilder<> &Builder, Value *Op0, Value *Op1,
  106   Value *operator()(IRBuilder<> &Builder, Value *Op0, Value *Op1,
  106   Value *operator()(IRBuilder<> &Builder, Value *Op0, Value *Op1,
  119   Value *operator()(IRBuilder<> &Builder, Value *Op0, Value *Op1,
  119   Value *operator()(IRBuilder<> &Builder, Value *Op0, Value *Op1,
  119   Value *operator()(IRBuilder<> &Builder, Value *Op0, Value *Op1,
  132   Value *operator()(IRBuilder<> &Builder, Value *Op, const Twine &Name) const {
  132   Value *operator()(IRBuilder<> &Builder, Value *Op, const Twine &Name) const {
  144   Value *operator()(IRBuilder<> &Builder, Value *Op0, Value *Op1,
  144   Value *operator()(IRBuilder<> &Builder, Value *Op0, Value *Op1,
  144   Value *operator()(IRBuilder<> &Builder, Value *Op0, Value *Op1,
  200   Scatterer scatter(Instruction *Point, Value *V);
  238 Scatterer::Scatterer(BasicBlock *bb, BasicBlock::iterator bbi, Value *v,
  255 Value *Scatterer::operator[](unsigned I) {
  334 Scatterer ScalarizerVisitor::scatter(Instruction *Point, Value *V) {
  371       Value *V = SV[I];
  518     Value *OpI = CI.getOperand(I);
  573     Value *Op0 = SI.getOperand(0);
  609   Value *Op0 = GEPI.getOperand(0);
  617     Value *Op = GEPI.getOperand(I + 1);
  630     SmallVector<Value *, 8> Indices;
  686       Value *V = Op0[Op0I];
  704       Value *V = UndefValue::get(MidTy);
  798   Value *FullValue = SI.getValueOperand();
  836       Value *Res = UndefValue::get(Ty);
lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp
  236   static Value *Extract(Value *Idx, GetElementPtrInst *GEP,
  236   static Value *Extract(Value *Idx, GetElementPtrInst *GEP,
  242   static int64_t Find(Value *Idx, GetElementPtrInst *GEP,
  264   APInt find(Value *V, bool SignExtended, bool ZeroExtended, bool NonNegative);
  285   Value *rebuildWithoutConstOffset();
  302   Value *distributeExtsAndCloneChain(unsigned ChainIndex);
  305   Value *removeConstOffset(unsigned ChainIndex);
  310   Value *applyExts(Value *V);
  310   Value *applyExts(Value *V);
  438   bool hasMoreThanOneUseInLoop(Value *v, Loop *L);
  496   Value *LHS = BO->getOperand(0), *RHS = BO->getOperand(1);
  570 APInt ConstantOffsetExtractor::find(Value *V, bool SignExtended,
  614 Value *ConstantOffsetExtractor::applyExts(Value *V) {
  614 Value *ConstantOffsetExtractor::applyExts(Value *V) {
  615   Value *Current = V;
  633 Value *ConstantOffsetExtractor::rebuildWithoutConstOffset() {
  647 Value *
  669   Value *TheOther = applyExts(BO->getOperand(1 - OpNo));
  670   Value *NextInChain = distributeExtsAndCloneChain(ChainIndex - 1);
  683 Value *ConstantOffsetExtractor::removeConstOffset(unsigned ChainIndex) {
  697   Value *NextInChain = removeConstOffset(ChainIndex - 1);
  698   Value *TheOther = BO->getOperand(1 - OpNo);
  735 Value *ConstantOffsetExtractor::Extract(Value *Idx, GetElementPtrInst *GEP,
  735 Value *ConstantOffsetExtractor::Extract(Value *Idx, GetElementPtrInst *GEP,
  748   Value *IdxWithoutConstOffset = Extractor.rebuildWithoutConstOffset();
  753 int64_t ConstantOffsetExtractor::Find(Value *Idx, GetElementPtrInst *GEP,
  820   Value *ResultPtr = Variadic->getOperand(0);
  826   Value *FirstResult = nullptr;
  836       Value *Idx = Variadic->getOperand(I);
  863     Value *Offset = ConstantInt::get(IntPtrTy, AccumulativeByteOffset);
  890   Value *ResultPtr = Builder.CreatePtrToInt(Variadic->getOperand(0), IntPtrTy);
  897       Value *Idx = Variadic->getOperand(I);
  980       Value *OldIdx = GEP->getOperand(I);
  982       Value *NewIdx =
 1170   Value *LHS = nullptr, *RHS = nullptr;
 1241   Value *FirstBase = FirstGEP->getOperand(0);
 1242   Value *SecondBase = SecondGEP->getOperand(0);
 1243   Value *FirstOffset = FirstGEP->getOperand(1);
 1280 bool SeparateConstOffsetFromGEP::hasMoreThanOneUseInLoop(Value *V, Loop *L) {
 1293   Value *Offset1 = First->getOperand(1);
 1294   Value *Offset2 = Second->getOperand(1);
 1303   Value *NewBase =
lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
  102 static TinyPtrVector<Value *>
  107   TinyPtrVector<Value *> Invariants;
  116     for (Value *OpV : I.operand_values()) {
  141 static void replaceLoopInvariantUses(Loop &L, Value *Invariant,
  178                                                   ArrayRef<Value *> Invariants,
  184   Value *Cond = Direction ? IRB.CreateOr(Invariants) :
  244       Value *Incoming = PN.getIncomingValue(i);
  356   TinyPtrVector<Value *> Invariants;
  529   for (Value *Invariant : Invariants)
  576   Value *LoopCond = SI.getCondition();
 1902     Loop &L, Instruction &TI, ArrayRef<Value *> Invariants,
 2220     for (Value *Invariant : Invariants)
 2453     ArrayRef<std::pair<Instruction *, TinyPtrVector<Value *>>>
 2530   SmallVector<std::pair<Instruction *, TinyPtrVector<Value *>>, 4>
 2549           auto *Cond = cast<IntrinsicInst>(&I)->getArgOperand(0);
 2579     TinyPtrVector<Value *> Invariants =
 2624   SmallPtrSet<const Value *, 4> EphValues;
 2728   ArrayRef<Value *> BestUnswitchInvariants;
 2731     ArrayRef<Value *> Invariants = TerminatorAndInvariants.second;
lib/Transforms/Scalar/SimplifyCFGPass.cpp
  123       Value *InVal = cast<ReturnInst>(RetBlock->getTerminator())->getOperand(0);
lib/Transforms/Scalar/SpeculateAroundPHIs.cpp
  462         for (Value *OpV : I->operand_values())
  535           for (auto *OpV : SpecI->operand_values()) {
  621   SmallDenseMap<Instruction *, SmallVector<Value *, 2>, 16> SpeculatedValueMap;
  627     for (auto *OpV : OrigI->operand_values()) {
  643       SmallDenseMap<BasicBlock *, Value *, 16> IncomingValueMap;
lib/Transforms/Scalar/SpeculativeExecution.cpp
  257     for (Value* V : U->operand_values()) {
lib/Transforms/Scalar/StraightLineStrengthReduce.cpp
  110     Candidate(Kind CT, const SCEV *B, ConstantInt *Idx, Value *S,
  123     Value *Stride = nullptr;
  189   void allocateCandidatesAndFindBasisForAdd(Value *LHS, Value *RHS,
  189   void allocateCandidatesAndFindBasisForAdd(Value *LHS, Value *RHS,
  196   void allocateCandidatesAndFindBasisForMul(Value *LHS, Value *RHS,
  196   void allocateCandidatesAndFindBasisForMul(Value *LHS, Value *RHS,
  205                                             Value *S, uint64_t ElementSize,
  211                                       ConstantInt *Idx, Value *S,
  220   void factorArrayIndex(Value *ArrayIdx, const SCEV *Base, uint64_t ElementSize,
  227   static Value *emitBump(const Candidate &Basis, const Candidate &C,
  274   SmallVector<const Value*, 4> Indices;
  282 static bool isAddFoldable(const SCEV *Base, ConstantInt *Index, Value *Stride,
  336     Candidate::Kind CT, const SCEV *B, ConstantInt *Idx, Value *S,
  393   Value *LHS = I->getOperand(0), *RHS = I->getOperand(1);
  400     Value *LHS, Value *RHS, Instruction *I) {
  400     Value *LHS, Value *RHS, Instruction *I) {
  401   Value *S = nullptr;
  420 static bool matchesAdd(Value *A, Value *&B, ConstantInt *&C) {
  420 static bool matchesAdd(Value *A, Value *&B, ConstantInt *&C) {
  426 static bool matchesOr(Value *A, Value *&B, ConstantInt *&C) {
  426 static bool matchesOr(Value *A, Value *&B, ConstantInt *&C) {
  432     Value *LHS, Value *RHS, Instruction *I) {
  432     Value *LHS, Value *RHS, Instruction *I) {
  433   Value *B = nullptr;
  461   Value *LHS = I->getOperand(0), *RHS = I->getOperand(1);
  470     const SCEV *B, ConstantInt *Idx, Value *S, uint64_t ElementSize,
  482 void StraightLineStrengthReduce::factorArrayIndex(Value *ArrayIdx,
  490   Value *LHS = nullptr;
  538     Value *ArrayIdx = GEP->getOperand(I);
  549     Value *TruncatedArrayIdx = nullptr;
  570 Value *StraightLineStrengthReduce::emitBump(const Candidate &Basis,
  605   Value *ExtendedStride = Builder.CreateSExtOrTrunc(C.Stride, DeltaType);
  638   Value *Bump = emitBump(Basis, C, Builder, DL, BumpWithUglyGEP);
  639   Value *Reduced = nullptr; // equivalent to but weaker than C.Ins
  644     Value *NegBump;
  732       Value *Op = UnlinkedInst->getOperand(I);
lib/Transforms/Scalar/StructurizeCFG.cpp
   72 using BBValuePair = std::pair<BasicBlock *, Value *>;
   85 using BBPredicates = DenseMap<BasicBlock *, Value *>;
  217   Value *invert(Value *Condition);
  217   Value *invert(Value *Condition);
  219   Value *buildCondition(BranchInst *Term, unsigned Idx, bool Invert);
  403 Value *StructurizeCFG::invert(Value *Condition) {
  403 Value *StructurizeCFG::invert(Value *Condition) {
  409   Value *NotCondition;
  436 Value *StructurizeCFG::buildCondition(BranchInst *Term, unsigned Idx,
  438   Value *Cond = Invert ? BoolFalse : BoolTrue;
  538   Value *Default = Loops ? BoolTrue : BoolFalse;
  557     Value *ParentValue = nullptr;
  558     for (std::pair<BasicBlock *, Value *> BBAndPred : Preds) {
  560       Value *Pred = BBAndPred.second;
  587       Value *Deleted = Phi.removeIncomingValue(From, false);
  596     Value *Undef = UndefValue::get(Phi.getType());
  616       Value *Undef = UndefValue::get(Phi->getType());
  648       if (Value *V = SimplifyInstruction(Phi, Q)) {
  787   for (std::pair<BasicBlock*, Value*> Pred : Preds) {
  789     Value *V = Pred.second;
  928           Value *Undef = UndefValue::get(I.getType());
lib/Transforms/Scalar/TailRecursionElimination.cpp
  107   void walk(Value *Root) {
  362 static bool isDynamicConstant(Value *V, CallInst *CI, ReturnInst *RI) {
  396 static Value *getCommonReturnValue(ReturnInst *IgnoreRI, CallInst *CI) {
  398   Value *ReturnedValue = nullptr;
  408     Value *RetOp = RI->getOperand(0);
  422 static Value *canTransformAccumulatorRecursion(Instruction *I, CallInst *CI) {
  513   Value *AccumulatorRecursionEliminationInitVal = nullptr;
  802     if (Value *PNV = SimplifyInstruction(PN, F.getParent()->getDataLayout())) {
lib/Transforms/Utils/BasicBlockUtils.cpp
  209     for (Value *IncValue : PN.incoming_values())
  217   SmallVector<AssertingVH<Value>, 4> IncomingValues;
  322                                 BasicBlock::iterator &BI, Value *V) {
  538     Value *InVal = nullptr;
  585         Value *V = PN->removeIncomingValue(i, false);
  779     Value *V = *i;
  810 Instruction *llvm::SplitBlockAndInsertIfThen(Value *Cond,
  862 void llvm::SplitBlockAndInsertIfThenElse(Value *Cond, Instruction *SplitBefore,
  882 Value *llvm::GetIfCondition(BasicBlock *BB, BasicBlock *&IfTrue,
lib/Transforms/Utils/BreakCriticalEdges.cpp
  116     Value *V = PN.getIncomingValue(Idx);
lib/Transforms/Utils/BuildLibCalls.cpp
  822 Value *llvm::castToCStr(Value *V, IRBuilder<> &B) {
  822 Value *llvm::castToCStr(Value *V, IRBuilder<> &B) {
  827 static Value *emitLibCall(LibFunc TheLibFunc, Type *ReturnType,
  829                           ArrayRef<Value *> Operands, IRBuilder<> &B,
  847 Value *llvm::emitStrLen(Value *Ptr, IRBuilder<> &B, const DataLayout &DL,
  847 Value *llvm::emitStrLen(Value *Ptr, IRBuilder<> &B, const DataLayout &DL,
  854 Value *llvm::emitStrDup(Value *Ptr, IRBuilder<> &B,
  854 Value *llvm::emitStrDup(Value *Ptr, IRBuilder<> &B,
  860 Value *llvm::emitStrChr(Value *Ptr, char C, IRBuilder<> &B,
  860 Value *llvm::emitStrChr(Value *Ptr, char C, IRBuilder<> &B,
  868 Value *llvm::emitStrNCmp(Value *Ptr1, Value *Ptr2, Value *Len, IRBuilder<> &B,
  868 Value *llvm::emitStrNCmp(Value *Ptr1, Value *Ptr2, Value *Len, IRBuilder<> &B,
  868 Value *llvm::emitStrNCmp(Value *Ptr1, Value *Ptr2, Value *Len, IRBuilder<> &B,
  868 Value *llvm::emitStrNCmp(Value *Ptr1, Value *Ptr2, Value *Len, IRBuilder<> &B,
  877 Value *llvm::emitStrCpy(Value *Dst, Value *Src, IRBuilder<> &B,
  877 Value *llvm::emitStrCpy(Value *Dst, Value *Src, IRBuilder<> &B,
  877 Value *llvm::emitStrCpy(Value *Dst, Value *Src, IRBuilder<> &B,
  884 Value *llvm::emitStpCpy(Value *Dst, Value *Src, IRBuilder<> &B,
  884 Value *llvm::emitStpCpy(Value *Dst, Value *Src, IRBuilder<> &B,
  884 Value *llvm::emitStpCpy(Value *Dst, Value *Src, IRBuilder<> &B,
  891 Value *llvm::emitStrNCpy(Value *Dst, Value *Src, Value *Len, IRBuilder<> &B,
  891 Value *llvm::emitStrNCpy(Value *Dst, Value *Src, Value *Len, IRBuilder<> &B,
  891 Value *llvm::emitStrNCpy(Value *Dst, Value *Src, Value *Len, IRBuilder<> &B,
  891 Value *llvm::emitStrNCpy(Value *Dst, Value *Src, Value *Len, IRBuilder<> &B,
  898 Value *llvm::emitStpNCpy(Value *Dst, Value *Src, Value *Len, IRBuilder<> &B,
  898 Value *llvm::emitStpNCpy(Value *Dst, Value *Src, Value *Len, IRBuilder<> &B,
  898 Value *llvm::emitStpNCpy(Value *Dst, Value *Src, Value *Len, IRBuilder<> &B,
  898 Value *llvm::emitStpNCpy(Value *Dst, Value *Src, Value *Len, IRBuilder<> &B,
  905 Value *llvm::emitMemCpyChk(Value *Dst, Value *Src, Value *Len, Value *ObjSize,
  905 Value *llvm::emitMemCpyChk(Value *Dst, Value *Src, Value *Len, Value *ObjSize,
  905 Value *llvm::emitMemCpyChk(Value *Dst, Value *Src, Value *Len, Value *ObjSize,
  905 Value *llvm::emitMemCpyChk(Value *Dst, Value *Src, Value *Len, Value *ObjSize,
  905 Value *llvm::emitMemCpyChk(Value *Dst, Value *Src, Value *Len, Value *ObjSize,
  929 Value *llvm::emitMemChr(Value *Ptr, Value *Val, Value *Len, IRBuilder<> &B,
  929 Value *llvm::emitMemChr(Value *Ptr, Value *Val, Value *Len, IRBuilder<> &B,
  929 Value *llvm::emitMemChr(Value *Ptr, Value *Val, Value *Len, IRBuilder<> &B,
  929 Value *llvm::emitMemChr(Value *Ptr, Value *Val, Value *Len, IRBuilder<> &B,
  938 Value *llvm::emitMemCmp(Value *Ptr1, Value *Ptr2, Value *Len, IRBuilder<> &B,
  938 Value *llvm::emitMemCmp(Value *Ptr1, Value *Ptr2, Value *Len, IRBuilder<> &B,
  938 Value *llvm::emitMemCmp(Value *Ptr1, Value *Ptr2, Value *Len, IRBuilder<> &B,
  938 Value *llvm::emitMemCmp(Value *Ptr1, Value *Ptr2, Value *Len, IRBuilder<> &B,
  947 Value *llvm::emitBCmp(Value *Ptr1, Value *Ptr2, Value *Len, IRBuilder<> &B,
  947 Value *llvm::emitBCmp(Value *Ptr1, Value *Ptr2, Value *Len, IRBuilder<> &B,
  947 Value *llvm::emitBCmp(Value *Ptr1, Value *Ptr2, Value *Len, IRBuilder<> &B,
  947 Value *llvm::emitBCmp(Value *Ptr1, Value *Ptr2, Value *Len, IRBuilder<> &B,
  956 Value *llvm::emitMemCCpy(Value *Ptr1, Value *Ptr2, Value *Val, Value *Len,
  956 Value *llvm::emitMemCCpy(Value *Ptr1, Value *Ptr2, Value *Val, Value *Len,
  956 Value *llvm::emitMemCCpy(Value *Ptr1, Value *Ptr2, Value *Val, Value *Len,
  956 Value *llvm::emitMemCCpy(Value *Ptr1, Value *Ptr2, Value *Val, Value *Len,
  956 Value *llvm::emitMemCCpy(Value *Ptr1, Value *Ptr2, Value *Val, Value *Len,
  964 Value *llvm::emitSNPrintf(Value *Dest, Value *Size, Value *Fmt,
  964 Value *llvm::emitSNPrintf(Value *Dest, Value *Size, Value *Fmt,
  964 Value *llvm::emitSNPrintf(Value *Dest, Value *Size, Value *Fmt,
  964 Value *llvm::emitSNPrintf(Value *Dest, Value *Size, Value *Fmt,
  965                           ArrayRef<Value *> VariadicArgs, IRBuilder<> &B,
  967   SmallVector<Value *, 8> Args{castToCStr(Dest, B), Size, castToCStr(Fmt, B)};
  974 Value *llvm::emitSPrintf(Value *Dest, Value *Fmt,
  974 Value *llvm::emitSPrintf(Value *Dest, Value *Fmt,
  974 Value *llvm::emitSPrintf(Value *Dest, Value *Fmt,
  975                          ArrayRef<Value *> VariadicArgs, IRBuilder<> &B,
  977   SmallVector<Value *, 8> Args{castToCStr(Dest, B), castToCStr(Fmt, B)};
  984 Value *llvm::emitStrCat(Value *Dest, Value *Src, IRBuilder<> &B,
  984 Value *llvm::emitStrCat(Value *Dest, Value *Src, IRBuilder<> &B,
  984 Value *llvm::emitStrCat(Value *Dest, Value *Src, IRBuilder<> &B,
  991 Value *llvm::emitStrLCpy(Value *Dest, Value *Src, Value *Size, IRBuilder<> &B,
  991 Value *llvm::emitStrLCpy(Value *Dest, Value *Src, Value *Size, IRBuilder<> &B,
  991 Value *llvm::emitStrLCpy(Value *Dest, Value *Src, Value *Size, IRBuilder<> &B,
  991 Value *llvm::emitStrLCpy(Value *Dest, Value *Src, Value *Size, IRBuilder<> &B,
  998 Value *llvm::emitStrLCat(Value *Dest, Value *Src, Value *Size, IRBuilder<> &B,
  998 Value *llvm::emitStrLCat(Value *Dest, Value *Src, Value *Size, IRBuilder<> &B,
  998 Value *llvm::emitStrLCat(Value *Dest, Value *Src, Value *Size, IRBuilder<> &B,
  998 Value *llvm::emitStrLCat(Value *Dest, Value *Src, Value *Size, IRBuilder<> &B,
 1005 Value *llvm::emitStrNCat(Value *Dest, Value *Src, Value *Size, IRBuilder<> &B,
 1005 Value *llvm::emitStrNCat(Value *Dest, Value *Src, Value *Size, IRBuilder<> &B,
 1005 Value *llvm::emitStrNCat(Value *Dest, Value *Src, Value *Size, IRBuilder<> &B,
 1005 Value *llvm::emitStrNCat(Value *Dest, Value *Src, Value *Size, IRBuilder<> &B,
 1012 Value *llvm::emitVSNPrintf(Value *Dest, Value *Size, Value *Fmt, Value *VAList,
 1012 Value *llvm::emitVSNPrintf(Value *Dest, Value *Size, Value *Fmt, Value *VAList,
 1012 Value *llvm::emitVSNPrintf(Value *Dest, Value *Size, Value *Fmt, Value *VAList,
 1012 Value *llvm::emitVSNPrintf(Value *Dest, Value *Size, Value *Fmt, Value *VAList,
 1012 Value *llvm::emitVSNPrintf(Value *Dest, Value *Size, Value *Fmt, Value *VAList,
 1020 Value *llvm::emitVSPrintf(Value *Dest, Value *Fmt, Value *VAList,
 1020 Value *llvm::emitVSPrintf(Value *Dest, Value *Fmt, Value *VAList,
 1020 Value *llvm::emitVSPrintf(Value *Dest, Value *Fmt, Value *VAList,
 1020 Value *llvm::emitVSPrintf(Value *Dest, Value *Fmt, Value *VAList,
 1028 static void appendTypeSuffix(Value *Op, StringRef &Name,
 1042 static Value *emitUnaryFloatFnCallHelper(Value *Op, StringRef Name,
 1042 static Value *emitUnaryFloatFnCallHelper(Value *Op, StringRef Name,
 1065 Value *llvm::emitUnaryFloatFnCall(Value *Op, StringRef Name, IRBuilder<> &B,
 1065 Value *llvm::emitUnaryFloatFnCall(Value *Op, StringRef Name, IRBuilder<> &B,
 1073 Value *llvm::emitUnaryFloatFnCall(Value *Op, const TargetLibraryInfo *TLI,
 1073 Value *llvm::emitUnaryFloatFnCall(Value *Op, const TargetLibraryInfo *TLI,
 1084 static Value *emitBinaryFloatFnCallHelper(Value *Op1, Value *Op2,
 1084 static Value *emitBinaryFloatFnCallHelper(Value *Op1, Value *Op2,
 1084 static Value *emitBinaryFloatFnCallHelper(Value *Op1, Value *Op2,
 1107 Value *llvm::emitBinaryFloatFnCall(Value *Op1, Value *Op2, StringRef Name,
 1107 Value *llvm::emitBinaryFloatFnCall(Value *Op1, Value *Op2, StringRef Name,
 1107 Value *llvm::emitBinaryFloatFnCall(Value *Op1, Value *Op2, StringRef Name,
 1117 Value *llvm::emitBinaryFloatFnCall(Value *Op1, Value *Op2,
 1117 Value *llvm::emitBinaryFloatFnCall(Value *Op1, Value *Op2,
 1117 Value *llvm::emitBinaryFloatFnCall(Value *Op1, Value *Op2,
 1129 Value *llvm::emitPutChar(Value *Char, IRBuilder<> &B,
 1129 Value *llvm::emitPutChar(Value *Char, IRBuilder<> &B,
 1152 Value *llvm::emitPutS(Value *Str, IRBuilder<> &B,
 1152 Value *llvm::emitPutS(Value *Str, IRBuilder<> &B,
 1169 Value *llvm::emitFPutC(Value *Char, Value *File, IRBuilder<> &B,
 1169 Value *llvm::emitFPutC(Value *Char, Value *File, IRBuilder<> &B,
 1169 Value *llvm::emitFPutC(Value *Char, Value *File, IRBuilder<> &B,
 1190 Value *llvm::emitFPutCUnlocked(Value *Char, Value *File, IRBuilder<> &B,
 1190 Value *llvm::emitFPutCUnlocked(Value *Char, Value *File, IRBuilder<> &B,
 1190 Value *llvm::emitFPutCUnlocked(Value *Char, Value *File, IRBuilder<> &B,
 1210 Value *llvm::emitFPutS(Value *Str, Value *File, IRBuilder<> &B,
 1210 Value *llvm::emitFPutS(Value *Str, Value *File, IRBuilder<> &B,
 1210 Value *llvm::emitFPutS(Value *Str, Value *File, IRBuilder<> &B,
 1229 Value *llvm::emitFPutSUnlocked(Value *Str, Value *File, IRBuilder<> &B,
 1229 Value *llvm::emitFPutSUnlocked(Value *Str, Value *File, IRBuilder<> &B,
 1229 Value *llvm::emitFPutSUnlocked(Value *Str, Value *File, IRBuilder<> &B,
 1248 Value *llvm::emitFWrite(Value *Ptr, Value *Size, Value *File, IRBuilder<> &B,
 1248 Value *llvm::emitFWrite(Value *Ptr, Value *Size, Value *File, IRBuilder<> &B,
 1248 Value *llvm::emitFWrite(Value *Ptr, Value *Size, Value *File, IRBuilder<> &B,
 1248 Value *llvm::emitFWrite(Value *Ptr, Value *Size, Value *File, IRBuilder<> &B,
 1272 Value *llvm::emitMalloc(Value *Num, IRBuilder<> &B, const DataLayout &DL,
 1272 Value *llvm::emitMalloc(Value *Num, IRBuilder<> &B, const DataLayout &DL,
 1292 Value *llvm::emitCalloc(Value *Num, Value *Size, const AttributeList &Attrs,
 1292 Value *llvm::emitCalloc(Value *Num, Value *Size, const AttributeList &Attrs,
 1292 Value *llvm::emitCalloc(Value *Num, Value *Size, const AttributeList &Attrs,
 1313 Value *llvm::emitFWriteUnlocked(Value *Ptr, Value *Size, Value *N, Value *File,
 1313 Value *llvm::emitFWriteUnlocked(Value *Ptr, Value *Size, Value *N, Value *File,
 1313 Value *llvm::emitFWriteUnlocked(Value *Ptr, Value *Size, Value *N, Value *File,
 1313 Value *llvm::emitFWriteUnlocked(Value *Ptr, Value *Size, Value *N, Value *File,
 1313 Value *llvm::emitFWriteUnlocked(Value *Ptr, Value *Size, Value *N, Value *File,
 1336 Value *llvm::emitFGetCUnlocked(Value *File, IRBuilder<> &B,
 1336 Value *llvm::emitFGetCUnlocked(Value *File, IRBuilder<> &B,
 1355 Value *llvm::emitFGetSUnlocked(Value *Str, Value *Size, Value *File,
 1355 Value *llvm::emitFGetSUnlocked(Value *Str, Value *Size, Value *File,
 1355 Value *llvm::emitFGetSUnlocked(Value *Str, Value *Size, Value *File,
 1355 Value *llvm::emitFGetSUnlocked(Value *Str, Value *Size, Value *File,
 1375 Value *llvm::emitFReadUnlocked(Value *Ptr, Value *Size, Value *N, Value *File,
 1375 Value *llvm::emitFReadUnlocked(Value *Ptr, Value *Size, Value *N, Value *File,
 1375 Value *llvm::emitFReadUnlocked(Value *Ptr, Value *Size, Value *N, Value *File,
 1375 Value *llvm::emitFReadUnlocked(Value *Ptr, Value *Size, Value *N, Value *File,
 1375 Value *llvm::emitFReadUnlocked(Value *Ptr, Value *Size, Value *N, Value *File,
lib/Transforms/Utils/BypassSlowDivision.cpp
   47     Value *Quotient;
   48     Value *Remainder;
   50     QuotRemPair(Value *InQuotient, Value *InRemainder)
   50     QuotRemPair(Value *InQuotient, Value *InRemainder)
   59     Value *Quotient = nullptr;
   60     Value *Remainder = nullptr;
   83   bool isHashLikeValue(Value *V, VisitedSetTy &Visited);
   84   ValueRange getValueRange(Value *Op, VisitedSetTy &Visited);
   89   Value *insertOperandRuntimeCheck(Value *Op1, Value *Op2);
   89   Value *insertOperandRuntimeCheck(Value *Op1, Value *Op2);
   89   Value *insertOperandRuntimeCheck(Value *Op1, Value *Op2);
  107   Value *getReplacement(DivCacheTy &Cache);
  151 Value *FastDivInsertionTask::getReplacement(DivCacheTy &Cache) {
  157   Value *Dividend = SlowDivOrRem->getOperand(0);
  158   Value *Divisor = SlowDivOrRem->getOperand(1);
  190 bool FastDivInsertionTask::isHashLikeValue(Value *V, VisitedSetTy &Visited) {
  203     Value *Op1 = I->getOperand(1);
  231 ValueRange FastDivInsertionTask::getValueRange(Value *V,
  268   Value *Dividend = SlowDivOrRem->getOperand(0);
  269   Value *Divisor = SlowDivOrRem->getOperand(1);
  291   Value *Dividend = SlowDivOrRem->getOperand(0);
  292   Value *Divisor = SlowDivOrRem->getOperand(1);
  293   Value *ShortDivisorV =
  295   Value *ShortDividendV =
  299   Value *ShortQV = Builder.CreateUDiv(ShortDividendV, ShortDivisorV);
  300   Value *ShortRV = Builder.CreateURem(ShortDividendV, ShortDivisorV);
  328 Value *FastDivInsertionTask::insertOperandRuntimeCheck(Value *Op1, Value *Op2) {
  328 Value *FastDivInsertionTask::insertOperandRuntimeCheck(Value *Op1, Value *Op2) {
  328 Value *FastDivInsertionTask::insertOperandRuntimeCheck(Value *Op1, Value *Op2) {
  332   Value *OrV;
  341   Value *AndV = Builder.CreateAnd(OrV, BitMask);
  344   Value *ZeroV = ConstantInt::getSigned(getSlowType(), 0);
  351   Value *Dividend = SlowDivOrRem->getOperand(0);
  352   Value *Divisor = SlowDivOrRem->getOperand(1);
  374     Value *TruncDividend = Builder.CreateTrunc(Dividend, BypassType);
  375     Value *TruncDivisor = Builder.CreateTrunc(Divisor, BypassType);
  376     Value *TruncDiv = Builder.CreateUDiv(TruncDividend, TruncDivisor);
  377     Value *TruncRem = Builder.CreateURem(TruncDividend, TruncDivisor);
  378     Value *ExtDiv = Builder.CreateZExt(TruncDiv, getSlowType());
  379     Value *ExtRem = Builder.CreateZExt(TruncRem, getSlowType());
  422     Value *CmpV = Builder.CreateICmpUGE(Dividend, Divisor);
  436     Value *CmpV = insertOperandRuntimeCheck(DividendShort ? nullptr : Dividend,
  463     if (Value *Replacement = Task.getReplacement(PerBBDivCache)) {
  474     for (Value *V : {KV.second.Quotient, KV.second.Remainder})
lib/Transforms/Utils/CallPromotionUtils.cpp
   85     auto *V = Phi.getIncomingValue(Idx);
  256 static Instruction *versionCallSite(CallSite CS, Value *Callee,
  267   auto *Cond = Builder.CreateICmpEQ(CS.getCalledValue(), Callee);
  404     auto *Arg = CS.getArgument(ArgNo);
lib/Transforms/Utils/CloneFunction.cpp
  347       if (Value *V =
  352           if (Value *MappedV = VMap.lookup(V))
  391         Value *V = VMap.lookup(BI->getCondition());
  407       Value *V = VMap.lookup(SI->getCondition());
  494     Value *V = VMap.lookup(&BI);
  534         Value *V = VMap.lookup(PN->getIncomingBlock(pred));
  536           Value *InVal = MapValue(PN->getIncomingValue(pred),
  590         Value *NV = UndefValue::get(PN->getType());
  608   SmallSetVector<const Value *, 8> Worklist;
  615     const Value *OrigV = Worklist[Idx];
  627     Value *SimpleV = SimplifyInstruction(I, DL);
lib/Transforms/Utils/CodeExtractor.cpp
  267 static bool definedInRegion(const SetVector<BasicBlock *> &Blocks, Value *V) {
  277 static bool definedInCaller(const SetVector<BasicBlock *> &Blocks, Value *V) {
  321     Value *MemAddr = nullptr;
  335       Value *Base = MemAddr->stripInBoundsConstantOffsets();
  605         Value *V = OI;
  787   for (Value *value : inputs) {
  793   for (Value *output : outputs) {
  931     Value *RewriteVal;
  933       Value *Idx[2];
  982                                          const SetVector<Value *> &SunkAllocas,
  983                                          SetVector<Value *> &LifetimesStart) {
  994       Value *Mem = II->getOperand(1)->stripInBoundsOffsets();
 1008     Module *M, ArrayRef<Value *> LifetimesStart, ArrayRef<Value *> LifetimesEnd,
 1008     Module *M, ArrayRef<Value *> LifetimesStart, ArrayRef<Value *> LifetimesEnd,
 1017   DenseMap<Value *, Value *> Bitcasts;
 1017   DenseMap<Value *, Value *> Bitcasts;
 1023     for (Value *Mem : Objects) {
 1027       Value *&MemAsI8Ptr = Bitcasts[Mem];
 1066   std::vector<Value *> params, StructValues, ReloadOutputs, Reloads;
 1076   for (Value *input : inputs) {
 1088   for (Value *output : outputs) {
 1117       Value *Idx[2];
 1154     Value *Output = nullptr;
 1156       Value *Idx[2];
 1206           Value *brVal = nullptr;
 1259       Value *Idx[2];
 1482   for (auto *II : SinkingCands) {
 1491   for (auto *II : SinkingCands) {
 1500     for (auto *II : HoistingCands)
 1554       Value *IncomingCodeReplacerVal = nullptr;
lib/Transforms/Utils/DemoteRegToStack.cpp
   69       DenseMap<BasicBlock*, Value*> Loads;
   72           Value *&V = Loads[PN->getIncomingBlock(i)];
   84       Value *V = new LoadInst(I.getType(), Slot, I.getName() + ".reload",
  146   Value *V =
lib/Transforms/Utils/EntryExitInstrumenter.cpp
   51     Value *Args[] = {ConstantExpr::getBitCast(&CurFn, Type::getInt8PtrTy(C)),
lib/Transforms/Utils/EscapeEnumerator.cpp
   86   SmallVector<Value *, 16> Args;
lib/Transforms/Utils/Evaluator.cpp
   75     for (Value *Op : C->operands())
  271   auto *V = CS.getCalledValue();
  311 Constant *Evaluator::castCallResultIfNeeded(Value *CallExpr, Constant *RV) {
  527           Value *PtrArg = getVal(II->getArgOperand(1));
  528           Value *Ptr = PtrArg->stripPointerCasts();
  626         Value *Val = getVal(IBI->getAddress())->stripPointerCasts();
lib/Transforms/Utils/FlattenCFG.cpp
  177     Value *PC = PBI->getCondition();
  284   Value *PC = PBI->getCondition();
  293     Value *CC = PBI->getCondition();
  296     Value *NC;
  400   Value *IfCond2 = GetIfCondition(BB, IfTrue2, IfFalse2);
  410   Value *IfCond1 = GetIfCondition(SecondEntryBlock, IfTrue1, IfFalse1);
  448   Value *CC = PBI->getCondition();
  452   Value *NC = Builder.CreateOr(CInst1, CC);
lib/Transforms/Utils/FunctionComparator.cpp
  287   case Value::UndefValueVal:
  288   case Value::ConstantTokenNoneVal:
  290   case Value::ConstantIntVal: {
  295   case Value::ConstantFPVal: {
  300   case Value::ConstantArrayVal: {
  314   case Value::ConstantStructVal: {
  328   case Value::ConstantVectorVal: {
  342   case Value::ConstantExprVal: {
  356   case Value::BlockAddressVal: {
  719 int FunctionComparator::cmpValues(const Value *L, const Value *R) const {
  719 int FunctionComparator::cmpValues(const Value *L, const Value *R) const {
  775         Value *OpL = InstL->getOperand(i);
  776         Value *OpR = InstR->getOperand(i);
lib/Transforms/Utils/GlobalStatus.cpp
   61 static bool analyzeGlobalAux(const Value *V, GlobalStatus &GS,
   62                              SmallPtrSetImpl<const Value *> &VisitedUsers) {
  111             Value *StoredVal = SI->getOperand(0);
  191 bool GlobalStatus::analyzeGlobal(const Value *V, GlobalStatus &GS) {
  192   SmallPtrSet<const Value *, 16> VisitedUsers;
lib/Transforms/Utils/GuardUtils.cpp
   29   SmallVector<Value *, 4> Args(std::next(Guard->arg_begin()), Guard->arg_end());
lib/Transforms/Utils/InlineFunction.cpp
  109     SmallVector<Value*, 8> UnwindDestPHIValues;
  218 static Value *getParentPad(Value *EHPad) {
  218 static Value *getParentPad(Value *EHPad) {
  224 using UnwindDestMemoTy = DenseMap<Instruction *, Value *>;
  228 static Value *getUnwindDestTokenHelper(Instruction *EHPad,
  239     Value *UnwindDestToken = nullptr;
  272             Value *ChildUnwindDestToken = Memo->second;
  297         Value *ChildUnwindDestToken;
  336     Value *UnwindParent;
  379 static Value *getUnwindDestToken(Instruction *EHPad,
  393   Value *UnwindDestToken = getUnwindDestTokenHelper(EHPad, MemoMap);
  409   Value *AncestorToken;
  556       Value *UnwindDestToken =
  651   SmallVector<Value *, 8> UnwindDestPHIValues;
  665     for (Value *V : UnwindDestPHIValues) {
  701         Value *UnwindDestToken;
  983       SmallVector<const Value *, 2> PtrArgs;
 1010         for (Value *Arg : Call->args()) {
 1033       SmallPtrSet<const Value *, 4> ObjSet;
 1037       for (const Value *V : PtrArgs) {
 1038         SmallVector<const Value *, 4> Objects;
 1041         for (const Value *O : Objects)
 1048       for (const Value *V : ObjSet) {
 1164       Value *ArgVal = CS.getArgument(Arg.getArgNo());
 1202     const Value *OrigCall = I->first;
 1246 static void HandleByValArgumentInit(Value *Dst, Value *Src, Module *M,
 1246 static void HandleByValArgumentInit(Value *Dst, Value *Src, Module *M,
 1252   Value *Size = Builder.getInt64(M->getDataLayout().getTypeStoreSize(AggTy));
 1262 static Value *HandleByValArgument(Value *Arg, Instruction *TheCall,
 1262 static Value *HandleByValArgument(Value *Arg, Instruction *TheCall,
 1303   Value *NewAlloca =
 1314 static bool isUsedByLifetimeMarker(Value *V) {
 1496     const ValueMap<const Value *, WeakTrackingVH> *VMap) {
 1657     Value *CallSiteUnwindDestToken =
 1678     SmallVector<std::pair<Value*, Value*>, 4> ByValInit;
 1678     SmallVector<std::pair<Value*, Value*>, 4> ByValInit;
 1688       Value *ActualArg = *AI;
 1728     for (std::pair<Value*, Value*> &Init : ByValInit)
 1728     for (std::pair<Value*, Value*> &Init : ByValInit)
 1758           std::vector<Value *> MergedDeoptArgs;
 1863   SmallVector<Value*,4> VarArgsToForward;
 1909           SmallVector<Value *, 6> Params(CI->arg_operands());
 2146         SmallVector<Value *, 4> CallArgs(DeoptCall->arg_begin(),
 2411     if (Value *V = SimplifyInstruction(PHI, {DL, nullptr, nullptr, AC})) {
lib/Transforms/Utils/IntegerDivision.cpp
   33 static Value *generateSignedRemainderCode(Value *Dividend, Value *Divisor,
   33 static Value *generateSignedRemainderCode(Value *Dividend, Value *Divisor,
   33 static Value *generateSignedRemainderCode(Value *Dividend, Value *Divisor,
   57   Value *DividendSign = Builder.CreateAShr(Dividend, Shift);
   58   Value *DivisorSign  = Builder.CreateAShr(Divisor, Shift);
   59   Value *DvdXor       = Builder.CreateXor(Dividend, DividendSign);
   60   Value *DvsXor       = Builder.CreateXor(Divisor, DivisorSign);
   61   Value *UDividend    = Builder.CreateSub(DvdXor, DividendSign);
   62   Value *UDivisor     = Builder.CreateSub(DvsXor, DivisorSign);
   63   Value *URem         = Builder.CreateURem(UDividend, UDivisor);
   64   Value *Xored        = Builder.CreateXor(URem, DividendSign);
   65   Value *SRem         = Builder.CreateSub(Xored, DividendSign);
   79 static Value *generatedUnsignedRemainderCode(Value *Dividend, Value *Divisor,
   79 static Value *generatedUnsignedRemainderCode(Value *Dividend, Value *Divisor,
   79 static Value *generatedUnsignedRemainderCode(Value *Dividend, Value *Divisor,
   88   Value *Quotient  = Builder.CreateUDiv(Dividend, Divisor);
   89   Value *Product   = Builder.CreateMul(Divisor, Quotient);
   90   Value *Remainder = Builder.CreateSub(Dividend, Product);
  103 static Value *generateSignedDivisionCode(Value *Dividend, Value *Divisor,
  103 static Value *generateSignedDivisionCode(Value *Dividend, Value *Divisor,
  103 static Value *generateSignedDivisionCode(Value *Dividend, Value *Divisor,
  130   Value *Tmp    = Builder.CreateAShr(Dividend, Shift);
  131   Value *Tmp1   = Builder.CreateAShr(Divisor, Shift);
  132   Value *Tmp2   = Builder.CreateXor(Tmp, Dividend);
  133   Value *U_Dvnd = Builder.CreateSub(Tmp2, Tmp);
  134   Value *Tmp3   = Builder.CreateXor(Tmp1, Divisor);
  135   Value *U_Dvsr = Builder.CreateSub(Tmp3, Tmp1);
  136   Value *Q_Sgn  = Builder.CreateXor(Tmp1, Tmp);
  137   Value *Q_Mag  = Builder.CreateUDiv(U_Dvnd, U_Dvsr);
  138   Value *Tmp4   = Builder.CreateXor(Q_Mag, Q_Sgn);
  139   Value *Q      = Builder.CreateSub(Tmp4, Q_Sgn);
  150 static Value *generateUnsignedDivisionCode(Value *Dividend, Value *Divisor,
  150 static Value *generateUnsignedDivisionCode(Value *Dividend, Value *Divisor,
  150 static Value *generateUnsignedDivisionCode(Value *Dividend, Value *Divisor,
  251   Value *Ret0_1      = Builder.CreateICmpEQ(Divisor, Zero);
  252   Value *Ret0_2      = Builder.CreateICmpEQ(Dividend, Zero);
  253   Value *Ret0_3      = Builder.CreateOr(Ret0_1, Ret0_2);
  254   Value *Tmp0 = Builder.CreateCall(CTLZ, {Divisor, True});
  255   Value *Tmp1 = Builder.CreateCall(CTLZ, {Dividend, True});
  256   Value *SR          = Builder.CreateSub(Tmp0, Tmp1);
  257   Value *Ret0_4      = Builder.CreateICmpUGT(SR, MSB);
  258   Value *Ret0        = Builder.CreateOr(Ret0_3, Ret0_4);
  259   Value *RetDividend = Builder.CreateICmpEQ(SR, MSB);
  260   Value *RetVal      = Builder.CreateSelect(Ret0, Zero, Dividend);
  261   Value *EarlyRet    = Builder.CreateOr(Ret0, RetDividend);
  271   Value *SR_1     = Builder.CreateAdd(SR, One);
  272   Value *Tmp2     = Builder.CreateSub(MSB, SR);
  273   Value *Q        = Builder.CreateShl(Dividend, Tmp2);
  274   Value *SkipLoop = Builder.CreateICmpEQ(SR_1, Zero);
  282   Value *Tmp3 = Builder.CreateLShr(Dividend, SR_1);
  283   Value *Tmp4 = Builder.CreateAdd(Divisor, NegOne);
  309   Value *Tmp5  = Builder.CreateShl(R_1, One);
  310   Value *Tmp6  = Builder.CreateLShr(Q_2, MSB);
  311   Value *Tmp7  = Builder.CreateOr(Tmp5, Tmp6);
  312   Value *Tmp8  = Builder.CreateShl(Q_2, One);
  313   Value *Q_1   = Builder.CreateOr(Carry_1, Tmp8);
  314   Value *Tmp9  = Builder.CreateSub(Tmp4, Tmp7);
  315   Value *Tmp10 = Builder.CreateAShr(Tmp9, MSB);
  316   Value *Carry = Builder.CreateAnd(Tmp10, One);
  317   Value *Tmp11 = Builder.CreateAnd(Tmp10, Divisor);
  318   Value *R     = Builder.CreateSub(Tmp7, Tmp11);
  319   Value *SR_2  = Builder.CreateAdd(SR_3, NegOne);
  320   Value *Tmp12 = Builder.CreateICmpEQ(SR_2, Zero);
  332   Value *Tmp13 = Builder.CreateShl(Q_3, One);
  333   Value *Q_4   = Builder.CreateOr(Carry_2, Tmp13);
  389     Value *Remainder = generateSignedRemainderCode(Rem->getOperand(0),
  408   Value *Remainder = generatedUnsignedRemainderCode(Rem->getOperand(0),
  448     Value *Quotient = generateSignedDivisionCode(Div->getOperand(0),
  468   Value *Quotient = generateUnsignedDivisionCode(Div->getOperand(0),
  505   Value *ExtDividend;
  506   Value *ExtDivisor;
  507   Value *ExtRem;
  508   Value *Trunc;
  553   Value *ExtDividend;
  554   Value *ExtDivisor;
  555   Value *ExtRem;
  556   Value *Trunc;
  602   Value *ExtDividend;
  603   Value *ExtDivisor;
  604   Value *ExtDiv;
  605   Value *Trunc;
  651   Value *ExtDividend;
  652   Value *ExtDivisor;
  653   Value *ExtDiv;
  654   Value *Trunc;
lib/Transforms/Utils/LCSSA.cpp
  229       Value *V = AddedPHIs.size() == 1 ? AddedPHIs[0]
lib/Transforms/Utils/LibCallsShrinkWrap.cpp
   94   void shrinkWrapCI(CallInst *CI, Value *Cond);
   98   Value *generateOneRangeCond(CallInst *CI, const LibFunc &Func);
   99   Value *generateTwoRangeCond(CallInst *CI, const LibFunc &Func);
  100   Value *generateCondForPow(CallInst *CI, const LibFunc &Func);
  103   Value *createOrCond(CallInst *CI, CmpInst::Predicate Cmp, float Val,
  106     Value *Arg = CI->getArgOperand(0);
  113   Value *createCond(IRBuilder<> &BBBuilder, Value *Arg, CmpInst::Predicate Cmp,
  113   Value *createCond(IRBuilder<> &BBBuilder, Value *Arg, CmpInst::Predicate Cmp,
  122   Value *createCond(CallInst *CI, CmpInst::Predicate Cmp, float Val) {
  124     Value *Arg = CI->getArgOperand(0);
  137   Value *Cond = nullptr;
  189   Value *Cond = nullptr;
  227   Value *Cond = nullptr;
  318 Value *LibCallsShrinkWrap::generateOneRangeCond(CallInst *CI,
  340 Value *LibCallsShrinkWrap::generateTwoRangeCond(CallInst *CI,
  419 Value *LibCallsShrinkWrap::generateCondForPow(CallInst *CI,
  427   Value *Base = CI->getArgOperand(0);
  428   Value *Exp = CI->getArgOperand(1);
  475     Value *Cond = BBBuilder.CreateFCmp(CmpInst::FCMP_OGT, Exp, V);
  476     Value *Cond0 = BBBuilder.CreateFCmp(CmpInst::FCMP_OLE, Base, V0);
  484 void LibCallsShrinkWrap::shrinkWrapCI(CallInst *CI, Value *Cond) {
lib/Transforms/Utils/Local.cpp
  150       Value *Cond = BI->getCondition();
  255       Value *Cond = SI->getCondition();
  268       Value *Cond = Builder.CreateICmpEQ(SI->getCondition(),
  324       Value *Address = IBI->getAddress();
  441     Value *V, const TargetLibraryInfo *TLI, MemorySSAUpdater *MSSAU) {
  469       Value *OpV = OpU.get();
  493     Value *Undef = UndefValue::get(I->getType());
  505   Value::user_iterator UI = I->user_begin();
  506   Value::user_iterator UE = I->user_end();
  554       Value *OpV = I->getOperand(i);
  573   if (Value *SimpleV = SimplifyInstruction(I, DL)) {
  656     Value *OldPhiIt = PhiIt;
  675     Value *NewVal = PN->getIncomingValue(0);
  751 static bool CanMergeValues(Value *First, Value *Second) {
  751 static bool CanMergeValues(Value *First, Value *Second) {
  795       Value* Val = PN->getIncomingValueForBlock(BB);
  817 using IncomingValueMap = DenseMap<BasicBlock *, Value *>;
  831 static Value *selectIncomingValueForBlock(Value *OldVal, BasicBlock *BB,
  831 static Value *selectIncomingValueForBlock(Value *OldVal, BasicBlock *BB,
  860     Value *V = PN->getIncomingValue(i);
  875     Value *V = PN->getIncomingValue(i);
  897   Value *OldVal = PN->removeIncomingValue(BB, false);
  924       Value *PredVal = OldValPN->getIncomingValue(i);
  925       Value *Selected = selectIncomingValueForBlock(PredVal, PredBB,
  937       Value *Selected = selectIncomingValueForBlock(OldVal, PredBB,
 1135 static unsigned enforceKnownAlignment(Value *V, unsigned Alignment,
 1181 unsigned llvm::getOrEnforceKnownAlignment(Value *V, unsigned PrefAlign,
 1199   Align = std::min(Align, +Value::MaximumAlignment);
 1293   Value *DV = SI->getValueOperand();
 1492 TinyPtrVector<DbgVariableIntrinsic *> llvm::FindDbgAddrUses(Value *V) {
 1514 void llvm::findDbgValues(SmallVectorImpl<DbgValueInst *> &DbgValues, Value *V) {
 1527                         Value *V) {
 1539 bool llvm::replaceDbgDeclare(Value *Address, Value *NewAddress,
 1539 bool llvm::replaceDbgDeclare(Value *Address, Value *NewAddress,
 1559 bool llvm::replaceDbgDeclareForAlloca(AllocaInst *AI, Value *NewAllocaAddress,
 1566 static void replaceOneDbgValueForAlloca(DbgValueInst *DVI, Value *NewAddress,
 1589 void llvm::replaceDbgValueForAlloca(AllocaInst *AI, Value *NewAllocaAddress,
 1601 static MetadataAsValue *wrapValueInMetadata(LLVMContext &C, Value *V) {
 1733     Instruction &From, Value &To, Instruction &DomPoint, DominatorTree &DT,
 1821 bool llvm::replaceAllDbgUsesWith(Instruction &From, Value &To,
 1942   SmallVector<Value *, 8> Args(II->arg_begin(), II->arg_end());
 1987   SmallVector<Value *, 8> InvokeArgs(CI->arg_begin(), CI->arg_end());
 2028         Value *Callee = CI->getCalledValue();
 2087         Value *Ptr = SI->getOperand(1);
 2103       Value *Callee = II->getCalledValue();
 2427 void llvm::patchReplacementInstruction(Instruction *I, Value *Repl) {
 2460 static unsigned replaceDominatedUsesWith(Value *From, Value *To,
 2460 static unsigned replaceDominatedUsesWith(Value *From, Value *To,
 2466   for (Value::use_iterator UI = From->use_begin(), UE = From->use_end();
 2479 unsigned llvm::replaceNonLocalUsesWith(Instruction *From, Value *To) {
 2484   for (Value::use_iterator UI = From->use_begin(), UE = From->use_end();
 2496 unsigned llvm::replaceDominatedUsesWith(Value *From, Value *To,
 2496 unsigned llvm::replaceDominatedUsesWith(Value *From, Value *To,
 2505 unsigned llvm::replaceDominatedUsesWith(Value *From, Value *To,
 2505 unsigned llvm::replaceDominatedUsesWith(Value *From, Value *To,
 2557   const Value *Ptr = OldLI.getPointerOperand();
 2637   BitPart(Value *P, unsigned BW) : Provider(P) {
 2642   Value *Provider;
 2677 collectBitParts(Value *V, bool MatchBSwaps, bool MatchBitReversals,
 2678                 std::map<Value *, Optional<BitPart>> &BPS, int Depth) {
 2839   std::map<Value *, Optional<BitPart>> BPS;
 2865     Value *Provider = Res->Provider;
 2955 using AllocaForValueMapTy = DenseMap<Value *, AllocaInst *>;
 2956 AllocaInst *llvm::findAllocaForValue(Value *V,
 2972     for (Value *IncValue : PN->incoming_values()) {
lib/Transforms/Utils/LoopRotationUtils.cpp
   96     Value *OrigHeaderVal = &*I;
  103     Value *OrigPreHeaderVal = ValueMap.lookup(OrigHeaderVal);
  112     for (Value::use_iterator UI = OrigHeaderVal->use_begin(),
  159       Value *NewVal;
  236     SmallPtrSet<const Value *, 32> EphValues;
  311       std::pair<std::pair<Value *, DILocalVariable *>, DIExpression *>;
  357     Value *V = SimplifyInstruction(C, SQ);
  555       Value *IVOpnd =
lib/Transforms/Utils/LoopSimplify.cpp
  188     if (Value *V = SimplifyInstruction(PN, {DL, nullptr, DT, AC})) {
  400     Value *UniqueValue = nullptr;
  403       Value *IV = PN->getIncomingValue(i);
  595     if (Value *V = SimplifyInstruction(PN, {DL, nullptr, DT, AC})) {
lib/Transforms/Utils/LoopUnroll.cpp
   69     Value *Op = I->getOperand(op);
  223       if (Value *V = SimplifyInstruction(Inst, {DL, nullptr, DT, AC}))
  623           Value *InVal = NewPHI->getIncomingValueForBlock(LatchBlock);
  642           Value *Incoming = PHI.getIncomingValueForBlock(*BB);
  678               New, cast<BasicBlock>(LastValueMap[cast<Value>(OriginalBBIDom)]));
  700       Value *InVal = PN->removeIncomingValue(LatchBlock, false);
lib/Transforms/Utils/LoopUnrollAndJam.cpp
   96     Value *V = Phi.getIncomingValueForBlock(Latch);
  316     DenseMap<Value *, Value *> PrevItValueMap;
  316     DenseMap<Value *, Value *> PrevItValueMap;
  376             New, cast<BasicBlock>(LastValueMap[cast<Value>(OriginalBBIDom)]));
  393       Value *OldValue = Phi.getIncomingValueForBlock(AftBlocksLast[It]);
  395       Value *NewValue = OldValue;
  396       if (Value *PrevValue = PrevItValueMap[OldValue])
  426           Value *OldValue = Phi.getIncomingValue(b);
  427           if (Value *LastValue = LastValueMap[OldValue])
  590                               SmallVector<Value *, 4> &MemInstr) {
  611 static bool checkDependencies(SmallVector<Value *, 4> &Earlier,
  612                               SmallVector<Value *, 4> &Later,
  617   for (Value *I : Earlier) {
  618     for (Value *J : Later) {
  668   SmallVector<Value *, 4> ForeMemInstr;
  669   SmallVector<Value *, 4> SubLoopMemInstr;
  670   SmallVector<Value *, 4> AftMemInstr;
lib/Transforms/Utils/LoopUnrollPeel.cpp
  137   Value *Input = Phi->getIncomingValueForBlock(BackEdge);
  186     Value *Condition = BI->getCondition();
  187     Value *LeftVal, *RightVal;
  540       Value *LatchVal = NewPHI->getIncomingValueForBlock(Latch);
  556       Value *LatchVal = PHI.getIncomingValueForBlock(Edge.first);
  734     Value *NewVal = PHI->getIncomingValueForBlock(Latch);
lib/Transforms/Utils/LoopUnrollRuntime.cpp
   66 static void ConnectProlog(Loop *L, Value *BECount, unsigned Count,
  114       Value *V = PN.getIncomingValueForBlock(Latch);
  157   Value *BrLoopExit =
  182 static void ConnectEpilog(Loop *L, Value *ModVal, BasicBlock *NewExit,
  225     Value *V = PN.getIncomingValueForBlock(Latch);
  272   Value *BrLoopExit = B.CreateIsNotNull(ModVal, "lcmp.mod");
  299 CloneLoopBlocks(Loop *L, Value *NewIter, const bool CreateRemainderLoop,
  360         Value *IdxSub =
  363         Value *IdxCmp =
  391       Value *InVal = NewPHI->getIncomingValue(idx);
  393       if (Value *V = VMap.lookup(InVal))
  713   Value *TripCount = Expander.expandCodeFor(TripCountSC, TripCountSC->getType(),
  715   Value *BECount = Expander.expandCodeFor(BECountSC, BECountSC->getType(),
  718   Value *ModVal;
  736     Value *ModValTmp = B.CreateURem(BECount,
  739     Value *ModValAdd = B.CreateAdd(ModValTmp,
  747   Value *BranchVal =
  814        Value *newVal = VMap.lookup(Phi->getIncomingValue(i));
  895     Value *TestVal = B2.CreateSub(TripCount, ModVal, "unroll_iter");
  900     Value *IdxSub =
  903     Value *IdxCmp;
lib/Transforms/Utils/LoopUtils.cpp
  614       for (Value::use_iterator UI = I.use_begin(), E = I.use_end(); UI != E;) {
  742 Value *llvm::createMinMaxOp(IRBuilder<> &Builder,
  744                             Value *Left, Value *Right) {
  744                             Value *Left, Value *Right) {
  776   Value *Cmp;
  783   Value *Select = Builder.CreateSelect(Cmp, Left, Right, "rdx.minmax.select");
  788 Value *
  789 llvm::getOrderedReduction(IRBuilder<> &Builder, Value *Acc, Value *Src,
  789 llvm::getOrderedReduction(IRBuilder<> &Builder, Value *Acc, Value *Src,
  792                           ArrayRef<Value *> RedOps) {
  797   Value *Result = Acc;
  799     Value *Ext =
  819 Value *
  820 llvm::getShuffleReduction(IRBuilder<> &Builder, Value *Src, unsigned Op,
  822                           ArrayRef<Value *> RedOps) {
  829   Value *TmpVec = Src;
  840     Value *Shuf = Builder.CreateShuffleVector(
  862 Value *llvm::createSimpleTargetReduction(
  864     Value *Src, TargetTransformInfo::ReductionFlags Flags,
  865     ArrayRef<Value *> RedOps) {
  868   std::function<Value *()> BuildFunc;
  934 Value *llvm::createTargetReduction(IRBuilder<> &B,
  936                                    RecurrenceDescriptor &Desc, Value *Src,
  979 void llvm::propagateIRFlags(Value *I, ArrayRef<Value *> VL, Value *OpValue) {
  979 void llvm::propagateIRFlags(Value *I, ArrayRef<Value *> VL, Value *OpValue) {
  979 void llvm::propagateIRFlags(Value *I, ArrayRef<Value *> VL, Value *OpValue) {
  989   for (auto *V : VL) {
lib/Transforms/Utils/LoopVersioning.cpp
   58   Value *SCEVRuntimeCheck;
   59   Value *RuntimeCheck = nullptr;
  158     Value *ClonedValue = PN->getIncomingValue(0);
  228   const Value *Ptr = isa<LoadInst>(OrigInst)
lib/Transforms/Utils/LowerInvoke.cpp
   50       SmallVector<Value *, 16> CallArgs(II->arg_begin(), II->arg_end());
lib/Transforms/Utils/LowerMemIntrinsics.cpp
   25 void llvm::createMemCpyLoopKnownSize(Instruction *InsertBefore, Value *SrcAddr,
   26                                      Value *DstAddr, ConstantInt *CopyLen,
   73     Value *SrcGEP =
   75     Value *Load = LoopBuilder.CreateLoad(LoopOpType, SrcGEP, SrcIsVolatile);
   76     Value *DstGEP =
   80     Value *NewIndex =
  112       Value *CastedSrc = SrcAddr->getType() == SrcPtrType
  115       Value *SrcGEP = RBuilder.CreateInBoundsGEP(
  117       Value *Load = RBuilder.CreateLoad(OpTy, SrcGEP, SrcIsVolatile);
  121       Value *CastedDst = DstAddr->getType() == DstPtrType
  124       Value *DstGEP = RBuilder.CreateInBoundsGEP(
  136                                        Value *SrcAddr, Value *DstAddr,
  136                                        Value *SrcAddr, Value *DstAddr,
  137                                        Value *CopyLen, unsigned SrcAlign,
  173   Value *RuntimeLoopCount = LoopOpIsInt8 ?
  183   Value *SrcGEP = LoopBuilder.CreateInBoundsGEP(LoopOpType, SrcAddr, LoopIndex);
  184   Value *Load = LoopBuilder.CreateLoad(LoopOpType, SrcGEP, SrcIsVolatile);
  185   Value *DstGEP = LoopBuilder.CreateInBoundsGEP(LoopOpType, DstAddr, LoopIndex);
  188   Value *NewIndex =
  194    Value *RuntimeResidual = PLBuilder.CreateURem(CopyLen, CILoopOpSize);
  195    Value *RuntimeBytesCopied = PLBuilder.CreateSub(CopyLen, RuntimeResidual);
  230     Value *SrcAsInt8 =
  232     Value *DstAsInt8 =
  234     Value *FullOffset = ResBuilder.CreateAdd(RuntimeBytesCopied, ResidualIndex);
  235     Value *SrcGEP =
  237     Value *Load = ResBuilder.CreateLoad(Int8Type, SrcGEP, SrcIsVolatile);
  238     Value *DstGEP =
  242     Value *ResNewIndex =
  288                               Value *SrcAddr, Value *DstAddr, Value *CopyLen,
  288                               Value *SrcAddr, Value *DstAddr, Value *CopyLen,
  288                               Value *SrcAddr, Value *DstAddr, Value *CopyLen,
  332   Value *IndexPtr = LoopBuilder.CreateSub(
  334   Value *Element = LoopBuilder.CreateLoad(
  352   Value *FwdElement = FwdLoopBuilder.CreateLoad(
  357   Value *FwdIndexPtr = FwdLoopBuilder.CreateAdd(
  369                              Value *DstAddr, Value *CopyLen, Value *SetValue,
  369                              Value *DstAddr, Value *CopyLen, Value *SetValue,
  369                              Value *DstAddr, Value *CopyLen, Value *SetValue,
  400   Value *NewIndex =
lib/Transforms/Utils/LowerSwitch.cpp
  107                               Value *Val, BasicBlock *Predecessor,
  110     BasicBlock *newLeafBlock(CaseRange &Leaf, Value *Val,
  249                            ConstantInt *UpperBound, Value *Val,
  332 BasicBlock *LowerSwitch::newLeafBlock(CaseRange &Leaf, Value *Val,
  445   Value *Val = SI->getCondition();  // The value we are switching on...
lib/Transforms/Utils/ModuleUtils.cpp
  121     ArrayRef<Type *> InitArgTypes, ArrayRef<Value *> InitArgs,
  146     ArrayRef<Type *> InitArgTypes, ArrayRef<Value *> InitArgs,
lib/Transforms/Utils/PredicateInfo.cpp
  103   Value *Def = nullptr;
  111 static bool valueComesBefore(OrderedInstructions &OI, const Value *A,
  112                              const Value *B) {
  205   Value *getMiddleDef(const ValueDFS &VD) const {
  226   const Instruction *getDefOrUser(const Value *Def, const Use *U) const {
  235     auto *ADef = getMiddleDef(A);
  236     auto *BDef = getMiddleDef(B);
  292     Value *Op, SmallVectorImpl<ValueDFS> &DFSOrderedSet) {
  323 void collectCmpOps(CmpInst *Comparison, SmallVectorImpl<Value *> &CmpOperands) {
  324   auto *Op0 = Comparison->getOperand(0);
  325   auto *Op1 = Comparison->getOperand(1);
  340 void PredicateInfo::addInfoFor(SmallVectorImpl<Value *> &OpsToRename, Value *Op,
  340 void PredicateInfo::addInfoFor(SmallVectorImpl<Value *> &OpsToRename, Value *Op,
  352                                   SmallVectorImpl<Value *> &OpsToRename) {
  354   SmallVector<Value *, 8> CmpOperands;
  355   SmallVector<Value *, 2> ConditionsToProcess;
  357   Value *Operand = II->getOperand(0);
  372       for (auto *Op : CmpOperands) {
  392                                   SmallVectorImpl<Value *> &OpsToRename) {
  398   SmallVector<Value *, 2> ConditionsToProcess;
  423   SmallVector<Value *, 8> CmpOperands;
  443       for (auto *Op : CmpOperands)
  462                                   SmallVectorImpl<Value *> &OpsToRename) {
  463   Value *Op = SI->getCondition();
  492   SmallVector<Value *, 8> OpsToRename;
  532 Value *PredicateInfo::materializeStack(unsigned int &Counter,
  534                                        Value *OrigOp) {
  547     auto *Op =
  600 void PredicateInfo::renameUses(SmallVectorImpl<Value *> &OpsToRename) {
  603   for (auto *Op : OpsToRename) {
  721 PredicateInfo::ValueInfo &PredicateInfo::getOrCreateValueInfo(Value *Operand) {
  735 PredicateInfo::getValueInfo(Value *Operand) const {
lib/Transforms/Utils/PromoteMemoryToRegister.cpp
  163   using ValVector = std::vector<Value *>;
  391     Value *ReplVal = OnlyStore->getOperand(0);
  492       Value *ReplVal = std::prev(I)->second->getOperand(0);
  694       if (Value *V = SimplifyInstruction(PN, SQ)) {
  759       Value *UndefVal = UndefValue::get(SomePHI->getType());
  944       Value *V = IncomingVals[AI->second];
lib/Transforms/Utils/SSAUpdater.cpp
   40 using AvailableValsTy = DenseMap<BasicBlock *, Value *>;
   66 Value *SSAUpdater::FindValueForBlock(BasicBlock *BB) const {
   71 void SSAUpdater::AddAvailableValue(BasicBlock *BB, Value *V) {
   79                         SmallDenseMap<BasicBlock *, Value *, 8> &ValueMapping) {
   94 Value *SSAUpdater::GetValueAtEndOfBlock(BasicBlock *BB) {
   95   Value *Res = GetValueAtEndOfBlockInternal(BB);
   99 Value *SSAUpdater::GetValueInMiddleOfBlock(BasicBlock *BB) {
  107   SmallVector<std::pair<BasicBlock *, Value *>, 8> PredValues;
  108   Value *SingularValue = nullptr;
  116       Value *PredVal = GetValueAtEndOfBlock(PredBB);
  129       Value *PredVal = GetValueAtEndOfBlock(PredBB);
  152     SmallDenseMap<BasicBlock *, Value *, 8> ValueMapping(PredValues.begin(),
  170   if (Value *V =
  192   Value *V;
  199   Value *OldVal = U.get();
  209   Value *V;
  224   using ValT = Value *;
  246     Value *getIncomingValue() { return PHI->getIncomingValue(idx); }
  272   static Value *GetUndefVal(BasicBlock *BB, SSAUpdater *Updater) {
  278   static Value *CreateEmptyPHI(BasicBlock *BB, unsigned NumPreds,
  287   static void AddPHIOperand(PHINode *PHI, Value *Val, BasicBlock *Pred) {
  298   static PHINode *ValueIsPHI(Value *Val, SSAUpdater *Updater) {
  304   static PHINode *ValueIsNewPHI(Value *Val, SSAUpdater *Updater) {
  313   static Value *GetPHIValue(PHINode *PHI) {
  323 Value *SSAUpdater::GetValueAtEndOfBlockInternal(BasicBlock *BB) {
  325   if (Value *V = AvailableVals[BB])
  341   const Value *SomeVal;
  365   DenseMap<Value *, Value *> ReplacedLoads;
  365   DenseMap<Value *, Value *> ReplacedLoads;
  412     Value *StoredValue = nullptr;
  449     Value *NewVal = SSA.GetValueInMiddleOfBlock(ALoad->getParent());
  469       Value *NewVal = ReplacedLoads[User];
  475       DenseMap<Value*, Value*>::iterator RLI = ReplacedLoads.find(NewVal);
  475       DenseMap<Value*, Value*>::iterator RLI = ReplacedLoads.find(NewVal);
lib/Transforms/Utils/SSAUpdaterBulk.cpp
   51 void SSAUpdaterBulk::AddAvailableValue(unsigned Var, BasicBlock *BB, Value *V) {
   76 Value *SSAUpdaterBulk::computeValueAt(BasicBlock *BB, RewriteInfo &R,
   81       Value *V = computeValueAt(IDom, R, DT);
  179       Value *V = computeValueAt(getUserBB(U), R, DT);
  180       Value *OldVal = U->get();
lib/Transforms/Utils/SimplifyCFG.cpp
  185   Value *isValueEqualityComparison(Instruction *TI);
  339 static bool DominatesMergePoint(Value *V, BasicBlock *BB,
  409 static ConstantInt *GetConstantInt(Value *V, const DataLayout &DL) {
  453   Value *CompValue = nullptr;
  456   Value *Extra = nullptr;
  476   bool setValueOnce(Value *NewVal) {
  499     Value *RHSVal;
  600     Value *CandidateVal = I->getOperand(0);
  634   void gather(Value *V) {
  638     SmallVector<Value *, 8> DFT;
  639     SmallPtrSet<Value *, 8> Visited;
  699 Value *SimplifyCFGOpt::isValueEqualityComparison(Instruction *TI) {
  700   Value *CV = nullptr;
  716       Value *Ptr = PTII->getPointerOperand();
  818   Value *PredVal = isValueEqualityComparison(Pred->getTerminator());
  822   Value *ThisVal = isValueEqualityComparison(TI);
 1005   Value *CV = isValueEqualityComparison(TI); // CondVal
 1015     Value *PCV = isValueEqualityComparison(PTI); // PredCondVal
 1222       Value *BB1V = PN.getIncomingValueForBlock(BB1);
 1223       Value *BB2V = PN.getIncomingValueForBlock(BB2);
 1232 static bool passingValueIsAlwaysUndefined(Value *V, Instruction *I);
 1357       Value *BB1V = PN.getIncomingValueForBlock(BB1);
 1358       Value *BB2V = PN.getIncomingValueForBlock(BB2);
 1395   std::map<std::pair<Value *, Value *>, SelectInst *> InsertedSelects;
 1395   std::map<std::pair<Value *, Value *>, SelectInst *> InsertedSelects;
 1398       Value *BB1V = PN.getIncomingValueForBlock(BB1);
 1399       Value *BB2V = PN.getIncomingValueForBlock(BB2);
 1447     DenseMap<Instruction *, SmallVector<Value *, 4>> &PHIOperands) {
 1575   SmallVector<Value*, 4> NewOperands;
 1592     auto *Op = I0->getOperand(O);
 1768   SmallPtrSet<Value*,4> InstructionsToSink;
 1769   DenseMap<Instruction*, SmallVector<Value*,4>> PHIOperands;
 1783       for (auto *V : PHIOperands[I])
 1884 static Value *isSafeToSpeculateStore(Instruction *I, BasicBlock *BrBB,
 1894   Value *StorePtr = StoreToHoist->getPointerOperand();
 1959   Value *BrCond = BI->getCondition();
 1985   Value *SpeculatedStoreValue = nullptr;
 2045     Value *OrigV = PN.getIncomingValueForBlock(BB);
 2046     Value *ThenV = PN.getIncomingValueForBlock(ThenBB);
 2094     Value *TrueV = SpeculatedStore->getValueOperand();
 2095     Value *FalseV = SpeculatedStoreValue;
 2098     Value *S = Builder.CreateSelect(
 2119     Value *OrigV = PN.getIncomingValue(OrigI);
 2120     Value *ThenV = PN.getIncomingValue(ThenI);
 2129     Value *TrueV = ThenV, *FalseV = OrigV;
 2132     Value *V = Builder.CreateSelect(
 2235     DenseMap<Value *, Value *> TranslateMap; // Track translated values.
 2235     DenseMap<Value *, Value *> TranslateMap; // Track translated values.
 2248         DenseMap<Value *, Value *>::iterator PI = TranslateMap.find(*i);
 2248         DenseMap<Value *, Value *>::iterator PI = TranslateMap.find(*i);
 2254       if (Value *V = SimplifyInstruction(N, {DL, nullptr, nullptr, AC})) {
 2307   Value *IfCond = GetIfCondition(BB, IfTrue, IfFalse);
 2332     if (Value *V = SimplifyInstruction(PN, {DL, PN})) {
 2423     Value *TrueVal = PN->getIncomingValue(PN->getIncomingBlock(0) == IfFalse);
 2424     Value *FalseVal = PN->getIncomingValue(PN->getIncomingBlock(0) == IfTrue);
 2426     Value *Sel = Builder.CreateSelect(IfCond, TrueVal, FalseVal, "", InsertPt);
 2475   Value *TrueValue = TrueRet->getReturnValue();
 2476   Value *FalseValue = FalseRet->getReturnValue();
 2504   Value *BrCond = BI->getCondition();
 2516   Value *RI =
 2710       Value *NewCond = PBI->getCondition();
 2896 static Value *ensureValueAvailableInSuccessor(Value *V, BasicBlock *BB,
 2896 static Value *ensureValueAvailableInSuccessor(Value *V, BasicBlock *BB,
 2897                                               Value *AlternativeV = nullptr) {
 2947                                            BasicBlock *PostBB, Value *Address,
 3048   Value *PCond = cast<BranchInst>(PFB->getSinglePredecessor()->getTerminator())
 3050   Value *QCond = cast<BranchInst>(QFB->getSinglePredecessor()->getTerminator())
 3053   Value *PPHI = ensureValueAvailableInSuccessor(PStore->getValueOperand(),
 3055   Value *QPHI = ensureValueAvailableInSuccessor(QStore->getValueOperand(),
 3060   Value *PPred = PStore->getParent() == PTB ? PCond : QB.CreateNot(PCond);
 3061   Value *QPred = QStore->getParent() == QTB ? QCond : QB.CreateNot(QCond);
 3067   Value *CombinedPred = QB.CreateOr(PPred, QPred);
 3187   SmallPtrSet<Value *, 4> PStoreAddresses, QStoreAddresses;
 3209   for (auto *Address : CommonAddresses)
 3327     Value *BIV = PN->getIncomingValueForBlock(BB);
 3333     Value *PBIV = PN->getIncomingValue(PBBIdx);
 3367   Value *PBICond = PBI->getCondition();
 3372   Value *BICond = BI->getCondition();
 3377   Value *Cond = Builder.CreateOr(PBICond, BICond, "brmerge");
 3416     Value *BIV = PN.getIncomingValueForBlock(BB);
 3418     Value *PBIV = PN.getIncomingValue(PBBIdx);
 3458 static bool SimplifyTerminatorOnSelect(Instruction *OldTerm, Value *Cond,
 3529   Value *Condition = Select->getCondition();
 3599   Value *V = ICI->getOperand(0);
 3621     if (Value *V = SimplifyInstruction(ICI, {DL, ICI})) {
 3633     Value *V;
 3706   Value *CompVal = ConstantCompare.CompValue;
 3708   Value *ExtraCase = ConstantCompare.Extra;
 3795     Value *InVal = PN->getIncomingValueForBlock(BB);
 3837     auto *IncomingValue = PhiLPInst->getIncomingValue(Idx);
 3994       Value *SrcVal = DestPN->getIncomingValue(Idx);
 4232         Value* Cond = BI->getCondition();
 4394   Value *Sub = SI->getCondition();
 4398   Value *Cmp;
 4458   Value *Cond = SI->getCondition();
 4534     Value *InValue = PHI.getIncomingValue(Idx);
 4632 LookupConstant(Value *V,
 4633                const SmallDenseMap<Value *, Constant *> &ConstantPool) {
 4645              const SmallDenseMap<Value *, Constant *> &ConstantPool) {
 4687   SmallDenseMap<Value *, Constant *> ConstantPool;
 4831 static Value *ConvertTwoCaseSwitch(const SwitchCaseResultVectorTy &ResultVector,
 4844     Value *SelectValue = ResultVector[1].first;
 4846       Value *const ValueCompare =
 4851     Value *const ValueCompare =
 4863                                               Value *SelectValue,
 4889   Value *const Cond = SI->getCondition();
 4904   Value *SelectValue =
 4928   Value *BuildLookup(Value *Index, IRBuilder<> &Builder);
 4928   Value *BuildLookup(Value *Index, IRBuilder<> &Builder);
 5092 Value *SwitchLookupTable::BuildLookup(Value *Index, IRBuilder<> &Builder) {
 5092 Value *SwitchLookupTable::BuildLookup(Value *Index, IRBuilder<> &Builder) {
 5098     Value *Result = Builder.CreateIntCast(Index, LinearMultiplier->getType(),
 5113     Value *ShiftAmt = Builder.CreateZExtOrTrunc(Index, MapTy, "switch.cast");
 5121     Value *DownShifted =
 5136     Value *GEPIndices[] = {Builder.getInt32(0), Index};
 5137     Value *GEP = Builder.CreateInBoundsGEP(Array->getValueType(), Array,
 5242   Value *RangeCmp = RangeCheckBranch->getCondition();
 5280     Value *InvertedTableCmp = BinaryOperator::CreateXor(
 5397   Value *TableIndex;
 5425     Value *Cmp = Builder.CreateICmpULT(
 5460     Value *MaskIndex =
 5462     Value *Shifted = Builder.CreateLShr(TableMask, MaskIndex, "switch.shifted");
 5463     Value *LoBit = Builder.CreateTrunc(
 5488     Value *Result = Table.BuildLookup(TableIndex, Builder);
 5618   auto *Sub = Builder.CreateSub(SI->getCondition(), ConstantInt::get(Ty, Base));
 5619   auto *LShr = Builder.CreateLShr(Sub, ShiftC);
 5620   auto *Shl = Builder.CreateShl(Sub, Ty->getBitWidth() - Shift);
 5621   auto *Rot = Builder.CreateOr(LShr, Shl);
 5643     Value *Cond = SI->getCondition();
 5689   SmallPtrSet<Value *, 8> Succs;
 5897     auto *OldCond = BI->getCondition();
 5964 static bool passingValueIsAlwaysUndefined(Value *V, Instruction *I) {
lib/Transforms/Utils/SimplifyIndVar.cpp
   78     Value *foldIVUser(Instruction *UseInst, Instruction *IVOperand);
   87     bool makeIVComparisonInvariant(ICmpInst *ICmp, Value *IVOperand);
   88     void eliminateIVComparison(ICmpInst *ICmp, Value *IVOperand);
   89     void simplifyIVRemainder(BinaryOperator *Rem, Value *IVOperand,
   95     bool strengthenOverflowingOperation(BinaryOperator *OBO, Value *IVOperand);
   96     bool strengthenRightShift(BinaryOperator *BO, Value *IVOperand);
  108 Value *SimplifyIndvar::foldIVUser(Instruction *UseInst, Instruction *IVOperand) {
  109   Value *IVSrc = nullptr;
  176                                                Value *IVOperand) {
  206   SmallDenseMap<const SCEV*, Value*> CheapExpansions;
  215       Value *Incoming = PN->getIncomingValue(Idx);
  220   Value *NewLHS = CheapExpansions[InvariantLHS];
  221   Value *NewRHS = CheapExpansions[InvariantRHS];
  245 void SimplifyIndvar::eliminateIVComparison(ICmpInst *ICmp, Value *IVOperand) {
  321   auto *N = Rem->getOperand(0), *D = Rem->getOperand(1);
  343   auto *N = Rem->getOperand(0), *D = Rem->getOperand(1);
  356 void SimplifyIndvar::simplifyIVRemainder(BinaryOperator *Rem, Value *IVOperand,
  358   auto *NValue = Rem->getOperand(0);
  359   auto *DValue = Rem->getOperand(1);
  517   Value *IV = TI->getOperand(0);
  580     auto *Op1 = IsSwapped ? ICI->getOperand(0) : ICI->getOperand(1);
  674   auto *Invariant = Rewriter.expandCodeFor(S, I->getType(), IP);
  730                                                     Value *IVOperand) {
  765                                           Value *IVOperand) {
  893       Value *NewOper = foldIVUser(UseInst, IVOperand);
lib/Transforms/Utils/SimplifyLibCalls.cpp
   93 static bool isOnlyUsedInEqualityComparison(Value *V, Value *With) {
   93 static bool isOnlyUsedInEqualityComparison(Value *V, Value *With) {
  116 static Value *convertStrToNumber(CallInst *CI, StringRef &Str, int64_t Base) {
  141 static bool isLocallyOpenedFile(Value *File, CallInst *CI, IRBuilder<> &B,
  163 static bool isOnlyUsedInComparisonWithZero(Value *V) {
  175 static bool canTransformToMemCmp(CallInst *CI, Value *Str, uint64_t Len,
  236                                Value *Size, const DataLayout &DL) {
  255 Value *LibCallSimplifier::optimizeStrCat(CallInst *CI, IRBuilder<> &B) {
  257   Value *Dst = CI->getArgOperand(0);
  258   Value *Src = CI->getArgOperand(1);
  276 Value *LibCallSimplifier::emitStrLenMemCpy(Value *Src, Value *Dst, uint64_t Len,
  276 Value *LibCallSimplifier::emitStrLenMemCpy(Value *Src, Value *Dst, uint64_t Len,
  276 Value *LibCallSimplifier::emitStrLenMemCpy(Value *Src, Value *Dst, uint64_t Len,
  280   Value *DstLen = emitStrLen(Dst, B, DL, TLI);
  287   Value *CpyDst = B.CreateGEP(B.getInt8Ty(), Dst, DstLen, "endptr");
  296 Value *LibCallSimplifier::optimizeStrNCat(CallInst *CI, IRBuilder<> &B) {
  298   Value *Dst = CI->getArgOperand(0);
  299   Value *Src = CI->getArgOperand(1);
  300   Value *Size = CI->getArgOperand(2);
  339 Value *LibCallSimplifier::optimizeStrChr(CallInst *CI, IRBuilder<> &B) {
  342   Value *SrcStr = CI->getArgOperand(0);
  384 Value *LibCallSimplifier::optimizeStrRChr(CallInst *CI, IRBuilder<> &B) {
  385   Value *SrcStr = CI->getArgOperand(0);
  412 Value *LibCallSimplifier::optimizeStrCmp(CallInst *CI, IRBuilder<> &B) {
  413   Value *Str1P = CI->getArgOperand(0), *Str2P = CI->getArgOperand(1);
  467 Value *LibCallSimplifier::optimizeStrNCmp(CallInst *CI, IRBuilder<> &B) {
  468   Value *Str1P = CI->getArgOperand(0);
  469   Value *Str2P = CI->getArgOperand(1);
  470   Value *Size = CI->getArgOperand(2);
  535 Value *LibCallSimplifier::optimizeStrNDup(CallInst *CI, IRBuilder<> &B) {
  536   Value *Src = CI->getArgOperand(0);
  548 Value *LibCallSimplifier::optimizeStrCpy(CallInst *CI, IRBuilder<> &B) {
  549   Value *Dst = CI->getArgOperand(0), *Src = CI->getArgOperand(1);
  570 Value *LibCallSimplifier::optimizeStpCpy(CallInst *CI, IRBuilder<> &B) {
  572   Value *Dst = CI->getArgOperand(0), *Src = CI->getArgOperand(1);
  574     Value *StrLen = emitStrLen(Src, B, DL, TLI);
  586   Value *LenV = ConstantInt::get(DL.getIntPtrType(PT), Len);
  587   Value *DstEnd = B.CreateGEP(B.getInt8Ty(), Dst,
  597 Value *LibCallSimplifier::optimizeStrNCpy(CallInst *CI, IRBuilder<> &B) {
  599   Value *Dst = CI->getArgOperand(0);
  600   Value *Src = CI->getArgOperand(1);
  601   Value *Size = CI->getArgOperand(2);
  645 Value *LibCallSimplifier::optimizeStringLength(CallInst *CI, IRBuilder<> &B,
  647   Value *Src = CI->getArgOperand(0);
  684       Value *Offset = GEP->getOperand(2);
  736 Value *LibCallSimplifier::optimizeStrLen(CallInst *CI, IRBuilder<> &B) {
  737   if (Value *V = optimizeStringLength(CI, B, 8))
  743 Value *LibCallSimplifier::optimizeWcslen(CallInst *CI, IRBuilder<> &B) {
  753 Value *LibCallSimplifier::optimizeStrPBrk(CallInst *CI, IRBuilder<> &B) {
  780 Value *LibCallSimplifier::optimizeStrTo(CallInst *CI, IRBuilder<> &B) {
  781   Value *EndPtr = CI->getArgOperand(1);
  791 Value *LibCallSimplifier::optimizeStrSpn(CallInst *CI, IRBuilder<> &B) {
  812 Value *LibCallSimplifier::optimizeStrCSpn(CallInst *CI, IRBuilder<> &B) {
  836 Value *LibCallSimplifier::optimizeStrStr(CallInst *CI, IRBuilder<> &B) {
  843     Value *StrLen = emitStrLen(CI->getArgOperand(1), B, DL, TLI);
  846     Value *StrNCmp = emitStrNCmp(CI->getArgOperand(0), CI->getArgOperand(1),
  852       Value *Cmp =
  877     Value *Result = castToCStr(CI->getArgOperand(0), B);
  885     Value *StrChr = emitStrChr(CI->getArgOperand(0), ToFindStr[0], B, TLI);
  893 Value *LibCallSimplifier::optimizeMemRChr(CallInst *CI, IRBuilder<> &B) {
  899 Value *LibCallSimplifier::optimizeMemChr(CallInst *CI, IRBuilder<> &B) {
  900   Value *SrcStr = CI->getArgOperand(0);
  901   Value *Size = CI->getArgOperand(2);
  955     Value *BitfieldC = B.getInt(Bitfield);
  958     Value *C = B.CreateZExtOrTrunc(CI->getArgOperand(1), BitfieldC->getType());
  962     Value *Bounds = B.CreateICmp(ICmpInst::ICMP_ULT, C, B.getIntN(Width, Width),
  966     Value *Shl = B.CreateShl(B.getIntN(Width, 1ULL), C);
  967     Value *Bits = B.CreateIsNotNull(B.CreateAnd(Shl, BitfieldC), "memchr.bits");
  987 static Value *optimizeMemCmpConstantSize(CallInst *CI, Value *LHS, Value *RHS,
  987 static Value *optimizeMemCmpConstantSize(CallInst *CI, Value *LHS, Value *RHS,
  987 static Value *optimizeMemCmpConstantSize(CallInst *CI, Value *LHS, Value *RHS,
  995     Value *LHSV =
  998     Value *RHSV =
 1012     Value *LHSV = nullptr;
 1017     Value *RHSV = nullptr;
 1064 Value *LibCallSimplifier::optimizeMemCmpBCmpCommon(CallInst *CI,
 1066   Value *LHS = CI->getArgOperand(0), *RHS = CI->getArgOperand(1);
 1067   Value *Size = CI->getArgOperand(2);
 1082   if (Value *Res =
 1088 Value *LibCallSimplifier::optimizeMemCmp(CallInst *CI, IRBuilder<> &B) {
 1089   if (Value *V = optimizeMemCmpBCmpCommon(CI, B))
 1096     Value *LHS = CI->getArgOperand(0);
 1097     Value *RHS = CI->getArgOperand(1);
 1098     Value *Size = CI->getArgOperand(2);
 1105 Value *LibCallSimplifier::optimizeBCmp(CallInst *CI, IRBuilder<> &B) {
 1109 Value *LibCallSimplifier::optimizeMemCpy(CallInst *CI, IRBuilder<> &B) {
 1110   Value *Size = CI->getArgOperand(2);
 1122 Value *LibCallSimplifier::optimizeMemPCpy(CallInst *CI, IRBuilder<> &B) {
 1123   Value *Dst = CI->getArgOperand(0);
 1124   Value *N = CI->getArgOperand(2);
 1131 Value *LibCallSimplifier::optimizeMemMove(CallInst *CI, IRBuilder<> &B) {
 1132   Value *Size = CI->getArgOperand(2);
 1145 Value *LibCallSimplifier::foldMallocMemset(CallInst *Memset, IRBuilder<> &B) {
 1178   if (Value *Calloc = emitCalloc(ConstantInt::get(SizeType, 1),
 1188 Value *LibCallSimplifier::optimizeMemSet(CallInst *CI, IRBuilder<> &B) {
 1189   Value *Size = CI->getArgOperand(2);
 1194   if (auto *Calloc = foldMallocMemset(CI, B))
 1198   Value *Val = B.CreateIntCast(CI->getArgOperand(1), B.getInt8Ty(), false);
 1204 Value *LibCallSimplifier::optimizeRealloc(CallInst *CI, IRBuilder<> &B) {
 1216 static Value *replaceUnaryCall(CallInst *CI, IRBuilder<> &B, Intrinsic::ID IID) {
 1222   Value *V = CI->getArgOperand(0);
 1234 static Value *valueHasFloatPrecision(Value *Val) {
 1234 static Value *valueHasFloatPrecision(Value *Val) {
 1236     Value *Op = Cast->getOperand(0);
 1252 static Value *optimizeDoubleFP(CallInst *CI, IRBuilder<> &B,
 1269   Value *V[2];
 1295   Value *R;
 1310 static Value *optimizeUnaryDoubleFP(CallInst *CI, IRBuilder<> &B,
 1316 static Value *optimizeBinaryDoubleFP(CallInst *CI, IRBuilder<> &B,
 1322 Value *LibCallSimplifier::optimizeCAbs(CallInst *CI, IRBuilder<> &B) {
 1330   Value *Real, *Imag;
 1332     Value *Op = CI->getArgOperand(0);
 1342   Value *RealReal = B.CreateFMul(Real, Real);
 1343   Value *ImagImag = B.CreateFMul(Imag, Imag);
 1350 static Value *optimizeTrigReflections(CallInst *Call, LibFunc Func,
 1359   Value *X;
 1385 static Value *getPow(Value *InnerChain[33], unsigned Exp, IRBuilder<> &B) {
 1385 static Value *getPow(Value *InnerChain[33], unsigned Exp, IRBuilder<> &B) {
 1411 static Value *getIntToFPVal(Value *I2F, IRBuilder<> &B) {
 1411 static Value *getIntToFPVal(Value *I2F, IRBuilder<> &B) {
 1413     Value *Op = cast<Instruction>(I2F)->getOperand(0);
 1429 Value *LibCallSimplifier::replacePowWithExp(CallInst *Pow, IRBuilder<> &B) {
 1430   Value *Base = Pow->getArgOperand(0), *Expo = Pow->getArgOperand(1);
 1460       Value *ExpFn;
 1483       Value *FMul = B.CreateFMul(BaseFn->getArgOperand(0), Expo, "mul");
 1510     if (Value *ExpoI = getIntToFPVal(Expo, B))
 1529       Value *FMul = B.CreateFMul(Expo, ConstantFP::get(Ty, N), "mul");
 1549     Value *Log = nullptr;
 1556       Value *FMul = B.CreateFMul(Log, Expo, "mul");
 1569 static Value *getSqrtCall(Value *V, AttributeList Attrs, bool NoErrno,
 1569 static Value *getSqrtCall(Value *V, AttributeList Attrs, bool NoErrno,
 1591 Value *LibCallSimplifier::replacePowWithSqrt(CallInst *Pow, IRBuilder<> &B) {
 1592   Value *Sqrt, *Base = Pow->getArgOperand(0), *Expo = Pow->getArgOperand(1);
 1615     Value *PosInf = ConstantFP::getInfinity(Ty),
 1617     Value *FCmp = B.CreateFCmpOEQ(Base, NegInf, "isinf");
 1628 static Value *createPowWithIntegerExponent(Value *Base, Value *Expo, Module *M,
 1628 static Value *createPowWithIntegerExponent(Value *Base, Value *Expo, Module *M,
 1628 static Value *createPowWithIntegerExponent(Value *Base, Value *Expo, Module *M,
 1630   Value *Args[] = {Base, Expo};
 1635 Value *LibCallSimplifier::optimizePow(CallInst *Pow, IRBuilder<> &B) {
 1636   Value *Base = Pow->getArgOperand(0);
 1637   Value *Expo = Pow->getArgOperand(1);
 1642   Value *Shrunk = nullptr;
 1666   if (Value *Exp = replacePowWithExp(Pow, B))
 1687   if (Value *Sqrt = replacePowWithSqrt(Pow, B))
 1704       Value *Sqrt = nullptr;
 1721       Value *InnerChain[33] = {nullptr};
 1728       Value *FMul = getPow(InnerChain, ExpoA.convertToDouble(), B);
 1753     if (Value *ExpoI = getIntToFPVal(Expo, B))
 1760 Value *LibCallSimplifier::optimizeExp2(CallInst *CI, IRBuilder<> &B) {
 1763   Value *Ret = nullptr;
 1769   Value *Op = CI->getArgOperand(0);
 1775     if (Value *Exp = getIntToFPVal(Op, B))
 1784 Value *LibCallSimplifier::optimizeFMinFMax(CallInst *CI, IRBuilder<> &B) {
 1790     if (Value *Ret = optimizeBinaryDoubleFP(CI, B))
 1811 Value *LibCallSimplifier::optimizeLog(CallInst *Log, IRBuilder<> &B) {
 1818   Value *Ret = nullptr;
 1925     Value *LogX =
 1930     Value *MulY = B.CreateFMul(Arg->getArgOperand(1), LogX, "mul");
 1949     Value *LogE = Log->doesNotAccessMemory()
 1953     Value *MulY = B.CreateFMul(Arg->getArgOperand(0), LogE, "mul");
 1963 Value *LibCallSimplifier::optimizeSqrt(CallInst *CI, IRBuilder<> &B) {
 1965   Value *Ret = nullptr;
 1983   Value *Op0 = I->getOperand(0);
 1984   Value *Op1 = I->getOperand(1);
 1985   Value *RepeatOp = nullptr;
 1986   Value *OtherOp = nullptr;
 1996     Value *OtherMul0, *OtherMul1;
 2019   Value *FabsCall = B.CreateCall(Fabs, RepeatOp, "fabs");
 2025     Value *SqrtCall = B.CreateCall(Sqrt, OtherOp, "sqrt");
 2032 Value *LibCallSimplifier::optimizeTan(CallInst *CI, IRBuilder<> &B) {
 2034   Value *Ret = nullptr;
 2039   Value *Op1 = CI->getArgOperand(0);
 2069 static void insertSinCosCall(IRBuilder<> &B, Function *OrigCallee, Value *Arg,
 2070                              bool UseFloat, Value *&Sin, Value *&Cos,
 2070                              bool UseFloat, Value *&Sin, Value *&Cos,
 2071                              Value *&SinCos) {
 2119 Value *LibCallSimplifier::optimizeSinCosPi(CallInst *CI, IRBuilder<> &B) {
 2125   Value *Arg = CI->getArgOperand(0);
 2143   Value *Sin, *Cos, *SinCos;
 2160     Value *Val, Function *F, bool IsFloat,
 2200 Value *LibCallSimplifier::optimizeFFS(CallInst *CI, IRBuilder<> &B) {
 2202   Value *Op = CI->getArgOperand(0);
 2206   Value *V = B.CreateCall(F, {Op, B.getTrue()}, "cttz");
 2210   Value *Cond = B.CreateICmpNE(Op, Constant::getNullValue(ArgType));
 2214 Value *LibCallSimplifier::optimizeFls(CallInst *CI, IRBuilder<> &B) {
 2216   Value *Op = CI->getArgOperand(0);
 2220   Value *V = B.CreateCall(F, {Op, B.getFalse()}, "ctlz");
 2226 Value *LibCallSimplifier::optimizeAbs(CallInst *CI, IRBuilder<> &B) {
 2229   Value *X = CI->getArgOperand(0);
 2230   Value *IsNeg = B.CreateICmpSLT(X, Constant::getNullValue(X->getType()));
 2231   Value *NegX = B.CreateNSWNeg(X, "neg");
 2235 Value *LibCallSimplifier::optimizeIsDigit(CallInst *CI, IRBuilder<> &B) {
 2237   Value *Op = CI->getArgOperand(0);
 2243 Value *LibCallSimplifier::optimizeIsAscii(CallInst *CI, IRBuilder<> &B) {
 2245   Value *Op = CI->getArgOperand(0);
 2250 Value *LibCallSimplifier::optimizeToAscii(CallInst *CI, IRBuilder<> &B) {
 2256 Value *LibCallSimplifier::optimizeAtoi(CallInst *CI, IRBuilder<> &B) {
 2264 Value *LibCallSimplifier::optimizeStrtol(CallInst *CI, IRBuilder<> &B) {
 2285 Value *LibCallSimplifier::optimizeErrorReporting(CallInst *CI, IRBuilder<> &B,
 2325 Value *LibCallSimplifier::optimizePrintFString(CallInst *CI, IRBuilder<> &B) {
 2361     Value *GV = B.CreateGlobalString(FormatStr, "str");
 2378 Value *LibCallSimplifier::optimizePrintF(CallInst *CI, IRBuilder<> &B) {
 2382   if (Value *V = optimizePrintFString(CI, B)) {
 2415 Value *LibCallSimplifier::optimizeSPrintFString(CallInst *CI, IRBuilder<> &B) {
 2446     Value *V = B.CreateTrunc(CI->getArgOperand(2), B.getInt8Ty(), "char");
 2447     Value *Ptr = castToCStr(CI->getArgOperand(0), B);
 2461     Value *Len = emitStrLen(CI->getArgOperand(2), B, DL, TLI);
 2464     Value *IncLen =
 2474 Value *LibCallSimplifier::optimizeSPrintF(CallInst *CI, IRBuilder<> &B) {
 2477   if (Value *V = optimizeSPrintFString(CI, B)) {
 2510 Value *LibCallSimplifier::optimizeSnPrintFString(CallInst *CI, IRBuilder<> &B) {
 2558       Value *V = B.CreateTrunc(CI->getArgOperand(3), B.getInt8Ty(), "char");
 2559       Value *Ptr = castToCStr(CI->getArgOperand(0), B);
 2588 Value *LibCallSimplifier::optimizeSnPrintF(CallInst *CI, IRBuilder<> &B) {
 2589   if (Value *V = optimizeSnPrintFString(CI, B)) {
 2598 Value *LibCallSimplifier::optimizeFPrintFString(CallInst *CI, IRBuilder<> &B) {
 2647 Value *LibCallSimplifier::optimizeFPrintF(CallInst *CI, IRBuilder<> &B) {
 2650   if (Value *V = optimizeFPrintFString(CI, B)) {
 2682 Value *LibCallSimplifier::optimizeFWrite(CallInst *CI, IRBuilder<> &B) {
 2698       Value *Char = B.CreateLoad(B.getInt8Ty(),
 2700       Value *NewCI = emitFPutC(Char, CI->getArgOperand(3), B, TLI);
 2713 Value *LibCallSimplifier::optimizeFPuts(CallInst *CI, IRBuilder<> &B) {
 2745 Value *LibCallSimplifier::optimizeFPutc(CallInst *CI, IRBuilder<> &B) {
 2755 Value *LibCallSimplifier::optimizeFGetc(CallInst *CI, IRBuilder<> &B) {
 2762 Value *LibCallSimplifier::optimizeFGets(CallInst *CI, IRBuilder<> &B) {
 2770 Value *LibCallSimplifier::optimizeFRead(CallInst *CI, IRBuilder<> &B) {
 2779 Value *LibCallSimplifier::optimizePuts(CallInst *CI, IRBuilder<> &B) {
 2793 Value *LibCallSimplifier::optimizeBCopy(CallInst *CI, IRBuilder<> &B) {
 2808 Value *LibCallSimplifier::optimizeStringMemoryLibCall(CallInst *CI,
 2886 Value *LibCallSimplifier::optimizeFloatingPointLibCall(CallInst *CI,
 2893   if (Value *V = optimizeTrigReflections(CI, Func, Builder))
 2988 Value *LibCallSimplifier::optimizeCall(CallInst *CI) {
 3041   if (Value *SimplifiedFortifiedCI = FortifiedSimplifier.optimizeCall(CI)) {
 3048       if (Value *V = optimizeStringMemoryLibCall(SimplifiedCI, TmpBuilder)) {
 3062     if (Value *V = optimizeStringMemoryLibCall(CI, Builder))
 3064     if (Value *V = optimizeFloatingPointLibCall(CI, Func, Builder))
 3130     function_ref<void(Instruction *, Value *)> Replacer,
 3135 void LibCallSimplifier::replaceAllUsesWith(Instruction *I, Value *With) {
 3223 Value *FortifiedLibCallSimplifier::optimizeMemCpyChk(CallInst *CI,
 3234 Value *FortifiedLibCallSimplifier::optimizeMemMoveChk(CallInst *CI,
 3245 Value *FortifiedLibCallSimplifier::optimizeMemSetChk(CallInst *CI,
 3250     Value *Val = B.CreateIntCast(CI->getArgOperand(1), B.getInt8Ty(), false);
 3259 Value *FortifiedLibCallSimplifier::optimizeStrpCpyChk(CallInst *CI,
 3263   Value *Dst = CI->getArgOperand(0), *Src = CI->getArgOperand(1),
 3268     Value *StrLen = emitStrLen(Src, B, DL, TLI);
 3295   Value *LenV = ConstantInt::get(SizeTTy, Len);
 3296   Value *Ret = emitMemCpyChk(Dst, Src, LenV, ObjSize, B, DL, TLI);
 3304 Value *FortifiedLibCallSimplifier::optimizeStrpNCpyChk(CallInst *CI,
 3319 Value *FortifiedLibCallSimplifier::optimizeMemCCpyChk(CallInst *CI,
 3328 Value *FortifiedLibCallSimplifier::optimizeSNPrintfChk(CallInst *CI,
 3331     SmallVector<Value *, 8> VariadicArgs(CI->arg_begin() + 5, CI->arg_end());
 3339 Value *FortifiedLibCallSimplifier::optimizeSPrintfChk(CallInst *CI,
 3342     SmallVector<Value *, 8> VariadicArgs(CI->arg_begin() + 4, CI->arg_end());
 3350 Value *FortifiedLibCallSimplifier::optimizeStrCatChk(CallInst *CI,
 3358 Value *FortifiedLibCallSimplifier::optimizeStrLCat(CallInst *CI,
 3367 Value *FortifiedLibCallSimplifier::optimizeStrNCatChk(CallInst *CI,
 3376 Value *FortifiedLibCallSimplifier::optimizeStrLCpyChk(CallInst *CI,
 3385 Value *FortifiedLibCallSimplifier::optimizeVSNPrintfChk(CallInst *CI,
 3394 Value *FortifiedLibCallSimplifier::optimizeVSPrintfChk(CallInst *CI,
 3403 Value *FortifiedLibCallSimplifier::optimizeCall(CallInst *CI) {
lib/Transforms/Utils/SplitModule.cpp
   78                                    const GlobalValue *GV, const Value *V) {
lib/Transforms/Utils/StripGCRelocates.cpp
   56     Value *OrigPtr = GCRel->getDerivedPtr();
   57     Value *ReplaceGCRel = OrigPtr;
lib/Transforms/Utils/SymbolRewriter.cpp
  139     if (Value *T = (M.*Get)(Target))
  193     if (Value *V = (M.*Get)(Name))
lib/Transforms/Utils/VNCoercion.cpp
   15 bool canCoerceMustAliasedValueToLoad(Value *StoredVal, Type *LoadTy,
   52 static T *coerceAvailableValueToLoadTypeHelper(T *StoredVal, Type *LoadedTy,
   52 static T *coerceAvailableValueToLoadTypeHelper(T *StoredVal, Type *LoadedTy,
  150 Value *coerceAvailableValueToLoadType(Value *StoredVal, Type *LoadedTy,
  150 Value *coerceAvailableValueToLoadType(Value *StoredVal, Type *LoadedTy,
  163 static int analyzeLoadFromClobberingWrite(Type *LoadTy, Value *LoadPtr,
  164                                           Value *WritePtr,
  173   Value *StoreBase =
  175   Value *LoadBase = GetPointerBaseWithConstantOffset(LoadPtr, LoadOffset, DL);
  218 int analyzeLoadFromClobberingStore(Type *LoadTy, Value *LoadPtr,
  220   auto *StoredVal = DepSI->getValueOperand();
  236   Value *StorePtr = DepSI->getPointerOperand();
  246 int analyzeLoadFromClobberingLoad(Type *LoadTy, Value *LoadPtr, LoadInst *DepLI,
  257   Value *DepPtr = DepLI->getPointerOperand();
  266   const Value *LoadBase =
  283 int analyzeLoadFromClobberingMemInst(Type *LoadTy, Value *LoadPtr,
  344 static T *getStoreValueForLoadHelper(T *SrcVal, unsigned Offset, Type *LoadTy,
  344 static T *getStoreValueForLoadHelper(T *SrcVal, unsigned Offset, Type *LoadTy,
  387 Value *getStoreValueForLoad(Value *SrcVal, unsigned Offset, Type *LoadTy,
  387 Value *getStoreValueForLoad(Value *SrcVal, unsigned Offset, Type *LoadTy,
  407 Value *getLoadValueForLoad(LoadInst *SrcVal, unsigned Offset, Type *LoadTy,
  422     Value *PtrVal = SrcVal->getPointerOperand();
  441     Value *RV = NewLoad;
  463 T *getMemInstValueForLoadHelper(MemIntrinsic *SrcInst, unsigned Offset,
  474     T *Val = cast<T>(MSI->getValue());
  474     T *Val = cast<T>(MSI->getValue());
  478     T *OneElt = Val;
  484         T *ShVal = Helper.CreateShl(
  492       T *ShVal = Helper.CreateShl(Val, ConstantInt::get(Val->getType(), 1 * 8));
  519 Value *getMemInstValueForLoad(MemIntrinsic *SrcInst, unsigned Offset,
  523   return getMemInstValueForLoadHelper<Value, IRBuilder<>>(SrcInst, Offset,
lib/Transforms/Utils/ValueMapper.cpp
  144   Value *mapValue(const Value *V);
  144   Value *mapValue(const Value *V);
  181   Value *mapBlockAddress(const BlockAddress &BA);
  339 Value *Mapper::mapValue(const Value *V) {
  339 Value *Mapper::mapValue(const Value *V) {
  350     if (Value *NewV = Materializer->materialize(const_cast<Value *>(V))) {
  383       if (Value *LV = mapValue(LAM->getValue())) {
  429   Value *Mapped = nullptr;
  431     Value *Op = C->getOperand(OpNo);
  490 Value *Mapper::mapBlockAddress(const BlockAddress &BA) {
  560                                                   Value *MappedV) {
  855     Value *V = mapValue(Op);
  867       Value *V = mapValue(PN->getIncomingBlock(i));
 1094 Value *ValueMapper::mapValue(const Value &V) {
 1094 Value *ValueMapper::mapValue(const Value &V) {
lib/Transforms/Vectorize/LoadStoreVectorizer.cpp
  107 using ChainID = const Value *;
  129   unsigned getPointerAddressSpace(Value *I);
  149   bool isConsecutiveAccess(Value *A, Value *B);
  149   bool isConsecutiveAccess(Value *A, Value *B);
  150   bool areConsecutivePointers(Value *PtrA, Value *PtrB, APInt PtrDelta,
  150   bool areConsecutivePointers(Value *PtrA, Value *PtrB, APInt PtrDelta,
  152   bool lookThroughComplexAddresses(Value *PtrA, Value *PtrB, APInt PtrDelta,
  152   bool lookThroughComplexAddresses(Value *PtrA, Value *PtrB, APInt PtrDelta,
  154   bool lookThroughSelects(Value *PtrA, Value *PtrB, const APInt &PtrDelta,
  154   bool lookThroughSelects(Value *PtrA, Value *PtrB, const APInt &PtrDelta,
  284   SmallVector<Value *, 8> VL(IL.begin(), IL.end());
  303 unsigned Vectorizer::getPointerAddressSpace(Value *I) {
  312 bool Vectorizer::isConsecutiveAccess(Value *A, Value *B) {
  312 bool Vectorizer::isConsecutiveAccess(Value *A, Value *B) {
  313   Value *PtrA = getLoadStorePointerOperand(A);
  314   Value *PtrB = getLoadStorePointerOperand(B);
  338 bool Vectorizer::areConsecutivePointers(Value *PtrA, Value *PtrB,
  338 bool Vectorizer::areConsecutivePointers(Value *PtrA, Value *PtrB,
  395 bool Vectorizer::lookThroughComplexAddresses(Value *PtrA, Value *PtrB,
  395 bool Vectorizer::lookThroughComplexAddresses(Value *PtrA, Value *PtrB,
  442   Value *ValA = OpA->getOperand(0);
  486 bool Vectorizer::lookThroughSelects(Value *PtrA, Value *PtrB,
  486 bool Vectorizer::lookThroughSelects(Value *PtrA, Value *PtrB,
  571     Value *PtrOperand = getLoadStorePointerOperand(I);
  726 static ChainID getChainID(const Value *Ptr, const DataLayout &DL) {
  727   const Value *ObjPtr = GetUnderlyingObject(Ptr, DL);
  774       Value *Ptr = LI->getPointerOperand();
  821       Value *Ptr = SI->getPointerOperand();
 1045   Value *Vec = UndefValue::get(VecTy);
 1053         Value *Extract = Builder.CreateExtractElement(Store->getValueOperand(),
 1058         Value *Insert =
 1066       Value *Extract = Store->getValueOperand();
 1071       Value *Insert =
 1194   Value *Bitcast =
 1210         Value *V = Builder.CreateExtractElement(LI, Builder.getInt32(NewIdx),
 1230       Value *CV = Chain[I];
 1231       Value *V =
lib/Transforms/Vectorize/LoopVectorizationLegality.cpp
  329   Value *CondOp0 = LatchCmp->getOperand(0);
  330   Value *CondOp1 = LatchCmp->getOperand(1);
  331   Value *IVUpdate = IV->getIncomingValueForBlock(Latch);
  361     for (Value *V : Phi.incoming_values())
  392                                SmallPtrSetImpl<Value *> &AllowedExit) {
  408 int LoopVectorizationLegality::isConsecutivePtr(Value *Ptr) {
  419 bool LoopVectorizationLegality::isUniform(Value *V) {
  493     SmallPtrSetImpl<Value *> &AllowedExit) {
  851 bool LoopVectorizationLegality::isInductionPhi(const Value *V) {
  852   Value *In0 = const_cast<Value *>(V);
  860 bool LoopVectorizationLegality::isCastedInductionVariable(const Value *V) {
  865 bool LoopVectorizationLegality::isInductionVariable(const Value *V) {
  878     BasicBlock *BB, SmallPtrSetImpl<Value *> &SafePtrs, bool PreserveGuards) {
  883     for (Value *Operand : I.operands()) {
  938   SmallPtrSet<Value *, 8> SafePointes;
  944         if (auto *Ptr = getLoadStorePointerOperand(&I))
 1198   SmallPtrSet<const Value *, 8> ReductionLiveOuts;
 1204   for (auto *AE : AllowedExit) {
 1222   SmallPtrSet<Value *, 8> SafePointers;
lib/Transforms/Vectorize/LoopVectorizationPlanner.h
  213     Value *getOrCreateVectorValues(Value *V, unsigned Part) override;
  213     Value *getOrCreateVectorValues(Value *V, unsigned Part) override;
  276   buildVPlanWithVPRecipes(VFRange &Range, SmallPtrSetImpl<Value *> &NeedDef,
lib/Transforms/Vectorize/LoopVectorize.cpp
  307 static Type *getMemInstValueType(Value *I) {
  340 static Value *addFastMathFlag(Value *V) {
  340 static Value *addFastMathFlag(Value *V) {
  346 static Value *addFastMathFlag(Value *V, FastMathFlags FMF) {
  346 static Value *addFastMathFlag(Value *V, FastMathFlags FMF) {
  429   using VectorParts = SmallVector<Value *, 2>;
  469   Value *getOrCreateVectorValue(Value *V, unsigned Part);
  469   Value *getOrCreateVectorValue(Value *V, unsigned Part);
  475   Value *getOrCreateScalarValue(Value *V, const VPIteration &Instance);
  475   Value *getOrCreateScalarValue(Value *V, const VPIteration &Instance);
  478   void packScalarIntoVectorValue(Value *V, const VPIteration &Instance);
  492   void setDebugLocFromInst(IRBuilder<> &B, const Value *Ptr);
  507   using ScalarParts = SmallVector<SmallVector<Value *, 4>, 2>;
  511                     Value *CountRoundDown, Value *EndValue,
  511                     Value *CountRoundDown, Value *EndValue,
  515   PHINode *createInductionVariable(Loop *L, Value *Start, Value *End,
  515   PHINode *createInductionVariable(Loop *L, Value *Start, Value *End,
  516                                    Value *Step, Instruction *DL);
  552   virtual Value *getBroadcastInstrs(Value *V);
  552   virtual Value *getBroadcastInstrs(Value *V);
  557   virtual Value *getStepVector(Value *Val, int StartIdx, Value *Step,
  557   virtual Value *getStepVector(Value *Val, int StartIdx, Value *Step,
  557   virtual Value *getStepVector(Value *Val, int StartIdx, Value *Step,
  566   void buildScalarSteps(Value *ScalarIV, Value *Step, Instruction *EntryVal,
  566   void buildScalarSteps(Value *ScalarIV, Value *Step, Instruction *EntryVal,
  575                                        Value *Step, Instruction *EntryVal);
  604                                              Value *VectorLoopValue,
  609   virtual Value *reverseVector(Value *Vec);
  609   virtual Value *reverseVector(Value *Vec);
  612   Value *getOrCreateTripCount(Loop *NewLoop);
  615   Value *getOrCreateVectorTripCount(Loop *NewLoop);
  619   Value *createBitOrPointerCast(Value *V, VectorType *DstVTy,
  619   Value *createBitOrPointerCast(Value *V, VectorType *DstVTy,
  639   Value *emitTransformedIndex(IRBuilder<> &B, Value *Index, ScalarEvolution *SE,
  639   Value *emitTransformedIndex(IRBuilder<> &B, Value *Index, ScalarEvolution *SE,
  659   void addMetadata(ArrayRef<Value *> To, Instruction *From);
  747   Value *TripCount = nullptr;
  750   Value *VectorTripCount = nullptr;
  763   DenseMap<PHINode *, Value *> IVEndValues;
  783   Value *getBroadcastInstrs(Value *V) override;
  783   Value *getBroadcastInstrs(Value *V) override;
  784   Value *getStepVector(Value *Val, int StartIdx, Value *Step,
  784   Value *getStepVector(Value *Val, int StartIdx, Value *Step,
  784   Value *getStepVector(Value *Val, int StartIdx, Value *Step,
  787   Value *reverseVector(Value *Vec) override;
  787   Value *reverseVector(Value *Vec) override;
  811 void InnerLoopVectorizer::setDebugLocFromInst(IRBuilder<> &B, const Value *Ptr) {
  854   Value *CodeRegion = TheLoop->getHeader();
  914 void InnerLoopVectorizer::addMetadata(ArrayRef<Value *> To,
  916   for (Value *V : To) {
 1168     Value *Op = Trunc->getOperand(0);
 1194   bool isLegalMaskedStore(Type *DataType, Value *Ptr, MaybeAlign Alignment) {
 1201   bool isLegalMaskedLoad(Type *DataType, Value *Ptr, MaybeAlign Alignment) {
 1220   bool isLegalGatherOrScatter(Value *V) {
 1444   bool needsExtract(Value *V, unsigned VF) const {
 1460   SmallVector<Value *, 4> filterExtractingOperands(Instruction::op_range Ops,
 1504   SmallPtrSet<const Value *, 16> ValuesToIgnore;
 1507   SmallPtrSet<const Value *, 16> VecValuesToIgnore;
 1655 Value *InnerLoopVectorizer::getBroadcastInstrs(Value *V) {
 1655 Value *InnerLoopVectorizer::getBroadcastInstrs(Value *V) {
 1669   Value *Shuf = Builder.CreateVectorSplat(VF, V, "broadcast");
 1675     const InductionDescriptor &II, Value *Step, Instruction *EntryVal) {
 1678   Value *Start = II.getStartValue();
 1690   Value *SplatStart = Builder.CreateVectorSplat(VF, Start);
 1691   Value *SteppedStart =
 1708   Value *ConstVF = getSignedIntOrFpConstant(Step->getType(), VF);
 1709   Value *Mul = addFastMathFlag(Builder.CreateBinOp(MulOp, Step, ConstVF));
 1716   Value *SplatVF = isa<Constant>(Mul)
 1768     Value *VectorLoopVal, unsigned Part, unsigned Lane) {
 1806   Value *ScalarIV = nullptr;
 1825   Value *Step = nullptr;
 1870     Value *Broadcasted = getBroadcastInstrs(ScalarIV);
 1872       Value *EntryPart =
 1891 Value *InnerLoopVectorizer::getStepVector(Value *Val, int StartIdx, Value *Step,
 1891 Value *InnerLoopVectorizer::getStepVector(Value *Val, int StartIdx, Value *Step,
 1891 Value *InnerLoopVectorizer::getStepVector(Value *Val, int StartIdx, Value *Step,
 1936   Value *MulOp = Builder.CreateFMul(Cv, Step);
 1941   Value *BOp = Builder.CreateBinOp(BinOp, Val, MulOp, "induction");
 1947 void InnerLoopVectorizer::buildScalarSteps(Value *ScalarIV, Value *Step,
 1947 void InnerLoopVectorizer::buildScalarSteps(Value *ScalarIV, Value *Step,
 1980       auto *Mul = addFastMathFlag(Builder.CreateBinOp(MulOp, StartIdx, Step));
 1981       auto *Add = addFastMathFlag(Builder.CreateBinOp(AddOp, ScalarIV, Mul));
 1988 Value *InnerLoopVectorizer::getOrCreateVectorValue(Value *V, unsigned Part) {
 1988 Value *InnerLoopVectorizer::getOrCreateVectorValue(Value *V, unsigned Part) {
 2006     Value *ScalarValue = VectorLoopValueMap.getScalarValue(V, {Part, 0});
 2038     Value *VectorValue = nullptr;
 2044       Value *Undef = UndefValue::get(VectorType::get(V->getType(), VF));
 2056   Value *B = getBroadcastInstrs(V);
 2061 Value *
 2062 InnerLoopVectorizer::getOrCreateScalarValue(Value *V,
 2083   auto *U = getOrCreateVectorValue(V, Instance.Part);
 2096     Value *V, const VPIteration &Instance) {
 2101   Value *ScalarInst = VectorLoopValueMap.getScalarValue(V, Instance);
 2102   Value *VectorValue = VectorLoopValueMap.getVectorValue(V, Instance.Part);
 2108 Value *InnerLoopVectorizer::reverseVector(Value *Vec) {
 2108 Value *InnerLoopVectorizer::reverseVector(Value *Vec) {
 2169   Value *Ptr = getLoadStorePointerOperand(Instr);
 2179   SmallVector<Value *, 2> NewPtrs;
 2205     Value *NewPtr = getOrCreateScalarValue(Ptr, {Part, 0});
 2227   Value *UndefVec = UndefValue::get(VecTy);
 2229   Value *MaskForGaps = nullptr;
 2238     SmallVector<Value *, 2> NewLoads;
 2244         Value *GroupMask = MaskForGaps;
 2248           Value *ShuffledMask = Builder.CreateShuffleVector(
 2277         Value *StridedVec = Builder.CreateShuffleVector(
 2301     SmallVector<Value *, 4> StoredVecs;
 2307       Value *StoredVec = getOrCreateVectorValue(
 2321     Value *WideVec = concatenateVectors(Builder, StoredVecs);
 2325     Value *IVec = Builder.CreateShuffleVector(WideVec, UndefVec, IMask,
 2332       Value *ShuffledMask = Builder.CreateShuffleVector(
 2362   Value *Ptr = getLoadStorePointerOperand(Instr);
 2427       Value *StoredVal = getOrCreateVectorValue(SI->getValueOperand(), Part);
 2429         Value *MaskPart = isMaskRequired ? Mask[Part] : nullptr;
 2430         Value *VectorGep = getOrCreateVectorValue(Ptr, Part);
 2441         auto *VecPtr = CreateVecPtr(Part, Ptr);
 2458     Value *NewLI;
 2460       Value *MaskPart = isMaskRequired ? Mask[Part] : nullptr;
 2461       Value *VectorGep = getOrCreateVectorValue(Ptr, Part);
 2466       auto *VecPtr = CreateVecPtr(Part, Ptr);
 2501     auto *NewOp = getOrCreateScalarValue(Instr->getOperand(op), Instance);
 2522 PHINode *InnerLoopVectorizer::createInductionVariable(Loop *L, Value *Start,
 2523                                                       Value *End, Value *Step,
 2523                                                       Value *End, Value *Step,
 2541   Value *Next = Builder.CreateAdd(Induction, Step, "index.next");
 2545   Value *ICmp = Builder.CreateICmpEQ(Next, End);
 2554 Value *InnerLoopVectorizer::getOrCreateTripCount(Loop *L) {
 2601 Value *InnerLoopVectorizer::getOrCreateVectorTripCount(Loop *L) {
 2605   Value *TC = getOrCreateTripCount(L);
 2628   Value *R = Builder.CreateURem(TC, Step, "n.mod.vf");
 2638     auto *IsZero = Builder.CreateICmpEQ(R, ConstantInt::get(R->getType(), 0));
 2647 Value *InnerLoopVectorizer::createBitOrPointerCast(Value *V, VectorType *DstVTy,
 2647 Value *InnerLoopVectorizer::createBitOrPointerCast(Value *V, VectorType *DstVTy,
 2673   Value *CastVal = Builder.CreateBitOrPointerCast(V, VecIntTy);
 2679   Value *Count = getOrCreateTripCount(L);
 2692   Value *CheckMinIters = Builder.getFalse();
 2718   Value *SCEVCheck =
 2795 Value *InnerLoopVectorizer::emitTransformedIndex(
 2796     IRBuilder<> &B, Value *Index, ScalarEvolution *SE, const DataLayout &DL,
 2839     auto *Offset = CreateMul(
 2859     Value *StepValue = cast<SCEVUnknown>(Step)->getValue();
 2865     Value *MulExp = B.CreateFMul(StepValue, Index);
 2870     Value *BOp = B.CreateBinOp(InductionBinOp->getOpcode(), StartValue, MulExp,
 2961   Value *Count = getOrCreateTripCount(Lp);
 2963   Value *StartIdx = ConstantInt::get(IdxTy, 0);
 2984   Value *CountRoundDown = getOrCreateVectorTripCount(Lp);
 3011     Value *&EndValue = IVEndValues[OrigPhi];
 3020       Value *CRD = B.CreateCast(CastOp, CountRoundDown, StepType, "cast.crd");
 3051   Value *CmpN = Builder.getTrue();
 3107                                        Value *CountRoundDown, Value *EndValue,
 3107                                        Value *CountRoundDown, Value *EndValue,
 3116   DenseMap<Value *, Value *> MissingVals;
 3116   DenseMap<Value *, Value *> MissingVals;
 3120   Value *PostInc = OrigPhi->getIncomingValueForBlock(OrigLoop->getLoopLatch());
 3140       Value *CountMinusOne = B.CreateSub(
 3142       Value *CMO =
 3148       Value *Escape = emitTransformedIndex(B, CMO, PSE.getSE(), DL, II);
 3273   SmallVector<Value *, 4> Operands(CI->arg_operands());
 3292   SmallPtrSet<Value *, 4> Erased;
 3300       Value *I = getOrCreateVectorValue(KV.first, Part);
 3322       Value *NewI = nullptr;
 3359         auto *O0 = B.CreateZExtOrTrunc(
 3362         auto *O1 = B.CreateZExtOrTrunc(
 3371         auto *O0 = B.CreateZExtOrTrunc(
 3373         auto *O1 = B.CreateZExtOrTrunc(IE->getOperand(1), ScalarTruncatedTy);
 3377         auto *O0 = B.CreateZExtOrTrunc(
 3387       Value *Res = B.CreateZExtOrTrunc(NewI, OriginalTy);
 3403       Value *I = getOrCreateVectorValue(KV.first, Part);
 3406         Value *NewI = Inst->getOperand(0);
 3528   auto *ScalarInit = Phi->getIncomingValueForBlock(Preheader);
 3529   auto *Previous = Phi->getIncomingValueForBlock(Latch);
 3532   auto *VectorInit = ScalarInit;
 3552   Value *PreviousLastPart = getOrCreateVectorValue(Previous, UF - 1);
 3575   Value *Incoming = VecPhi;
 3579     Value *PreviousPart = getOrCreateVectorValue(Previous, Part);
 3580     Value *PhiPart = VectorLoopValueMap.getVectorValue(Phi, Part);
 3581     auto *Shuffle =
 3596   auto *ExtractForScalar = Incoming;
 3607   Value *ExtractForPhiUsedOutsideLoop = nullptr;
 3622     auto *Incoming = BB == LoopMiddleBlock ? ExtractForScalar : ScalarInit;
 3650   TrackingVH<Value> ReductionStartValue = RdxDesc.getRecurrenceStartValue();
 3667   Value *Identity;
 3668   Value *VectorStart;
 3702   Value *LoopVal = Phi->getIncomingValueForBlock(Latch);
 3704     Value *VecRdxPhi = getOrCreateVectorValue(Phi, Part);
 3705     Value *Val = getOrCreateVectorValue(LoopVal, Part);
 3708     Value *StartVal = (Part == 0) ? VectorStart : Identity;
 3727       Value *VecLoopExitInst =
 3729       Value *Sel = nullptr;
 3752       Value *Trunc = Builder.CreateTrunc(RdxParts[Part], RdxVecTy);
 3753       Value *Extnd = RdxDesc.isSigned() ? Builder.CreateSExt(Trunc, VecTy)
 3755       for (Value::user_iterator UI = RdxParts[Part]->user_begin();
 3772   Value *ReducedPartRdx = VectorLoopValueMap.getVectorValue(LoopExitInst, 0);
 3784     Value *RdxPart = VectorLoopValueMap.getVectorValue(LoopExitInst, Part);
 3846       auto *IncomingValue = LCSSAPhi.getIncomingValue(0);
 3857       Value *lastIncomingValue =
 3870   SetVector<Value *> Worklist(PredInst->op_begin(), PredInst->op_end());
 3954       Value *ScIncV =
 3958       Value *NewIncV = getOrCreateVectorValue(ScIncV, 0);
 3974     Value *VecPhi = Builder.CreatePHI(VecTy, PN->getNumOperands(), "vec.phi");
 3993       Value *EntryPart = PHINode::Create(
 4021     Value *PtrInd = Induction;
 4032         Value *GlobalIdx = Builder.CreateAdd(PtrInd, Idx);
 4033         Value *SclrGep =
 4057   Value *Divisor = I.getOperand(1);
 4090         Value *EntryPart = Builder.CreateVectorSplat(VF, Clone);
 4105         auto *Ptr =
 4112         SmallVector<Value *, 4> Indices;
 4122         auto *NewGEP =
 4159       SmallVector<Value *, 2> Ops;
 4160       for (Value *Op : I.operands())
 4163       Value *V = Builder.CreateNAryOp(I.getOpcode(), Ops);
 4189     auto *ScalarCond = getOrCreateScalarValue(I.getOperand(0), {0, 0});
 4192       Value *Cond = getOrCreateVectorValue(I.getOperand(0), Part);
 4193       Value *Op0 = getOrCreateVectorValue(I.getOperand(1), Part);
 4194       Value *Op1 = getOrCreateVectorValue(I.getOperand(2), Part);
 4195       Value *Sel =
 4211       Value *A = getOrCreateVectorValue(Cmp->getOperand(0), Part);
 4212       Value *B = getOrCreateVectorValue(Cmp->getOperand(1), Part);
 4213       Value *C = nullptr;
 4249       Value *A = getOrCreateVectorValue(CI->getOperand(0), Part);
 4250       Value *Cast = Builder.CreateCast(CI->getOpcode(), A, DestTy);
 4270     for (Value *ArgOperand : CI->arg_operands())
 4286       SmallVector<Value *, 4> Args;
 4288         Value *Arg = CI->getArgOperand(i);
 4555     auto *Ptr = getLoadStorePointerOperand(I);
 4623   auto *Ptr = getLoadStorePointerOperand(I);
 5333   SmallPtrSet<Value *, 8> LoopInvariants;
 5340       for (Value *U : I.operands()) {
 5699               Value *Ptr,
 5713     Value *Opd = Gep->getOperand(i);
 5735   Value *Ptr = getLoadStorePointerOperand(I);
 5774   Value *Ptr = getLoadStorePointerOperand(I);
 5821   Value *Ptr = getLoadStorePointerOperand(I);
 5945       Value *Ptr =  getLoadStorePointerOperand(&I);
 6205     Value *Op2 = I->getOperand(1);
 6212     SmallVector<const Value *, 4> Operands(I->operand_values());
 6354   if (auto *Ptr = getLoadStorePointerOperand(Inst))
 6559 Value *InnerLoopUnroller::reverseVector(Value *Vec) { return Vec; }
 6559 Value *InnerLoopUnroller::reverseVector(Value *Vec) { return Vec; }
 6561 Value *InnerLoopUnroller::getBroadcastInstrs(Value *V) { return V; }
 6561 Value *InnerLoopUnroller::getBroadcastInstrs(Value *V) { return V; }
 6563 Value *InnerLoopUnroller::getStepVector(Value *Val, int StartIdx, Value *Step,
 6563 Value *InnerLoopUnroller::getStepVector(Value *Val, int StartIdx, Value *Step,
 6563 Value *InnerLoopUnroller::getStepVector(Value *Val, int StartIdx, Value *Step,
 6573     Value *MulOp = addFastMathFlag(Builder.CreateFMul(C, Step));
 7050   SmallPtrSet<Value *, 1> NeedDef;
 7091     VFRange &Range, SmallPtrSetImpl<Value *> &NeedDef,
 7107   for (Value *V : NeedDef)
 7260 Value* LoopVectorizationPlanner::VPCallbackILV::
 7261 getOrCreateVectorValues(Value *V, unsigned Part) {
 7316       Value *In0 =
 7323         Value *Cond = State.get(User->getOperand(In), Part);
 7353         Value *Undef =
 7377   Value *ConditionBit = nullptr;
 7414     Value *VectorValue = State.ValueMap.getVectorValue(PredInst, Part);
lib/Transforms/Vectorize/SLPVectorizer.cpp
  181 static bool allSameBlock(ArrayRef<Value *> VL) {
  199 static bool allConstant(ArrayRef<Value *> VL) {
  202   for (Value *i : VL)
  209 static bool isSplat(ArrayRef<Value *> VL) {
  265 isShuffle(ArrayRef<Value *> VL) {
  268   Value *Vec1 = nullptr;
  269   Value *Vec2 = nullptr;
  274     auto *Vec = EI->getVectorOperand();
  320   Value *OpValue = nullptr;
  344   InstructionsState(Value *OpValue, Instruction *MainOp, Instruction *AltOp)
  353 static Value *isOneOf(const InstructionsState &S, Value *Op) {
  353 static Value *isOneOf(const InstructionsState &S, Value *Op) {
  363 static InstructionsState getSameOpcode(ArrayRef<Value *> VL,
  410 static bool allSameType(ArrayRef<Value *> VL) {
  439 static bool InTreeUserNeedToExtract(Value *Scalar, Instruction *UserInst,
  495   using ValueList = SmallVector<Value *, 8>;
  497   using ValueSet = SmallPtrSet<Value *, 16>;
  500       MapVector<Value *, SmallVector<Instruction *, 2>>;
  528   Value *vectorizeTree();
  533   Value *vectorizeTree(ExtraValueToDebugLocsMap &ExternallyUsedValues);
  545   void buildTree(ArrayRef<Value *> Roots,
  546                  ArrayRef<Value *> UserIgnoreLst = None);
  552   void buildTree(ArrayRef<Value *> Roots,
  596   unsigned getVectorElementSize(Value *V) const;
  689       OperandData(Value *V, bool APO, bool IsUsed)
  692       Value *V = nullptr;
  758       Value *OpLastLane = getData(OpIdx, LastLane).V;
  781         Value *Op = OpData.V;
  801             Value *OpLeft = (LeftToRight) ? OpLastLane : Op;
  802             Value *OpRight = (LeftToRight) ? Op : OpLastLane;
  886     void appendOperandsOfVL(ArrayRef<Value *> VL) {
  923     Value *getValue(unsigned OpIdx, unsigned Lane) const {
  936     bool shouldBroadcast(Value *Op, unsigned OpIdx, unsigned Lane) {
  961     VLOperands(ArrayRef<Value *> RootVL, const DataLayout &DL,
 1008         Value *OpLane0 = getValue(OpIdx, FirstLane);
 1117           if (Value *V = OpData.V)
 1137   void eraseInstructions(ArrayRef<Value *> AV);
 1149   void buildTree_rec(ArrayRef<Value *> Roots, unsigned Depth,
 1157   bool canReuseExtract(ArrayRef<Value *> VL, Value *OpValue,
 1157   bool canReuseExtract(ArrayRef<Value *> VL, Value *OpValue,
 1161   Value *vectorizeTree(TreeEntry *E);
 1164   Value *vectorizeTree(ArrayRef<Value *> VL);
 1164   Value *vectorizeTree(ArrayRef<Value *> VL);
 1173   int getGatherCost(ArrayRef<Value *> VL) const;
 1180   Value *Gather(ArrayRef<Value *> VL, VectorType *Ty);
 1180   Value *Gather(ArrayRef<Value *> VL, VectorType *Ty);
 1188   static void reorderInputsAccordingToOpcode(ArrayRef<Value *> VL,
 1189                                              SmallVectorImpl<Value *> &Left,
 1190                                              SmallVectorImpl<Value *> &Right,
 1198     bool isSame(ArrayRef<Value *> VL) const {
 1211     Value *VectorizedValue = nullptr;
 1249     void setOperand(unsigned OpIdx, ArrayRef<Value *> OpVL) {
 1286     Value *getSingleOperand(unsigned OpIdx) const {
 1306     Value *isOneOf(Value *Op) const {
 1306     Value *isOneOf(Value *Op) const {
 1350         for (const Value *V : Operands[OpI])
 1354       for (Value *V : Scalars)
 1385   TreeEntry *newTreeEntry(ArrayRef<Value *> VL, Optional<ScheduleData *> Bundle,
 1439   TreeEntry *getTreeEntry(Value *V) {
 1446   const TreeEntry *getTreeEntry(Value *V) const {
 1454   SmallDenseMap<Value*, TreeEntry *> ScalarToTreeEntry;
 1461     ExternalUser(Value *S, llvm::User *U, int L)
 1465     Value *Scalar;
 1526   SmallPtrSet<const Value *, 32> EphValues;
 1545     void init(int BlockSchedulingRegionID, Value *OpVal) {
 1661     Value *OpValue = nullptr;
 1705     ScheduleData *getScheduleData(Value *V) {
 1712     ScheduleData *getScheduleData(Value *V, Value *Key) {
 1712     ScheduleData *getScheduleData(Value *V, Value *Key) {
 1795     void doForAllOpcodes(Value *V,
 1826     tryScheduleBundle(ArrayRef<Value *> VL, BoUpSLP *SLP,
 1830     void cancelScheduling(ArrayRef<Value *> VL, Value *OpValue);
 1830     void cancelScheduling(ArrayRef<Value *> VL, Value *OpValue);
 1837     bool extendSchedulingRegion(Value *V, const InstructionsState &S);
 1868     DenseMap<Value *, ScheduleData *> ScheduleDataMap;
 1871     DenseMap<Value *, SmallDenseMap<Value *, ScheduleData *>>
 1871     DenseMap<Value *, SmallDenseMap<Value *, ScheduleData *>>
 1916   ArrayRef<Value *> UserIgnoreList;
 1975   MapVector<Value *, std::pair<uint64_t, bool>> MinBWs;
 2079       Value *Undef = UndefValue::get(Pair.getFirst()->getType());
 2091 void BoUpSLP::eraseInstructions(ArrayRef<Value *> AV) {
 2092   for (auto *V : AV) {
 2098 void BoUpSLP::buildTree(ArrayRef<Value *> Roots,
 2099                         ArrayRef<Value *> UserIgnoreLst) {
 2104 void BoUpSLP::buildTree(ArrayRef<Value *> Roots,
 2123       Value *Scalar = Entry->Scalars[Lane];
 2147           Value *UseScalar = UseEntry->Scalars[0];
 2172 void BoUpSLP::buildTree_rec(ArrayRef<Value *> VL, unsigned Depth,
 2208   for (Value *V : VL) {
 2234   for (Value *V : VL) {
 2249   for (Value *V : VL) {
 2272   SmallVector<Value *, 4> UniqueValues;
 2273   DenseMap<Value *, unsigned> UniquePositions;
 2274   for (Value *V : VL) {
 2343         for (Value *j : VL)
 2418       SmallVector<Value *, 4> PointerOps(VL.size());
 2420       for (Value *V : VL) {
 2436         Value *Ptr0;
 2437         Value *PtrN;
 2492       for (Value *V : VL) {
 2511         for (Value *V : VL)
 2524       for (Value *V : VL) {
 2549         for (Value *V : VL) {
 2551           Value *LHS = Cmp->getOperand(0);
 2552           Value *RHS = Cmp->getOperand(1);
 2605         for (Value *j : VL)
 2614       for (Value *V : VL) {
 2627       for (Value *V : VL) {
 2640       for (Value *V : VL) {
 2659         for (Value *V : VL)
 2682       for (Value *V : VL)
 2703       SmallVector<Value*, 4> ScalarArgs(NumArgs, nullptr);
 2707       for (Value *V : VL) {
 2723             Value *A1J = CI2->getArgOperand(j);
 2755         for (Value *V : VL) {
 2792         for (Value *V : VL)
 2833 bool BoUpSLP::canReuseExtract(ArrayRef<Value *> VL, Value *OpValue,
 2833 bool BoUpSLP::canReuseExtract(ArrayRef<Value *> VL, Value *OpValue,
 2841   Value *Vec = E0->getOperand(0);
 2908   ArrayRef<Value*> VL = E->Scalars;
 2942         for (auto *V : VL) {
 2986         for (Value *V : VL) {
 3136       SmallVector<const Value *, 4> Operands(VL0->operand_values());
 3214       SmallVector<Value *, 4> Args(CI->arg_operands());
 3238         for (Value *V : VL) {
 3244       for (Value *V : VL) {
 3301   Value *FirstReduced = VectorizableTree[0]->Scalars[0];
 3306   Value *ZextLoad = FirstReduced;
 3312   Value *LoadPtr;
 3459   SmallPtrSet<Value *, 16> ExtractCostCalculated;
 3476     auto *ScalarRoot = VectorizableTree[0]->Scalars[0];
 3519 int BoUpSLP::getGatherCost(ArrayRef<Value *> VL) const {
 3529   DenseSet<Value *> UniqueElements;
 3542     ArrayRef<Value *> VL, SmallVectorImpl<Value *> &Left,
 3542     ArrayRef<Value *> VL, SmallVectorImpl<Value *> &Left,
 3543     SmallVectorImpl<Value *> &Right, const DataLayout &DL,
 3600     SmallPtrSet<Value *, 16> Bundle(E->Scalars.begin(), E->Scalars.end());
 3616 Value *BoUpSLP::Gather(ArrayRef<Value *> VL, VectorType *Ty) {
 3616 Value *BoUpSLP::Gather(ArrayRef<Value *> VL, VectorType *Ty) {
 3617   Value *Vec = UndefValue::get(Ty);
 3650 Value *BoUpSLP::vectorizeTree(ArrayRef<Value *> VL) {
 3650 Value *BoUpSLP::vectorizeTree(ArrayRef<Value *> VL) {
 3655         Value *V = vectorizeTree(E);
 3682   SmallVector<Value *, 4> UniqueValues;
 3684     DenseMap<Value *, unsigned> UniquePositions;
 3685     for (Value *V : VL) {
 3701   Value *V = Gather(VL, VecTy);
 3722 Value *BoUpSLP::vectorizeTree(TreeEntry *E) {
 3740     auto *V = Gather(E->Scalars, VecTy);
 3761       Value *V = NewPhi;
 3783         Value *Vec = vectorizeTree(E->getOperand(i));
 3794         Value *V = E->getSingleOperand(0);
 3813       auto *V = Gather(E->Scalars, VecTy);
 3830         Value *Ptr = Builder.CreateBitCast(LI->getOperand(0), PtrTy);
 3832         Value *NewV = propagateMetadata(V, E->Scalars);
 3848       auto *V = Gather(E->Scalars, VecTy);
 3874       Value *InVec = vectorizeTree(E->getOperand(0));
 3882       Value *V = Builder.CreateCast(CI->getOpcode(), InVec, VecTy);
 3895       Value *L = vectorizeTree(E->getOperand(0));
 3896       Value *R = vectorizeTree(E->getOperand(1));
 3904       Value *V;
 3922       Value *Cond = vectorizeTree(E->getOperand(0));
 3923       Value *True = vectorizeTree(E->getOperand(1));
 3924       Value *False = vectorizeTree(E->getOperand(2));
 3931       Value *V = Builder.CreateSelect(Cond, True, False);
 3943       Value *Op = vectorizeTree(E->getOperand(0));
 3950       Value *V = Builder.CreateUnOp(
 3985       Value *LHS = vectorizeTree(E->getOperand(0));
 3986       Value *RHS = vectorizeTree(E->getOperand(1));
 3993       Value *V = Builder.CreateBinOp(
 4021       Value *VecPtr = Builder.CreateBitCast(LI->getPointerOperand(),
 4027       Value *PO = LI->getPointerOperand();
 4036       Value *V = propagateMetadata(LI, E->Scalars);
 4059       Value *VecValue = vectorizeTree(E->getOperand(0));
 4060       Value *ScalarPtr = SI->getPointerOperand();
 4061       Value *VecPtr = Builder.CreateBitCast(ScalarPtr, VecTy->getPointerTo(AS));
 4074       Value *V = propagateMetadata(ST, E->Scalars);
 4086       Value *Op0 = vectorizeTree(E->getOperand(0));
 4088       std::vector<Value *> OpVecs;
 4091         Value *OpVec = vectorizeTree(E->getOperand(j));
 4095       Value *V = Builder.CreateGEP(
 4117       Value *ScalarArg = nullptr;
 4118       std::vector<Value *> OpVecs;
 4130         Value *OpVec = vectorizeTree(E->getOperand(j));
 4141       Value *V = Builder.CreateCall(CF, OpVecs, OpBundles);
 4166       Value *LHS = nullptr, *RHS = nullptr;
 4181       Value *V0, *V1;
 4212       Value *ShuffleMask = ConstantVector::get(Mask);
 4216       Value *V = Builder.CreateShuffleVector(V0, V1, ShuffleMask);
 4234 Value *BoUpSLP::vectorizeTree() {
 4239 Value *
 4247   auto *VectorRoot = vectorizeTree(VectorizableTree[0].get());
 4252   auto *ScalarRoot = VectorizableTree[0]->Scalars[0];
 4259     auto *Trunc = Builder.CreateTrunc(VectorRoot, VecTy);
 4278     Value *Scalar = ExternalUse.Scalar;
 4289     Value *Vec = E->VectorizedValue;
 4292     Value *Lane = Builder.getInt32(ExternalUse.Lane);
 4306       Value *Ex = Builder.CreateExtractElement(Vec, Lane);
 4331             Value *Ex = Builder.CreateExtractElement(Vec, Lane);
 4339         Value *Ex = Builder.CreateExtractElement(Vec, Lane);
 4346       Value *Ex = Builder.CreateExtractElement(Vec, Lane);
 4367       Value *Scalar = Entry->Scalars[Lane];
 4479 BoUpSLP::BlockScheduling::tryScheduleBundle(ArrayRef<Value *> VL, BoUpSLP *SLP,
 4493   for (Value *V : VL) {
 4498   for (Value *V : VL) {
 4568 void BoUpSLP::BlockScheduling::cancelScheduling(ArrayRef<Value *> VL,
 4569                                                 Value *OpValue) {
 4604 bool BoUpSLP::BlockScheduling::extendSchedulingRegion(Value *V,
 4923 unsigned BoUpSLP::getVectorElementSize(Value *V) const {
 4985 static bool collectValuesToDemote(Value *V, SmallPtrSetImpl<Value *> &Expr,
 4985 static bool collectValuesToDemote(Value *V, SmallPtrSetImpl<Value *> &Expr,
 4986                                   SmallVectorImpl<Value *> &ToDemote,
 4987                                   SmallVectorImpl<Value *> &Roots) {
 5037     for (Value *IncValue : PN->incoming_values())
 5071   SmallPtrSet<Value *, 32> Expr(TreeRoot.begin(), TreeRoot.end());
 5086   for (auto *Root : TreeRoot)
 5093   SmallVector<Value *, 32> ToDemote;
 5094   SmallVector<Value *, 4> Roots;
 5095   for (auto *Root : TreeRoot)
 5106   for (auto *Root : TreeRoot) {
 5142     for (auto *Scalar : ToDemote) {
 5183   for (auto *Scalar : ToDemote)
 5334 bool SLPVectorizerPass::vectorizeStoreChain(ArrayRef<Value *> Chain, BoUpSLP &R,
 5349     ArrayRef<Value *> Operands = Chain.slice(i, VF);
 5495 bool SLPVectorizerPass::tryToVectorizePair(Value *A, Value *B, BoUpSLP &R) {
 5495 bool SLPVectorizerPass::tryToVectorizePair(Value *A, Value *B, BoUpSLP &R) {
 5498   Value *VL[] = { A, B };
 5502 bool SLPVectorizerPass::tryToVectorizeList(ArrayRef<Value *> VL, BoUpSLP &R,
 5529   for (Value *V : VL) {
 5569       ArrayRef<Value *> Ops = VL.slice(I, OpsWidth);
 5590         Value *ReorderedOps[] = {Ops[1], Ops[0]};
 5642   Value *P = I->getParent();
 5688 static Value *createRdxShuffleMask(unsigned VecLen, unsigned NumEltsToRdx,
 5738   using ReductionOpsType = SmallVector<Value *, 16>;
 5741   SmallVector<Value *, 32> ReducedVals;
 5743   MapVector<Instruction *, Value *> ExtraArgs;
 5761     Value *LHS = nullptr;
 5764     Value *RHS = nullptr;
 5788     Value *createOp(IRBuilder<> &Builder, const Twine &Name) const {
 5791       Value *Cmp = nullptr;
 5823     explicit OperationData(Value *V) {
 5830     OperationData(unsigned Opcode, Value *LHS, Value *RHS, ReductionKind Kind,
 5830     OperationData(unsigned Opcode, Value *LHS, Value *RHS, ReductionKind Kind,
 5873     bool hasSameParent(Instruction *I, Value *P, bool IsRedOp) const {
 6005     Value *getLHS() const { return LHS; }
 6006     Value *getRHS() const { return RHS; }
 6024     Value *createOp(IRBuilder<> &Builder, const Twine &Name,
 6028       auto *Op = createOp(Builder, Name);
 6048     Value *createOp(IRBuilder<> &Builder, const Twine &Name,
 6052       auto *Op = createOp(Builder, Name);
 6117                     Value *ExtraArg) {
 6134   static OperationData getOperationData(Value *V) {
 6138     Value *LHS;
 6139     Value *RHS;
 6182         Value *Cond = Select->getCondition();
 6315       Value *NextV = TreeN->getOperand(EdgeToVist);
 6386     Value *VectorizedTree = nullptr;
 6406     SmallVector<Value *, 16> IgnoreList;
 6416         SmallVector<Value *, 4> ReorderedOps(VL.size());
 6456       Value *VectorizedRoot = V.vectorizeTree(ExternallyUsedValues);
 6460       Value *ReducedSubTree =
 6510   int getReductionCost(TargetTransformInfo *TTI, Value *FirstReducedVal,
 6578   Value *emitReduction(Value *VectorizedValue, IRBuilder<> &Builder,
 6578   Value *emitReduction(Value *VectorizedValue, IRBuilder<> &Builder,
 6593     Value *TmpVec = VectorizedValue;
 6595       Value *LeftMask =
 6597       Value *RightMask =
 6600       Value *LeftShuf = Builder.CreateShuffleVector(
 6602       Value *RightShuf = Builder.CreateShuffleVector(
 6627                             SmallVectorImpl<Value *> &BuildVectorOpds,
 6630   Value *V = nullptr;
 6653                                SmallVectorImpl<Value *> &BuildVectorOpds) {
 6656     Value *V = IV->getAggregateOperand();
 6667 static bool PhiTypeSorterFunc(Value *V, Value *V2) {
 6667 static bool PhiTypeSorterFunc(Value *V, Value *V2) {
 6678 static Value *getReductionValue(const DominatorTree *DT, PHINode *P,
 6688   Value *Rdx = nullptr;
 6755   SmallPtrSet<Value *, 8> VisitedInstrs;
 6798       for (auto *Op : Inst->operand_values())
 6807 bool SLPVectorizerPass::vectorizeRootInstruction(PHINode *P, Value *V,
 6832   SmallVector<Value *, 16> BuildVectorOpds;
 6845   SmallVector<Value *, 16> BuildVectorOpds;
 6889   SmallVector<Value *, 4> Incoming;
 6890   SmallPtrSet<Value *, 16> VisitedInstrs;
 6911     for (SmallVector<Value *, 4>::iterator IncIt = Incoming.begin(),
 6916       SmallVector<Value *, 4>::iterator SameTypeIt = IncIt;
 6994         for (auto *V : it->operand_values()) {
 7048       SetVector<Value *> Candidates(GEPList.begin(), GEPList.end());
 7086       SmallVector<Value *, 16> Bundle(Candidates.size());
 7088       for (auto *V : Candidates) {
 7090         auto *GEPIdx = GEP->idx_begin()->get();
lib/Transforms/Vectorize/VPlan.cpp
  204     Value *IRCBV = CBV->getUnderlyingValue();
  212     Value *NewCond = State->Callback.getOrCreateVectorValues(IRCBV, 0);
  297     Value *A = State.get(getOperand(0), Part);
  298     Value *B = State.get(getOperand(1), Part);
  299     Value *V = Builder.CreateBinOp((Instruction::BinaryOps)getOpcode(), A, B);
  306     Value *A = State.get(getOperand(0), Part);
  307     Value *V = Builder.CreateNot(A);
  312     Value *IV = State.get(getOperand(0), Part);
  313     Value *TC = State.get(getOperand(1), Part);
  314     Value *V = Builder.CreateICmpULE(IV, TC);
  319     Value *Cond = State.get(getOperand(0), Part);
  320     Value *Op1 = State.get(getOperand(1), Part);
  321     Value *Op2 = State.get(getOperand(2), Part);
  322     Value *V = Builder.CreateSelect(Cond, Op1, Op2);
  376     Value *TC = State->TripCount;
  378     auto *TCMO = Builder.CreateSub(TC, ConstantInt::get(TC->getType(), 1),
  626 void VPlanPrinter::printAsIngredient(raw_ostream &O, Value *V) {
lib/Transforms/Vectorize/VPlan.h
  121   using VectorParts = SmallVector<Value *, 2>;
  122   using ScalarParts = SmallVector<SmallVector<Value *, 4>, 2>;
  123   std::map<Value *, VectorParts> VectorMapStorage;
  124   std::map<Value *, ScalarParts> ScalarMapStorage;
  131   bool hasAnyVectorValue(Value *Key) const {
  136   bool hasVectorValue(Value *Key, unsigned Part) const {
  146   bool hasAnyScalarValue(Value *Key) const {
  151   bool hasScalarValue(Value *Key, const VPIteration &Instance) const {
  165   Value *getVectorValue(Value *Key, unsigned Part) {
  165   Value *getVectorValue(Value *Key, unsigned Part) {
  172   Value *getScalarValue(Value *Key, const VPIteration &Instance) {
  172   Value *getScalarValue(Value *Key, const VPIteration &Instance) {
  179   void setVectorValue(Value *Key, unsigned Part, Value *Vector) {
  179   void setVectorValue(Value *Key, unsigned Part, Value *Vector) {
  190   void setScalarValue(Value *Key, const VPIteration &Instance, Value *Scalar) {
  190   void setScalarValue(Value *Key, const VPIteration &Instance, Value *Scalar) {
  207   void resetVectorValue(Value *Key, unsigned Part, Value *Vector) {
  207   void resetVectorValue(Value *Key, unsigned Part, Value *Vector) {
  216   void resetScalarValue(Value *Key, const VPIteration &Instance,
  217                         Value *Scalar) {
  228   virtual Value *getOrCreateVectorValues(Value *V, unsigned Part) = 0;
  228   virtual Value *getOrCreateVectorValues(Value *V, unsigned Part) = 0;
  253     typedef SmallVector<Value *, 2> PerPartValuesTy;
  263   Value *get(VPValue *Def, unsigned Part) {
  272   void set(VPValue *Def, Value *V, unsigned Part) {
  323   Value *TripCount = nullptr;
 1236   void addVPValue(Value *V) {
 1242   VPValue *getVPValue(Value *V) {
 1309   static void printAsIngredient(raw_ostream &O, Value *V);
 1313   Value *V;
 1315   VPlanIngredient(Value *V) : V(V) {}
lib/Transforms/Vectorize/VPlanHCFGBuilder.cpp
   57   DenseMap<Value *, VPValue *> IRDef2VPValue;
   67   bool isExternalDef(Value *Val);
   69   VPValue *getOrCreateVPOperand(Value *IRVal);
  102     for (Value *Op : Phi->operands())
  130 bool PlainCFGBuilder::isExternalDef(Value *Val) {
  165 VPValue *PlainCFGBuilder::getOrCreateVPOperand(Value *IRVal) {
  225       for (Value *Op : Inst->operands())
  291       Value *BrCond = Br->getCondition();
lib/Transforms/Vectorize/VPlanValue.h
   51   Value *UnderlyingVal;
   53   VPValue(const unsigned char SC, Value *UV = nullptr)
   64   Value *getUnderlyingValue() { return UnderlyingVal; }
   67   void setUnderlyingValue(Value *Val) {
   79   VPValue(Value *UV = nullptr) : VPValue(VPValueSC, UV) {}
  124 typedef DenseMap<Value *, VPValue *> Value2VPValueTy;
  125 typedef DenseMap<VPValue *, Value *> VPValue2ValueTy;
tools/bugpoint/CrashDebugger.cpp
  222   for (Value *V : OldUsedVal->operand_values()) {
  522       Value *V = F->getValueSymbolTable()->lookup(BI.second);
  629       Value *V = F->getValueSymbolTable()->lookup(BI.second);
  721       Value *V = F->getValueSymbolTable()->lookup(BI.second);
tools/bugpoint/Miscompilation.cpp
  805       std::vector<Value *> args;
  855         Value *GEP = ConstantExpr::getGetElementPtr(InitArray->getType(),
  857         std::vector<Value *> ResolverArgs;
  882           Value *CachedVal =
  884           Value *IsNull = new ICmpInst(*EntryBB, ICmpInst::ICMP_EQ, CachedVal,
  909           std::vector<Value *> Args;
tools/clang/lib/CodeGen/Address.h
   25   llvm::Value *Pointer;
   28   Address(llvm::Value *pointer, CharUnits alignment)
   37   llvm::Value *getPointer() const {
tools/clang/lib/CodeGen/CGAtomic.cpp
  140     llvm::Value *getAtomicPointer() const {
  170     llvm::Value *getAtomicSizeValue() const {
  189     llvm::Value *convertRValueToInt(RValue RVal) const;
  191     RValue ConvertIntToValueOrAtomic(llvm::Value *IntVal,
  223     std::pair<RValue, llvm::Value *>
  252     void EmitAtomicLoadLibcall(llvm::Value *AddForLoaded,
  255     llvm::Value *EmitAtomicLoadOp(llvm::AtomicOrdering AO, bool IsVolatile);
  257     llvm::Value *EmitAtomicCompareExchangeLibcall(
  258         llvm::Value *ExpectedAddr, llvm::Value *DesiredAddr,
  258         llvm::Value *ExpectedAddr, llvm::Value *DesiredAddr,
  264     std::pair<llvm::Value *, llvm::Value *> EmitAtomicCompareExchangeOp(
  264     std::pair<llvm::Value *, llvm::Value *> EmitAtomicCompareExchangeOp(
  265         llvm::Value *ExpectedVal, llvm::Value *DesiredVal,
  265         llvm::Value *ExpectedVal, llvm::Value *DesiredVal,
  346   llvm::Value *addr = LVal.getPointer();
  365   llvm::Value *Expected = CGF.Builder.CreateLoad(Val1);
  366   llvm::Value *Desired = CGF.Builder.CreateLoad(Val2);
  376   llvm::Value *Old = CGF.Builder.CreateExtractValue(Pair, 0);
  377   llvm::Value *Cmp = CGF.Builder.CreateExtractValue(Pair, 1);
  410                                         llvm::Value *FailureOrderVal,
  493                          llvm::Value *IsWeak, llvm::Value *FailureOrder,
  493                          llvm::Value *IsWeak, llvm::Value *FailureOrder,
  559     llvm::Value *LoadVal1 = CGF.Builder.CreateLoad(Val1);
  638   llvm::Value *LoadVal1 = CGF.Builder.CreateLoad(Val1);
  645   llvm::Value *Result = RMWI;
  665                          llvm::Value *IsWeak, llvm::Value *FailureOrder,
  665                          llvm::Value *IsWeak, llvm::Value *FailureOrder,
  667                          llvm::Value *Scope) {
  698   auto *SC = Builder.CreateIntCast(Scope, Builder.getInt32Ty(), false);
  723                   bool UseOptimizedLibcall, llvm::Value *Val, QualType ValTy,
  751   llvm::Value *IsWeak = nullptr, *OrderFail = nullptr;
  779   llvm::Value *Order = EmitScalarExpr(E->getOrder());
  780   llvm::Value *Scope =
  833       llvm::Value *Val1Scalar = EmitScalarExpr(E->getVal1());
 1184       llvm::Value *ResVal = Res.getScalarVal();
 1186         llvm::Value *LoadVal1 = Args[1].getRValue(*this).getScalarVal();
 1384 RValue AtomicInfo::ConvertIntToValueOrAtomic(llvm::Value *IntVal,
 1427 void AtomicInfo::EmitAtomicLoadLibcall(llvm::Value *AddForLoaded,
 1442 llvm::Value *AtomicInfo::EmitAtomicLoadOp(llvm::AtomicOrdering AO,
 1505   auto *Load = EmitAtomicLoadOp(AO, IsVolatile);
 1576 llvm::Value *AtomicInfo::convertRValueToInt(RValue RVal) const {
 1580     llvm::Value *Value = RVal.getScalarVal();
 1602 std::pair<llvm::Value *, llvm::Value *> AtomicInfo::EmitAtomicCompareExchangeOp(
 1602 std::pair<llvm::Value *, llvm::Value *> AtomicInfo::EmitAtomicCompareExchangeOp(
 1603     llvm::Value *ExpectedVal, llvm::Value *DesiredVal,
 1603     llvm::Value *ExpectedVal, llvm::Value *DesiredVal,
 1615   auto *PreviousVal = CGF.Builder.CreateExtractValue(Inst, /*Idxs=*/0);
 1616   auto *SuccessFailureVal = CGF.Builder.CreateExtractValue(Inst, /*Idxs=*/1);
 1620 llvm::Value *
 1621 AtomicInfo::EmitAtomicCompareExchangeLibcall(llvm::Value *ExpectedAddr,
 1622                                              llvm::Value *DesiredAddr,
 1647 std::pair<RValue, llvm::Value *> AtomicInfo::EmitAtomicCompareExchange(
 1660     auto *Res = EmitAtomicCompareExchangeLibcall(ExpectedAddr.getPointer(),
 1671   auto *ExpectedVal = convertRValueToInt(Expected);
 1672   auto *DesiredVal = convertRValueToInt(Desired);
 1757   auto *Res =
 1771   auto *OldVal = EmitAtomicLoadOp(AO, IsVolatile);
 1840   auto *Res =
 1853   auto *OldVal = EmitAtomicLoadOp(AO, IsVolatile);
 1954     llvm::Value *intValue = atomics.convertRValueToInt(rvalue);
 1980 std::pair<RValue, llvm::Value *> CodeGenFunction::EmitAtomicCompareExchange(
 2010     llvm::Value *value = EmitScalarExpr(init);
tools/clang/lib/CodeGen/CGBlocks.cpp
  900 llvm::Value *CodeGenFunction::EmitBlockLiteral(const BlockExpr *blockExpr) {
  924 llvm::Value *CodeGenFunction::EmitBlockLiteral(const CGBlockInfo &blockInfo) {
 1088       llvm::Value *byrefPointer;
 1121       llvm::Value *value = Builder.CreateLoad(src, "captured");
 1134       llvm::Value *value = Builder.CreateLoad(src, "block.captured_block");
 1173   llvm::Value *result = Builder.CreatePointerCast(
 1257   llvm::Value *BlockPtr = EmitScalarExpr(E->getCallee());
 1259   llvm::Value *Func = nullptr;
 1269     llvm::Value *BlockDescriptor = Builder.CreatePointerCast(
 1281       llvm::Value *FuncPtr = Builder.CreateStructGEP(GenBlockTy, BlockPtr, 2);
 1289     llvm::Value *FuncPtr = Builder.CreateStructGEP(GenBlockTy, BlockPtr, 3);
 1477                                                llvm::Value *arg) {
 1595   llvm::Value *BlockPointerDbgLoc = BlockPointer;
 1787     llvm::Value *BlockVarAddr;
 2078       llvm::Value *srcValue = Builder.CreateLoad(srcField, "blockcopy.src");
 2084         llvm::Value *null = llvm::ConstantPointerNull::get(ty);
 2103       llvm::Value *srcValue = Builder.CreateLoad(srcField, "blockcopy.src");
 2105       llvm::Value *dstAddr =
 2107       llvm::Value *args[] = {
 2277     llvm::Value *srcValue = CGF.Builder.CreateLoad(srcField);
 2281     llvm::Value *flagsVal = llvm::ConstantInt::get(CGF.Int32Ty, flags);
 2284     llvm::Value *args[] = { destField.getPointer(), srcValue, flagsVal };
 2290     llvm::Value *value = CGF.Builder.CreateLoad(field);
 2331     llvm::Value *value = CGF.Builder.CreateLoad(srcField);
 2333     llvm::Value *null =
 2368     llvm::Value *oldValue = CGF.Builder.CreateLoad(srcField);
 2369     llvm::Value *copy = CGF.EmitARCRetainBlock(oldValue, /*mandatory*/ true);
 2848   llvm::Value *V;
 2924 void CodeGenFunction::BuildBlockRelease(llvm::Value *V, BlockFieldFlags flags,
 2927   llvm::Value *args[] = {
tools/clang/lib/CodeGen/CGBlocks.h
  191     llvm::Value *getConstant() const {
  209     static Capture makeConstant(llvm::Value *value) {
tools/clang/lib/CodeGen/CGBuilder.h
   90   llvm::LoadInst *CreateAlignedLoad(llvm::Value *Addr, CharUnits Align,
   94   llvm::LoadInst *CreateAlignedLoad(llvm::Value *Addr, CharUnits Align,
   98   llvm::LoadInst *CreateAlignedLoad(llvm::Type *Ty, llvm::Value *Addr,
  107   llvm::StoreInst *CreateStore(llvm::Value *Val, Address Addr,
  114   llvm::StoreInst *CreateAlignedStore(llvm::Value *Val, llvm::Value *Addr,
  114   llvm::StoreInst *CreateAlignedStore(llvm::Value *Val, llvm::Value *Addr,
  121   llvm::StoreInst *CreateDefaultAlignedStore(llvm::Value *Val,
  122                                              llvm::Value *Addr,
  128   llvm::LoadInst *CreateFlagLoad(llvm::Value *Addr,
  135   llvm::StoreInst *CreateFlagStore(bool Value, llvm::Value *Addr) {
  165     llvm::Value *Ptr =
  274   llvm::CallInst *CreateMemCpy(Address Dest, Address Src, llvm::Value *Size,
  288   llvm::CallInst *CreateMemMove(Address Dest, Address Src, llvm::Value *Size,
  296   llvm::CallInst *CreateMemSet(Address Dest, llvm::Value *Value,
  297                                llvm::Value *Size, bool IsVolatile = false) {
tools/clang/lib/CodeGen/CGBuiltin.cpp
   48 static void initializeAlloca(CodeGenFunction &CGF, AllocaInst *AI, Value *Size, unsigned AlignmentInBytes) {
   93 static Value *EmitToInt(CodeGenFunction &CGF, llvm::Value *V,
   93 static Value *EmitToInt(CodeGenFunction &CGF, llvm::Value *V,
  104 static Value *EmitFromInt(CodeGenFunction &CGF, llvm::Value *V,
  104 static Value *EmitFromInt(CodeGenFunction &CGF, llvm::Value *V,
  117 static Value *MakeBinaryAtomicValue(
  126   llvm::Value *DestPtr = CGF.EmitScalarExpr(E->getArg(0));
  134   llvm::Value *Args[2];
  140   llvm::Value *Result = CGF.Builder.CreateAtomicRMW(
  145 static Value *EmitNontemporalStore(CodeGenFunction &CGF, const CallExpr *E) {
  146   Value *Val = CGF.EmitScalarExpr(E->getArg(0));
  147   Value *Address = CGF.EmitScalarExpr(E->getArg(1));
  151   Value *BC = CGF.Builder.CreateBitCast(
  159 static Value *EmitNontemporalLoad(CodeGenFunction &CGF, const CallExpr *E) {
  160   Value *Address = CGF.EmitScalarExpr(E->getArg(0));
  187   llvm::Value *DestPtr = CGF.EmitScalarExpr(E->getArg(0));
  195   llvm::Value *Args[2];
  201   llvm::Value *Result = CGF.Builder.CreateAtomicRMW(
  225 static Value *MakeAtomicCmpXchgValue(CodeGenFunction &CGF, const CallExpr *E,
  228   llvm::Value *DestPtr = CGF.EmitScalarExpr(E->getArg(0));
  235   Value *Args[3];
  242   Value *Pair = CGF.Builder.CreateAtomicCmpXchg(
  269 Value *EmitAtomicCmpXchgForMSIntrin(CodeGenFunction &CGF, const CallExpr *E,
  279   auto *Destination = CGF.EmitScalarExpr(E->getArg(0));
  280   auto *Comparand = CGF.EmitScalarExpr(E->getArg(2));
  281   auto *Exchange = CGF.EmitScalarExpr(E->getArg(1));
  295 static Value *EmitAtomicIncrementValue(CodeGenFunction &CGF, const CallExpr *E,
  308 static Value *EmitAtomicDecrementValue(CodeGenFunction &CGF, const CallExpr *E,
  322 static Value *EmitISOVolatileLoad(CodeGenFunction &CGF, const CallExpr *E) {
  323   Value *Ptr = CGF.EmitScalarExpr(E->getArg(0));
  335 static Value *EmitISOVolatileStore(CodeGenFunction &CGF, const CallExpr *E) {
  336   Value *Ptr = CGF.EmitScalarExpr(E->getArg(0));
  337   Value *Value = CGF.EmitScalarExpr(E->getArg(1));
  351 static Value *emitUnaryBuiltin(CodeGenFunction &CGF,
  354   llvm::Value *Src0 = CGF.EmitScalarExpr(E->getArg(0));
  361 static Value *emitBinaryBuiltin(CodeGenFunction &CGF,
  364   llvm::Value *Src0 = CGF.EmitScalarExpr(E->getArg(0));
  365   llvm::Value *Src1 = CGF.EmitScalarExpr(E->getArg(1));
  372 static Value *emitTernaryBuiltin(CodeGenFunction &CGF,
  375   llvm::Value *Src0 = CGF.EmitScalarExpr(E->getArg(0));
  376   llvm::Value *Src1 = CGF.EmitScalarExpr(E->getArg(1));
  377   llvm::Value *Src2 = CGF.EmitScalarExpr(E->getArg(2));
  384 static Value *emitFPIntBuiltin(CodeGenFunction &CGF,
  387   llvm::Value *Src0 = CGF.EmitScalarExpr(E->getArg(0));
  388   llvm::Value *Src1 = CGF.EmitScalarExpr(E->getArg(1));
  395 static Value *emitFPToIntRoundBuiltin(CodeGenFunction &CGF,
  399    llvm::Value *Src0 = CGF.EmitScalarExpr(E->getArg(0));
  407 static Value *EmitFAbs(CodeGenFunction &CGF, Value *V) {
  407 static Value *EmitFAbs(CodeGenFunction &CGF, Value *V) {
  416 static Value *EmitSignBit(CodeGenFunction &CGF, Value *V) {
  416 static Value *EmitSignBit(CodeGenFunction &CGF, Value *V) {
  433       Value *ShiftCst = llvm::ConstantInt::get(IntTy, Width);
  441   Value *Zero = llvm::Constant::getNullValue(IntTy);
  460 static llvm::Value *EmitOverflowIntrinsic(CodeGenFunction &CGF,
  462                                           llvm::Value *X, llvm::Value *Y,
  462                                           llvm::Value *X, llvm::Value *Y,
  463                                           llvm::Value *&Carry) {
  470   llvm::Value *Tmp = CGF.Builder.CreateCall(Callee, {X, Y});
  475 static Value *emitRangedBuiltin(CodeGenFunction &CGF,
  530 Value *CodeGenFunction::EmitVAStartEnd(Value *ArgValue, bool IsStart) {
  530 Value *CodeGenFunction::EmitVAStartEnd(Value *ArgValue, bool IsStart) {
  549 static llvm::Value *
  554 llvm::Value *
  557                                                  llvm::Value *EmittedE,
  574 llvm::Value *
  577                                        llvm::Value *EmittedE, bool IsDynamic) {
  603   Value *Ptr = EmittedE ? EmittedE : EmitScalarExpr(E);
  611   Value *Min = Builder.getInt1((Type & 2) != 0);
  613   Value *NullIsUnknown = Builder.getTrue();
  614   Value *Dynamic = Builder.getInt1(IsDynamic);
  695 static llvm::Value *EmitX86BitTestIntrinsic(CodeGenFunction &CGF,
  697                                             const CallExpr *E, Value *BitBase,
  698                                             Value *BitPos) {
  742 static llvm::Value *EmitBitTestIntrinsic(CodeGenFunction &CGF,
  745   Value *BitBase = CGF.EmitScalarExpr(E->getArg(0));
  746   Value *BitPos = CGF.EmitScalarExpr(E->getArg(1));
  760   Value *ByteIndex = CGF.Builder.CreateAShr(
  762   Value *BitBaseI8 = CGF.Builder.CreatePointerCast(BitBase, CGF.Int8PtrTy);
  766   Value *PosLow =
  771   Value *Mask = nullptr;
  780   Value *OldByte = nullptr;
  794     Value *NewByte = nullptr;
  815   Value *ShiftedByte = CGF.Builder.CreateLShr(OldByte, PosLow, "bittest.shr");
  833   llvm::Value *Arg1 = nullptr;
  863   llvm::Value *Buf = CGF.Builder.CreateBitOrPointerCast(
  865   llvm::Value *Args[] = {Buf, Arg1};
  911 Value *CodeGenFunction::EmitMSVCBuiltinExpr(MSVCIntrin BuiltinID,
  916     Value *ArgValue = EmitScalarExpr(E->getArg(1));
  923     Value *ArgZero = llvm::Constant::getNullValue(ArgType);
  924     Value *ResZero = llvm::Constant::getNullValue(ResultType);
  925     Value *ResOne = llvm::ConstantInt::get(ResultType, 1);
  933     Value *IsZero = Builder.CreateICmpEQ(ArgValue, ArgZero);
  943       Value *ZeroCount = Builder.CreateCall(F, {ArgValue, Builder.getTrue()});
  948       Value *ArgTypeLastIndex = llvm::ConstantInt::get(IndexType, ArgWidth - 1);
  951       Value *ZeroCount = Builder.CreateCall(F, {ArgValue, Builder.getTrue()});
  953       Value *Index = Builder.CreateNSWSub(ArgTypeLastIndex, ZeroCount);
 1083   CallObjCArcUse(llvm::Value *object) : object(object) {}
 1084   llvm::Value *object;
 1092 Value *CodeGenFunction::EmitCheckedArgForBuiltin(const Expr *E,
 1097   Value *ArgValue = EmitScalarExpr(E);
 1102   Value *Cond = Builder.CreateICmpNE(
 1231   llvm::SmallVector<llvm::Value *, 4> RetainableOperands;
 1242     llvm::Value *ArgVal;
 1290     for (llvm::Value *Object : RetainableOperands)
 1321   llvm::Value *Signed = CGF.EmitScalarExpr(SignedOp);
 1322   llvm::Value *Unsigned = CGF.EmitScalarExpr(UnsignedOp);
 1333   llvm::Value *Zero = llvm::Constant::getNullValue(OpTy);
 1339   llvm::Value *IsNegative = CGF.Builder.CreateICmpSLT(Signed, Zero);
 1340   llvm::Value *AbsOfNegative = CGF.Builder.CreateSub(Zero, Signed);
 1341   llvm::Value *AbsSigned =
 1345   llvm::Value *UnsignedOverflow;
 1346   llvm::Value *UnsignedResult =
 1350   llvm::Value *Overflow, *Result;
 1356     llvm::Value *MaxResult =
 1359     llvm::Value *SignedOverflow =
 1364     llvm::Value *NegativeResult = CGF.Builder.CreateNeg(UnsignedResult);
 1365     llvm::Value *SignedResult =
 1370     llvm::Value *Underflow = CGF.Builder.CreateAnd(
 1376       llvm::Value *TruncOverflow = CGF.Builder.CreateICmpUGT(
 1396 static llvm::Value *dumpRecord(CodeGenFunction &CGF, QualType RType,
 1397                                Value *&RecordPtr, CharUnits Align,
 1403   Value *GString =
 1405   Value *Res = CGF.Builder.CreateCall(Func, {GString});
 1430     Value *FieldPtr = RecordPtr;
 1445     Value *TmpRes = CGF.Builder.CreateCall(Func, {GString});
 1453       Value *TmpRes =
 1475   Value *TmpRes = CGF.Builder.CreateCall(Func, {GString});
 1517   llvm::Value *Src = EmitScalarExpr(E->getArg(0));
 1518   llvm::Value *ShiftAmt = EmitScalarExpr(E->getArg(1));
 1655       Value *Arg1 = EmitScalarExpr(E->getArg(0));
 1656       Value *Arg2 = EmitScalarExpr(E->getArg(1));
 1801     Value *DstPtr = EmitVAListRef(E->getArg(0)).getPointer();
 1802     Value *SrcPtr = EmitVAListRef(E->getArg(1)).getPointer();
 1816     Value *ArgValue = EmitScalarExpr(E->getArg(0));
 1817     Value *NegOp = Builder.CreateNSWNeg(ArgValue, "neg");
 1819     Value *CmpResult = Builder.CreateICmpSLT(ArgValue, Zero, "abscond");
 1820     Value *Result = Builder.CreateSelect(CmpResult, NegOp, ArgValue, "abs");
 1827     Value *Real = ComplexVal.first;
 1828     Value *Imag = ComplexVal.second;
 1829     Value *Zero =
 1852     Value *Func = EmitScalarExpr(E->getArg(1)->IgnoreImpCasts());
 1858     Value *RecordPtr = EmitScalarExpr(Arg0);
 1859     Value *Res = dumpRecord(*this, Arg0Type, RecordPtr, Arg0Align,
 1880     Value *Res = EmitScalarExpr(E->getArg(0));
 1899     Value *ArgValue = EmitScalarExpr(E->getArg(0));
 1905     Value *Zero = llvm::Constant::getNullValue(ArgType);
 1906     Value *IsNeg = Builder.CreateICmpSLT(ArgValue, Zero, "isneg");
 1907     Value *Inverse = Builder.CreateNot(ArgValue, "not");
 1908     Value *Tmp = Builder.CreateSelect(IsNeg, Inverse, ArgValue);
 1909     Value *Ctlz = Builder.CreateCall(F, {Tmp, Builder.getFalse()});
 1910     Value *Result = Builder.CreateSub(Ctlz, llvm::ConstantInt::get(ArgType, 1));
 1919     Value *ArgValue = EmitCheckedArgForBuiltin(E->getArg(0), BCK_CTZPassedZero);
 1925     Value *ZeroUndef = Builder.getInt1(getTarget().isCLZForZeroUndef());
 1926     Value *Result = Builder.CreateCall(F, {ArgValue, ZeroUndef});
 1936     Value *ArgValue = EmitCheckedArgForBuiltin(E->getArg(0), BCK_CLZPassedZero);
 1942     Value *ZeroUndef = Builder.getInt1(getTarget().isCLZForZeroUndef());
 1943     Value *Result = Builder.CreateCall(F, {ArgValue, ZeroUndef});
 1953     Value *ArgValue = EmitScalarExpr(E->getArg(0));
 1959     Value *Tmp =
 1962     Value *Zero = llvm::Constant::getNullValue(ArgType);
 1963     Value *IsZero = Builder.CreateICmpEQ(ArgValue, Zero, "iszero");
 1964     Value *Result = Builder.CreateSelect(IsZero, Zero, Tmp, "ffs");
 1974     Value *ArgValue = EmitScalarExpr(E->getArg(0));
 1980     Value *Tmp = Builder.CreateCall(F, ArgValue);
 1981     Value *Result = Builder.CreateAnd(Tmp, llvm::ConstantInt::get(ArgType, 1));
 1990     Value *ArgValue = EmitScalarExpr(E->getArg(0));
 1996     Value *Result = Builder.CreateCall(F, {ArgValue, Builder.getFalse()});
 2008     Value *ArgValue = EmitScalarExpr(E->getArg(0));
 2014     Value *Result = Builder.CreateCall(F, ArgValue);
 2027     Value *ArgValue = EmitScalarExpr(E->getArg(0));
 2030     Value *ExpectedValue = EmitScalarExpr(E->getArg(1));
 2038     Value *Result =
 2044     Value *PtrValue = EmitScalarExpr(Ptr);
 2045     Value *OffsetValue =
 2048     Value *AlignmentValue = EmitScalarExpr(E->getArg(1));
 2050     if (AlignmentCI->getValue().ugt(llvm::Value::MaximumAlignment))
 2052                                      llvm::Value::MaximumAlignment);
 2064     Value *ArgValue = EmitScalarExpr(E->getArg(0));
 2119     Value *ArgValue = EmitScalarExpr(Arg);
 2128     Value *Result = Builder.CreateCall(F, ArgValue);
 2146     Value *Locality, *RW, *Address = EmitScalarExpr(E->getArg(0));
 2152     Value *Data = llvm::ConstantInt::get(Int32Ty, 1);
 2161     Value *Begin = EmitScalarExpr(E->getArg(0));
 2162     Value *End = EmitScalarExpr(E->getArg(1));
 2182     Value *Base = EmitScalarExpr(E->getArg(0));
 2183     Value *Exponent = EmitScalarExpr(E->getArg(1));
 2197     Value *LHS = EmitScalarExpr(E->getArg(0));
 2198     Value *RHS = EmitScalarExpr(E->getArg(1));
 2225     Value *V = EmitScalarExpr(E->getArg(0));
 2241     Value *V = EmitScalarExpr(E->getArg(0));
 2242     Value *Fabs = EmitFAbs(*this, V);
 2247     Value *FCmp = Builder.CreateFCmp(Pred, Fabs, Infinity, "cmpinf");
 2253     Value *Arg = EmitScalarExpr(E->getArg(0));
 2254     Value *AbsArg = EmitFAbs(*this, Arg);
 2255     Value *IsInf = Builder.CreateFCmpOEQ(
 2257     Value *IsNeg = EmitSignBit(*this, Arg);
 2260     Value *Zero = Constant::getNullValue(IntTy);
 2261     Value *One = ConstantInt::get(IntTy, 1);
 2262     Value *NegativeOne = ConstantInt::get(IntTy, -1);
 2263     Value *SignResult = Builder.CreateSelect(IsNeg, NegativeOne, One);
 2264     Value *Result = Builder.CreateSelect(IsInf, SignResult, Zero);
 2270     Value *V = EmitScalarExpr(E->getArg(0));
 2271     Value *Eq = Builder.CreateFCmpOEQ(V, V, "iseq");
 2273     Value *Abs = EmitFAbs(*this, V);
 2274     Value *IsLessThanInf =
 2278     Value *IsNormal =
 2290     Value *Result = Builder.CreateCall(F);
 2298     Value *V = EmitScalarExpr(E->getArg(5));
 2311     Value *IsZero = Builder.CreateFCmpOEQ(V, Constant::getNullValue(Ty),
 2313     Value *ZeroLiteral = EmitScalarExpr(E->getArg(4));
 2320     Value *IsNan = Builder.CreateFCmpUNO(V, V, "cmp");
 2321     Value *NanLiteral = EmitScalarExpr(E->getArg(0));
 2328     Value *VAbs = EmitFAbs(*this, V);
 2329     Value *IsInf =
 2332     Value *InfLiteral = EmitScalarExpr(E->getArg(1));
 2341     Value *IsNormal =
 2344     Value *NormalResult =
 2358     Value *Size = EmitScalarExpr(E->getArg(0));
 2372     Value *Size = EmitScalarExpr(E->getArg(0));
 2373     Value *AlignmentInBitsValue = EmitScalarExpr(E->getArg(1));
 2387     Value *SizeVal = EmitScalarExpr(E->getArg(1));
 2397     Value *SizeVal = EmitScalarExpr(E->getArg(2));
 2422     Value *SizeVal = llvm::ConstantInt::get(Builder.getContext(), Size);
 2430     Value *SizeVal = EmitScalarExpr(E->getArg(2));
 2448     Value *SizeVal = llvm::ConstantInt::get(Builder.getContext(), Size);
 2457     Value *SizeVal = EmitScalarExpr(E->getArg(2));
 2468     Value *ByteVal = Builder.CreateTrunc(EmitScalarExpr(E->getArg(1)),
 2470     Value *SizeVal = EmitScalarExpr(E->getArg(2));
 2487     Value *ByteVal = Builder.CreateTrunc(EmitScalarExpr(E->getArg(1)),
 2489     Value *SizeVal = llvm::ConstantInt::get(Builder.getContext(), Size);
 2501     Value *Dst = EmitScalarExpr(E->getArg(0));
 2502     Value *Src = EmitScalarExpr(E->getArg(1));
 2503     Value *Size = EmitScalarExpr(E->getArg(2));
 2510     Value *SizeEq0 = Builder.CreateICmpEQ(Size, ConstantInt::get(SizeTy, 0));
 2522     Value *DstCh = Builder.CreateAlignedLoad(WCharTy, DstPhi, WCharAlign);
 2523     Value *SrcCh = Builder.CreateAlignedLoad(WCharTy, SrcPhi, WCharAlign);
 2524     Value *DstGtSrc = Builder.CreateICmpUGT(DstCh, SrcCh);
 2528     Value *DstLtSrc = Builder.CreateICmpULT(DstCh, SrcCh);
 2532     Value *NextDst = Builder.CreateConstInBoundsGEP1_32(WCharTy, DstPhi, 1);
 2533     Value *NextSrc = Builder.CreateConstInBoundsGEP1_32(WCharTy, SrcPhi, 1);
 2534     Value *NextSize = Builder.CreateSub(SizePhi, ConstantInt::get(SizeTy, 1));
 2535     Value *NextSizeEq0 =
 2566     Value *Depth = ConstantEmitter(*this).emitAbstract(E->getArg(0),
 2576     Value *Depth = ConstantEmitter(*this).emitAbstract(E->getArg(0),
 2582     Value *Address = EmitScalarExpr(E->getArg(0));
 2583     Value *Result = getTargetHooks().decodeReturnAddress(*this, Address);
 2587     Value *Address = EmitScalarExpr(E->getArg(0));
 2588     Value *Result = getTargetHooks().encodeReturnAddress(*this, Address);
 2602     Value *Address = EmitScalarExpr(E->getArg(0));
 2608     Value *Int = EmitScalarExpr(E->getArg(0));
 2609     Value *Ptr = EmitScalarExpr(E->getArg(1));
 2641     Value *Ptr = EmitScalarExpr(E->getArg(0));
 2642     Value *Result = Builder.CreatePtrToInt(Ptr, IntPtrTy, "extend.cast");
 2659     Value *FrameAddr = Builder.CreateCall(
 2665     Value *StackAddr =
 2676     Value *Buf = EmitScalarExpr(E->getArg(0));
 2693     Value *Ptr = EmitScalarExpr(Arg);
 2840     Value *Ptr = EmitScalarExpr(E->getArg(0));
 2899     Value *Ptr = EmitScalarExpr(E->getArg(0));
 2902     Value *NewVal = Builder.getInt8(1);
 2903     Value *Order = EmitScalarExpr(E->getArg(1));
 2985     Value *NewVal = Builder.getInt8(0);
 2986     Value *Order = EmitScalarExpr(E->getArg(1));
 3044     Value *Order = EmitScalarExpr(E->getArg(0));
 3134     llvm::Value *AnnVal = EmitScalarExpr(E->getArg(0));
 3173     llvm::Value *X = EmitScalarExpr(E->getArg(0));
 3174     llvm::Value *Y = EmitScalarExpr(E->getArg(1));
 3175     llvm::Value *Carryin = EmitScalarExpr(E->getArg(2));
 3199     llvm::Value *Carry1;
 3200     llvm::Value *Sum1 = EmitOverflowIntrinsic(*this, IntrinsicId,
 3202     llvm::Value *Carry2;
 3203     llvm::Value *Sum2 = EmitOverflowIntrinsic(*this, IntrinsicId,
 3205     llvm::Value *CarryOut = Builder.CreateZExt(Builder.CreateOr(Carry1, Carry2),
 3264     llvm::Value *Left = EmitScalarExpr(LeftArg);
 3265     llvm::Value *Right = EmitScalarExpr(RightArg);
 3273     llvm::Value *Overflow, *Result;
 3279       llvm::Value *ResultTrunc = Builder.CreateTrunc(Result, ResultLLVMTy);
 3283       llvm::Value *ResultTruncExt = Builder.CreateIntCast(
 3285       llvm::Value *TruncationOverflow =
 3322     llvm::Value *X = EmitScalarExpr(E->getArg(0));
 3323     llvm::Value *Y = EmitScalarExpr(E->getArg(1));
 3363     llvm::Value *Carry;
 3364     llvm::Value *Sum = EmitOverflowIntrinsic(*this, IntrinsicId, X, Y, Carry);
 3402     llvm::Value *Destination =
 3405     llvm::Value *Exchange = EmitScalarExpr(E->getArg(1));
 3409     llvm::Value *Comparand =
 3564     Value *Arg0 = EmitScalarExpr(E->getArg(0)),
 3567     Value *PacketSize = OpenCLRT.getPipeElemSize(E->getArg(0));
 3568     Value *PacketAlign = OpenCLRT.getPipeElemAlign(E->getArg(0));
 3585       Value *BCast = Builder.CreatePointerCast(Arg1, I8PTy);
 3597       Value *Arg2 = EmitScalarExpr(E->getArg(2)),
 3601       Value *BCast = Builder.CreatePointerCast(Arg3, I8PTy);
 3634     Value *Arg0 = EmitScalarExpr(E->getArg(0)),
 3638     Value *PacketSize = OpenCLRT.getPipeElemSize(E->getArg(0));
 3639     Value *PacketAlign = OpenCLRT.getPipeElemAlign(E->getArg(0));
 3675     Value *Arg0 = EmitScalarExpr(E->getArg(0)),
 3678     Value *PacketSize = OpenCLRT.getPipeElemSize(E->getArg(0));
 3679     Value *PacketAlign = OpenCLRT.getPipeElemAlign(E->getArg(0));
 3704     Value *Arg0 = EmitScalarExpr(E->getArg(0));
 3706     Value *PacketSize = OpenCLRT.getPipeElemSize(E->getArg(0));
 3707     Value *PacketAlign = OpenCLRT.getPipeElemAlign(E->getArg(0));
 3727     llvm::Value *NewArg;
 3750     llvm::Value *Queue = EmitScalarExpr(E->getArg(0));
 3751     llvm::Value *Flags = EmitScalarExpr(E->getArg(1));
 3753     llvm::Value *Range = NDRangeL.getAddress().getPointer();
 3767       llvm::Value *Kernel =
 3769       llvm::Value *Block =
 3794       llvm::Value *TmpPtr = Tmp.getPointer();
 3795       llvm::Value *TmpSize = EmitLifetimeStart(
 3797       llvm::Value *ElemPtr;
 3803         auto *GEP = Builder.CreateGEP(TmpPtr, {Zero, Index});
 3806         auto *V =
 3820       llvm::Value *Kernel =
 3822       auto *Block = Builder.CreatePointerCast(Info.BlockArg, GenericVoidPtrTy);
 3823       llvm::Value *ElemPtr, *TmpSize, *TmpPtr;
 3828       std::vector<llvm::Value *> Args = {
 3851       llvm::Value *NumEvents =
 3857       llvm::Value *EventWaitList = nullptr;
 3868       llvm::Value *EventRet = nullptr;
 3879       llvm::Value *Kernel =
 3881       llvm::Value *Block =
 3888       std::vector<llvm::Value *> Args = {Queue,     Flags,         Range,
 3907       llvm::Value *ElemPtr, *TmpSize, *TmpPtr;
 3930     Value *Kernel = Builder.CreatePointerCast(Info.Kernel, GenericVoidPtrTy);
 3931     Value *Arg = Builder.CreatePointerCast(Info.BlockArg, GenericVoidPtrTy);
 3944     Value *Kernel = Builder.CreatePointerCast(Info.Kernel, GenericVoidPtrTy);
 3945     Value *Arg = Builder.CreatePointerCast(Info.BlockArg, GenericVoidPtrTy);
 3958     llvm::Value *NDRange = NDRangeL.getAddress().getPointer();
 3961     Value *Kernel = Builder.CreatePointerCast(Info.Kernel, GenericVoidPtrTy);
 3962     Value *Block = Builder.CreatePointerCast(Info.BlockArg, GenericVoidPtrTy);
 3978     Value *Val = EmitScalarExpr(E->getArg(0));
 3980     Value *HalfVal = Builder.CreateFPTrunc(Val, Builder.getHalfTy());
 3985     Value *HalfVal = Builder.CreateLoad(Address);
 3990     Value *HalfVal = Builder.CreateLoad(Address);
 4104     Value *ArgPtr = Builder.CreateLoad(SrcAddr, "ap.val");
 4147     SmallVector<Value*, 16> Args;
 4160       Value *ArgValue;
 4196     Value *V = Builder.CreateCall(F, Args);
 4221   if (Value *V = EmitTargetBuiltinExpr(BuiltinID, E, ReturnValue))
 4230 static Value *EmitTargetArchBuiltinExpr(CodeGenFunction *CGF,
 4271 Value *CodeGenFunction::EmitTargetBuiltinExpr(unsigned BuiltinID,
 4335 Value *CodeGenFunction::EmitNeonSplat(Value *V, Constant *C) {
 4335 Value *CodeGenFunction::EmitNeonSplat(Value *V, Constant *C) {
 4337   Value* SV = llvm::ConstantVector::getSplat(nElts, C);
 4341 Value *CodeGenFunction::EmitNeonCall(Function *F, SmallVectorImpl<Value*> &Ops,
 4341 Value *CodeGenFunction::EmitNeonCall(Function *F, SmallVectorImpl<Value*> &Ops,
 4355 Value *CodeGenFunction::EmitNeonShiftVector(Value *V, llvm::Type *Ty,
 4355 Value *CodeGenFunction::EmitNeonShiftVector(Value *V, llvm::Type *Ty,
 4362 Value *CodeGenFunction::EmitNeonRShiftImm(Value *Vec, Value *Shift,
 4362 Value *CodeGenFunction::EmitNeonRShiftImm(Value *Vec, Value *Shift,
 4362 Value *CodeGenFunction::EmitNeonRShiftImm(Value *Vec, Value *Shift,
 5172 static Value *EmitCommonNeonSISDBuiltinExpr(CodeGenFunction &CGF,
 5174                                             SmallVectorImpl<Value *> &Ops,
 5226   Value *Result = CGF.EmitNeonCall(F, Ops, s);
 5235 Value *CodeGenFunction::EmitCommonNeonBuiltinExpr(
 5238     SmallVectorImpl<llvm::Value *> &Ops, Address PtrOp0, Address PtrOp1,
 5514     Value *Align = getAlignmentValue32(PtrOp1);
 5522     Value *V = UndefValue::get(Ty);
 5590     SmallVector<Value *, 2> MulOps(Ops.begin() + 1, Ops.end());
 5703     Value *SV = nullptr;
 5711       Value *Addr = Builder.CreateConstInBoundsGEP1_32(Ty, Ops[0], vi);
 5731     Value *SV = nullptr;
 5738       Value *Addr = Builder.CreateConstInBoundsGEP1_32(Ty, Ops[0], vi);
 5749     Value *SV = nullptr;
 5757       Value *Addr = Builder.CreateConstInBoundsGEP1_32(Ty, Ops[0], vi);
 5806   Value *Result = EmitNeonCall(F, Ops, NameHint);
 5813 Value *CodeGenFunction::EmitAArch64CompareBuiltinExpr(
 5814     Value *Op, llvm::Type *Ty, const CmpInst::Predicate Fp,
 5834 static Value *packTBLDVectorList(CodeGenFunction &CGF, ArrayRef<Value *> Ops,
 5834 static Value *packTBLDVectorList(CodeGenFunction &CGF, ArrayRef<Value *> Ops,
 5835                                  Value *ExtOp, Value *IndexOp,
 5835                                  Value *ExtOp, Value *IndexOp,
 5838   SmallVector<Value *, 2> TblOps;
 5861     Value *ZeroTbl = ConstantAggregateZero::get(TblTy);
 5873 Value *CodeGenFunction::GetValueForARMHint(unsigned BuiltinID) {
 5910 static Value *EmitSpecialRegisterBuiltin(CodeGenFunction &CGF,
 5931   llvm::Value *Metadata = llvm::MetadataAsValue::get(Context, RegName);
 5941     llvm::Value *Call = Builder.CreateCall(F, Metadata);
 5955   llvm::Value *ArgValue = CGF.EmitScalarExpr(E->getArg(1));
 6007 Value *CodeGenFunction::EmitARMBuiltinExpr(unsigned BuiltinID,
 6036     Value *Option = EmitScalarExpr(E->getArg(0));
 6041     Value *Address = EmitScalarExpr(E->getArg(0));
 6042     Value *RW      = EmitScalarExpr(E->getArg(1));
 6043     Value *IsData  = EmitScalarExpr(E->getArg(2));
 6046     Value *Locality = llvm::ConstantInt::get(Int32Ty, 3);
 6053     llvm::Value *Arg = EmitScalarExpr(E->getArg(0));
 6059     llvm::Value *Arg = EmitScalarExpr(E->getArg(0));
 6063     llvm::Value *Arg = EmitScalarExpr(E->getArg(0));
 6071     Value *Ops[2];
 6101     Value *Coproc = EmitScalarExpr(E->getArg(0));
 6102     Value *Opc1 = EmitScalarExpr(E->getArg(1));
 6103     Value *RtAndRt2 = EmitScalarExpr(E->getArg(2));
 6104     Value *CRm = EmitScalarExpr(E->getArg(3));
 6106     Value *C1 = llvm::ConstantInt::get(Int64Ty, 32);
 6107     Value *Rt = Builder.CreateTruncOrBitCast(RtAndRt2, Int32Ty);
 6108     Value *Rt2 = Builder.CreateLShr(RtAndRt2, C1);
 6128     Value *Coproc = EmitScalarExpr(E->getArg(0));
 6129     Value *Opc1 = EmitScalarExpr(E->getArg(1));
 6130     Value *CRm  = EmitScalarExpr(E->getArg(2));
 6131     Value *RtAndRt2 = Builder.CreateCall(F, {Coproc, Opc1, CRm});
 6136     Value *Rt = Builder.CreateExtractValue(RtAndRt2, 1);
 6137     Value *Rt1 = Builder.CreateExtractValue(RtAndRt2, 0);
 6141     Value *ShiftCast = llvm::ConstantInt::get(Int64Ty, 32);
 6167     Value *LdPtr = EmitScalarExpr(E->getArg(0));
 6168     Value *Val = Builder.CreateCall(F, Builder.CreateBitCast(LdPtr, Int8PtrTy),
 6171     Value *Val0 = Builder.CreateExtractValue(Val, 1);
 6172     Value *Val1 = Builder.CreateExtractValue(Val, 0);
 6176     Value *ShiftCst = llvm::ConstantInt::get(Int64Ty, 32);
 6184     Value *LoadAddr = EmitScalarExpr(E->getArg(0));
 6196     Value *Val = Builder.CreateCall(F, LoadAddr, "ldrex");
 6218     Value *Val = EmitScalarExpr(E->getArg(0));
 6224     Value *Arg0 = Builder.CreateExtractValue(Val, 0);
 6225     Value *Arg1 = Builder.CreateExtractValue(Val, 1);
 6226     Value *StPtr = Builder.CreateBitCast(EmitScalarExpr(E->getArg(1)), Int8PtrTy);
 6232     Value *StoreVal = EmitScalarExpr(E->getArg(0));
 6233     Value *StoreAddr = EmitScalarExpr(E->getArg(1));
 6282     Value *Arg0 = EmitScalarExpr(E->getArg(0));
 6283     Value *Arg1 = EmitScalarExpr(E->getArg(1));
 6289       Value *C1 = llvm::ConstantInt::get(Int64Ty, 32);
 6290       Value *Arg1a = Builder.CreateTruncOrBitCast(Arg1, Int32Ty);
 6291       Value *Arg1b = Builder.CreateLShr(Arg1, C1);
 6295       Value *Res = Builder.CreateCall(F, {Arg0, Arg1a});
 6337   if (Value *Result = EmitARMMVEBuiltinExpr(BuiltinID, E, ReturnValue, Arch))
 6353   SmallVector<Value*, 4> Ops;
 6444     Value *Arg = EmitScalarExpr(E->getArg(0));
 6678       Value *SV = llvm::ConstantVector::get(ConstantInt::get(Int32Ty, 1-Lane));
 6684       Value *Align = getAlignmentValue32(PtrOp0);
 6685       Value *Ld = Builder.CreateCall(F, {Ops[0], Align});
 6695     Value *Ld = Builder.CreateLoad(PtrOp0);
 6747       Value *SV = llvm::ConstantVector::get(cast<llvm::Constant>(Ops[2]));
 6789 Value *CodeGenFunction::EmitARMMVEBuiltinExpr(unsigned BuiltinID,
 6813     llvm::SmallVector<Value *, 4> Ops;
 6836     Value *LoadResult = Builder.CreateCall(F, Ops);
 6837     Value *MvecOut = UndefValue::get(MvecLType);
 6839       Value *Vec = Builder.CreateExtractValue(LoadResult, i);
 6850     llvm::SmallVector<Value *, 4> Ops;
 6878     Value *ToReturn = nullptr;
 6890 static Value *EmitAArch64TblBuiltinExpr(CodeGenFunction &CGF, unsigned BuiltinID,
 6892                                       SmallVectorImpl<Value *> &Ops,
 6968     Value *TblRes =
 6973     Value *CmpRes = Builder.CreateICmp(ICmpInst::ICMP_UGE, Ops[2], EightV);
 6976     Value *EltsFromInput = Builder.CreateAnd(CmpRes, Ops[0]);
 6977     Value *EltsFromTbl = Builder.CreateAnd(Builder.CreateNot(CmpRes), TblRes);
 6986     Value *TblRes =
 6991     Value *CmpRes = Builder.CreateICmp(ICmpInst::ICMP_UGE, Ops[4],
 6995     Value *EltsFromInput = Builder.CreateAnd(CmpRes, Ops[0]);
 6996     Value *EltsFromTbl = Builder.CreateAnd(Builder.CreateNot(CmpRes), TblRes);
 7038 Value *CodeGenFunction::vectorWrapScalar16(Value *Op) {
 7038 Value *CodeGenFunction::vectorWrapScalar16(Value *Op) {
 7041   Value *V = UndefValue::get(VTy);
 7047 Value *CodeGenFunction::EmitAArch64BuiltinExpr(unsigned BuiltinID,
 7084     Value *Address         = EmitScalarExpr(E->getArg(0));
 7085     Value *RW              = EmitScalarExpr(E->getArg(1));
 7086     Value *CacheLevel      = EmitScalarExpr(E->getArg(2));
 7087     Value *RetentionPolicy = EmitScalarExpr(E->getArg(3));
 7088     Value *IsData          = EmitScalarExpr(E->getArg(4));
 7090     Value *Locality = nullptr;
 7109     llvm::Value *Arg = EmitScalarExpr(E->getArg(0));
 7116     llvm::Value *Arg = EmitScalarExpr(E->getArg(0));
 7122     llvm::Value *Arg = EmitScalarExpr(E->getArg(0));
 7127     llvm::Value *Arg = EmitScalarExpr(E->getArg(0));
 7135     llvm::Value *Arg = EmitScalarExpr(E->getArg(0));
 7143     Value *Ops[2];
 7159     Value *LdPtr = EmitScalarExpr(E->getArg(0));
 7160     Value *Val = Builder.CreateCall(F, Builder.CreateBitCast(LdPtr, Int8PtrTy),
 7163     Value *Val0 = Builder.CreateExtractValue(Val, 1);
 7164     Value *Val1 = Builder.CreateExtractValue(Val, 0);
 7169     Value *ShiftCst = llvm::ConstantInt::get(Int128Ty, 64);
 7175     Value *LoadAddr = EmitScalarExpr(E->getArg(0));
 7187     Value *Val = Builder.CreateCall(F, LoadAddr, "ldxr");
 7210     llvm::Value *Val = Builder.CreateLoad(Tmp);
 7212     Value *Arg0 = Builder.CreateExtractValue(Val, 0);
 7213     Value *Arg1 = Builder.CreateExtractValue(Val, 1);
 7214     Value *StPtr = Builder.CreateBitCast(EmitScalarExpr(E->getArg(1)),
 7221     Value *StoreVal = EmitScalarExpr(E->getArg(0));
 7222     Value *StoreAddr = EmitScalarExpr(E->getArg(1));
 7257     llvm::Value *Metadata = llvm::MetadataAsValue::get(Context, RegName);
 7295     Value *Arg0 = EmitScalarExpr(E->getArg(0));
 7296     Value *Arg1 = EmitScalarExpr(E->getArg(1));
 7326       Value *Pointer = EmitScalarExpr(E->getArg(0));
 7327       Value *Mask = EmitScalarExpr(E->getArg(1));
 7331       Value *RV = Builder.CreateCall(
 7336       Value *Pointer = EmitScalarExpr(E->getArg(0));
 7337       Value *TagOffset = EmitScalarExpr(E->getArg(1));
 7341       Value *RV = Builder.CreateCall(
 7346       Value *Pointer = EmitScalarExpr(E->getArg(0));
 7347       Value *ExcludedMask = EmitScalarExpr(E->getArg(1));
 7358       Value *TagAddress = EmitScalarExpr(E->getArg(0));
 7360       Value *RV = Builder.CreateCall(
 7368         Value *TagAddress = EmitScalarExpr(E->getArg(0));
 7374       Value *PointerA = EmitScalarExpr(E->getArg(0));
 7375       Value *PointerB = EmitScalarExpr(E->getArg(1));
 7430     llvm::Value *Metadata = llvm::MetadataAsValue::get(Context, RegName);
 7442     llvm::Value *ArgValue = EmitScalarExpr(E->getArg(1));
 7465   llvm::SmallVector<Value*, 4> Ops;
 7486     Value *Result = EmitCommonNeonSISDBuiltinExpr(*this, *Builtin, Ops, E);
 7510     Value *Ptr = Builder.CreateBitCast(EmitScalarExpr(E->getArg(0)), Int128PTy);
 7516     Value *Ptr = Builder.CreateBitCast(Ops[0], Int128PTy);
 7698     Value *Vec = EmitScalarExpr(E->getArg(0));
 7701     llvm::Value *Idx0 = llvm::ConstantInt::get(SizeTy, 0);
 7702     llvm::Value *Idx1 = llvm::ConstantInt::get(SizeTy, 1);
 7703     Value *Op0 = Builder.CreateExtractElement(Vec, Idx0, "lane0");
 7704     Value *Op1 = Builder.CreateExtractElement(Vec, Idx1, "lane1");
 7711     Value *Vec = EmitScalarExpr(E->getArg(0));
 7714     llvm::Value *Idx0 = llvm::ConstantInt::get(SizeTy, 0);
 7715     llvm::Value *Idx1 = llvm::ConstantInt::get(SizeTy, 1);
 7716     Value *Op0 = Builder.CreateExtractElement(Vec, Idx0, "lane0");
 7717     Value *Op1 = Builder.CreateExtractElement(Vec, Idx1, "lane1");
 7724     Value *Vec = EmitScalarExpr(E->getArg(0));
 7727     llvm::Value *Idx0 = llvm::ConstantInt::get(SizeTy, 0);
 7728     llvm::Value *Idx1 = llvm::ConstantInt::get(SizeTy, 1);
 7729     Value *Op0 = Builder.CreateExtractElement(Vec, Idx0, "lane0");
 7730     Value *Op1 = Builder.CreateExtractElement(Vec, Idx1, "lane1");
 7999     Value *Zero = llvm::ConstantFP::getZeroValueForNegation(HalfTy);
 8000     Value* Sub = Builder.CreateFSub(Zero, EmitScalarExpr(E->getArg(1)), "vsubh");
 8012     SmallVector<Value *, 2> ProductOps;
 8109     SmallVector<Value *, 2> ProductOps;
 8127     SmallVector<Value *, 2> ProductOps;
 8145     SmallVector<Value *, 2> ProductOps;
 8305     Value *Arg0 = EmitScalarExpr(E->getArg(0));
 8306     Value *Arg1 = EmitScalarExpr(E->getArg(1));
 8330   if (Value *V = EmitAArch64TblBuiltinExpr(*this, BuiltinID, E, Ops, Arch))
 8352     Value *Addend = Ops[0];
 8353     Value *Multiplicand = Ops[1];
 8354     Value *LaneSource = Ops[2];
 8364     Value *SV = llvm::ConstantVector::getSplat(VTy->getNumElements(), cst);
 8383       Value *Result = Builder.CreateCall(F, {Ops[1], Ops[2], Ops[0]});
 8393     Value* SV = llvm::ConstantVector::getSplat(VTy->getNumElements(),
 8462     SmallVector<llvm::Value*, 1> TmpOps;
 8465     llvm::Value *tmp = EmitNeonCall(F, TmpOps, "vpadal");
 8466     llvm::Value *addend = Builder.CreateBitCast(Ops[0], tmp->getType());
 8724     Value *Result = Builder.CreateFMul(Ops[0], Ops[1]);
 9024     Value *RHS = Builder.CreateBitCast(EmitScalarExpr(E->getArg(1)), DoubleTy);
 9115     SmallVector<llvm::Value*,2> TmpOps;
 9119     llvm::Value *tmp = EmitNeonCall(F, TmpOps, "vrshr_n", 1, true);
 9148     Value *V = UndefValue::get(Ty);
 9336     Value *SV = nullptr;
 9344       Value *Addr = Builder.CreateConstInBoundsGEP1_32(Ty, Ops[0], vi);
 9355     Value *SV = nullptr;
 9362       Value *Addr = Builder.CreateConstInBoundsGEP1_32(Ty, Ops[0], vi);
 9373     Value *SV = nullptr;
 9381       Value *Addr = Builder.CreateConstInBoundsGEP1_32(Ty, Ops[0], vi);
 9432 Value *CodeGenFunction::EmitBPFBuiltinExpr(unsigned BuiltinID,
 9449   Value *FieldAddr = IsBitField ? EmitLValue(Arg).getBitFieldPointer()
 9454   Value *InfoKind = ConstantInt::get(Int64Ty, C->getSExtValue());
 9463 llvm::Value *CodeGenFunction::
 9464 BuildVector(ArrayRef<llvm::Value*> Ops) {
 9480   Value *Result =
 9490 static Value *getMaskVecValue(CodeGenFunction &CGF, Value *Mask,
 9490 static Value *getMaskVecValue(CodeGenFunction &CGF, Value *Mask,
 9495   Value *MaskVec = CGF.Builder.CreateBitCast(Mask, MaskTy);
 9510 static Value *EmitX86MaskedStore(CodeGenFunction &CGF,
 9511                                  ArrayRef<Value *> Ops,
 9514   Value *Ptr = CGF.Builder.CreateBitCast(Ops[0],
 9517   Value *MaskVec = getMaskVecValue(CGF, Ops[2],
 9523 static Value *EmitX86MaskedLoad(CodeGenFunction &CGF,
 9524                                 ArrayRef<Value *> Ops, unsigned Align) {
 9526   Value *Ptr = CGF.Builder.CreateBitCast(Ops[0],
 9529   Value *MaskVec = getMaskVecValue(CGF, Ops[2],
 9535 static Value *EmitX86ExpandLoad(CodeGenFunction &CGF,
 9536                                 ArrayRef<Value *> Ops) {
 9541   Value *Ptr = CGF.Builder.CreateBitCast(Ops[0],
 9544   Value *MaskVec = getMaskVecValue(CGF, Ops[2],
 9552 static Value *EmitX86CompressExpand(CodeGenFunction &CGF,
 9553                                     ArrayRef<Value *> Ops,
 9557   Value *MaskVec = getMaskVecValue(CGF, Ops[2],
 9566 static Value *EmitX86CompressStore(CodeGenFunction &CGF,
 9567                                    ArrayRef<Value *> Ops) {
 9572   Value *Ptr = CGF.Builder.CreateBitCast(Ops[0],
 9575   Value *MaskVec = getMaskVecValue(CGF, Ops[2],
 9583 static Value *EmitX86MaskLogic(CodeGenFunction &CGF, Instruction::BinaryOps Opc,
 9584                               ArrayRef<Value *> Ops,
 9587   Value *LHS = getMaskVecValue(CGF, Ops[0], NumElts);
 9588   Value *RHS = getMaskVecValue(CGF, Ops[1], NumElts);
 9597 static Value *EmitX86FunnelShift(CodeGenFunction &CGF, Value *Op0, Value *Op1,
 9597 static Value *EmitX86FunnelShift(CodeGenFunction &CGF, Value *Op0, Value *Op1,
 9597 static Value *EmitX86FunnelShift(CodeGenFunction &CGF, Value *Op0, Value *Op1,
 9598                                  Value *Amt, bool IsRight) {
 9615 static Value *EmitX86vpcom(CodeGenFunction &CGF, ArrayRef<Value *> Ops,
 9615 static Value *EmitX86vpcom(CodeGenFunction &CGF, ArrayRef<Value *> Ops,
 9617   Value *Op0 = Ops[0];
 9618   Value *Op1 = Ops[1];
 9650   Value *Cmp = CGF.Builder.CreateICmp(Pred, Op0, Op1);
 9651   Value *Res = CGF.Builder.CreateSExt(Cmp, Ty);
 9655 static Value *EmitX86Select(CodeGenFunction &CGF,
 9656                             Value *Mask, Value *Op0, Value *Op1) {
 9656                             Value *Mask, Value *Op0, Value *Op1) {
 9656                             Value *Mask, Value *Op0, Value *Op1) {
 9668 static Value *EmitX86ScalarSelect(CodeGenFunction &CGF,
 9669                                   Value *Mask, Value *Op0, Value *Op1) {
 9669                                   Value *Mask, Value *Op0, Value *Op1) {
 9669                                   Value *Mask, Value *Op0, Value *Op1) {
 9683 static Value *EmitX86MaskedCompareResult(CodeGenFunction &CGF, Value *Cmp,
 9683 static Value *EmitX86MaskedCompareResult(CodeGenFunction &CGF, Value *Cmp,
 9684                                          unsigned NumElts, Value *MaskIn) {
 9706 static Value *EmitX86MaskedCompare(CodeGenFunction &CGF, unsigned CC,
 9707                                    bool Signed, ArrayRef<Value *> Ops) {
 9711   Value *Cmp;
 9733   Value *MaskIn = nullptr;
 9740 static Value *EmitX86ConvertToMask(CodeGenFunction &CGF, Value *In) {
 9740 static Value *EmitX86ConvertToMask(CodeGenFunction &CGF, Value *In) {
 9741   Value *Zero = Constant::getNullValue(In->getType());
 9745 static Value *EmitX86ConvertIntToFp(CodeGenFunction &CGF,
 9746                                     ArrayRef<Value *> Ops, bool IsSigned) {
 9750   Value *Res;
 9764 static Value *EmitX86Abs(CodeGenFunction &CGF, ArrayRef<Value *> Ops) {
 9764 static Value *EmitX86Abs(CodeGenFunction &CGF, ArrayRef<Value *> Ops) {
 9767   Value *Zero = llvm::Constant::getNullValue(Ty);
 9768   Value *Sub = CGF.Builder.CreateSub(Zero, Ops[0]);
 9769   Value *Cmp = CGF.Builder.CreateICmp(ICmpInst::ICMP_SGT, Ops[0], Zero);
 9770   Value *Res = CGF.Builder.CreateSelect(Cmp, Ops[0], Sub);
 9774 static Value *EmitX86MinMax(CodeGenFunction &CGF, ICmpInst::Predicate Pred,
 9775                             ArrayRef<Value *> Ops) {
 9776   Value *Cmp = CGF.Builder.CreateICmp(Pred, Ops[0], Ops[1]);
 9777   Value *Res = CGF.Builder.CreateSelect(Cmp, Ops[0], Ops[1]);
 9784 static Value *EmitX86FMAExpr(CodeGenFunction &CGF, ArrayRef<Value *> Ops,
 9784 static Value *EmitX86FMAExpr(CodeGenFunction &CGF, ArrayRef<Value *> Ops,
 9823   Value *A = Ops[0];
 9824   Value *B = Ops[1];
 9825   Value *C = Ops[2];
 9830   Value *Res;
 9849       Value *NegC = CGF.Builder.CreateFNeg(C);
 9850       Value *FMSub = CGF.Builder.CreateCall(FMA, {A, B, NegC} );
 9856   Value *MaskFalseVal = nullptr;
 9888 static Value *
 9889 EmitScalarFMAExpr(CodeGenFunction &CGF, MutableArrayRef<Value *> Ops,
 9890                   Value *Upper, bool ZeroMask = false, unsigned PTIdx = 0,
 9902   Value *Res;
 9915     Value *PassThru = ZeroMask ? Constant::getNullValue(Res->getType())
 9929 static Value *EmitX86Muldq(CodeGenFunction &CGF, bool IsSigned,
 9930                            ArrayRef<Value *> Ops) {
 9935   Value *LHS = CGF.Builder.CreateBitCast(Ops[0], Ty);
 9936   Value *RHS = CGF.Builder.CreateBitCast(Ops[1], Ty);
 9958 static Value *EmitX86Ternlog(CodeGenFunction &CGF, bool ZeroMask,
 9959                              ArrayRef<Value *> Ops) {
 9980   Value *Ternlog = CGF.Builder.CreateCall(CGF.CGM.getIntrinsic(IID),
 9982   Value *PassThru = ZeroMask ? ConstantAggregateZero::get(Ty) : Ops[0];
 9986 static Value *EmitX86SExtMask(CodeGenFunction &CGF, Value *Op,
 9986 static Value *EmitX86SExtMask(CodeGenFunction &CGF, Value *Op,
 9989   Value *Mask = getMaskVecValue(CGF, Op, NumberOfElements);
 9994 static Value *EmitX86AddSubSatExpr(CodeGenFunction &CGF,
 9995                                    ArrayRef<Value *> Ops, bool IsSigned,
10004 Value *CodeGenFunction::EmitX86CpuIs(const CallExpr *E) {
10011 static Value *EmitX86CvtBF16ToFloatExpr(CodeGenFunction &CGF,
10013                                         ArrayRef<Value *> Ops) {
10015   Value *ZeroExt = CGF.Builder.CreateZExt(Ops[0], Int32Ty);
10016   Value *Shl = CGF.Builder.CreateShl(ZeroExt, 16);
10018   Value *BitCast = CGF.Builder.CreateBitCast(Shl, ResultType);
10022 Value *CodeGenFunction::EmitX86CpuIs(StringRef CPUStr) {
10057   llvm::Value *Idxs[] = {ConstantInt::get(Int32Ty, 0),
10059   llvm::Value *CpuValue = Builder.CreateGEP(STy, CpuModel, Idxs);
10067 Value *CodeGenFunction::EmitX86CpuSupports(const CallExpr *E) {
10088 Value *CodeGenFunction::EmitX86CpuSupports(ArrayRef<StringRef> FeatureStrs) {
10092 llvm::Value *CodeGenFunction::EmitX86CpuSupports(uint64_t FeaturesMask) {
10096   Value *Result = Builder.getTrue();
10114     Value *Idxs[] = {Builder.getInt32(0), Builder.getInt32(3),
10116     Value *CpuFeatures = Builder.CreateGEP(STy, CpuModel, Idxs);
10117     Value *Features =
10121     Value *Mask = Builder.getInt32(Features1);
10122     Value *Bitset = Builder.CreateAnd(Features, Mask);
10123     Value *Cmp = Builder.CreateICmpEQ(Bitset, Mask);
10132     Value *Features =
10136     Value *Mask = Builder.getInt32(Features2);
10137     Value *Bitset = Builder.CreateAnd(Features, Mask);
10138     Value *Cmp = Builder.CreateICmpEQ(Bitset, Mask);
10145 Value *CodeGenFunction::EmitX86CpuInit() {
10156 Value *CodeGenFunction::EmitX86BuiltinExpr(unsigned BuiltinID,
10165   SmallVector<Value*, 4> Ops;
10206     Value *Cmp = Builder.CreateFCmp(Pred, Ops[0], Ops[1]);
10209     Value *Sext = Builder.CreateSExt(Cmp, IntVecTy);
10216     Value *Address = Ops[0];
10218     Value *RW = ConstantInt::get(Int32Ty, (C->getZExtValue() >> 2) & 0x1);
10219     Value *Locality = ConstantInt::get(Int32Ty, C->getZExtValue() & 0x3);
10220     Value *Data = ConstantInt::get(Int32Ty, 1);
10244     Value *Call = Builder.CreateCall(CGM.getIntrinsic(Intrinsic::x86_rdtscp));
10360     Value *Mhi = Builder.CreateTrunc(
10362     Value *Mlo = Builder.CreateTrunc(Ops[1], Int32Ty);
10875     Value *Res = Builder.CreateShuffleVector(Ops[0],
10913     Value *Op1 = Builder.CreateShuffleVector(Ops[1],
10931     Value *Res = Builder.CreateTrunc(Ops[0], Ops[1]->getType());
11203     Value *OutOps[2];
11253     Value *Cast = Builder.CreateBitCast(Ops[0], VecTy, "cast");
11254     Value *Zero = llvm::Constant::getNullValue(VecTy);
11255     Value *SV = Builder.CreateShuffleVector(Zero, Cast,
11283     Value *Cast = Builder.CreateBitCast(Ops[0], VecTy, "cast");
11284     Value *Zero = llvm::Constant::getNullValue(VecTy);
11285     Value *SV = Builder.CreateShuffleVector(Cast, Zero,
11300     Value *In = getMaskVecValue(*this, Ops[0], NumElts);
11306     Value *Zero = llvm::Constant::getNullValue(In->getType());
11307     Value *SV = Builder.CreateShuffleVector(Zero, In,
11322     Value *In = getMaskVecValue(*this, Ops[0], NumElts);
11328     Value *Zero = llvm::Constant::getNullValue(In->getType());
11329     Value *SV = Builder.CreateShuffleVector(In, Zero,
11341     Value *Ptr = Ops[0];
11342     Value *Src = Ops[1];
11350     Value *BC = Builder.CreateBitCast(
11415     Value *A = Builder.CreateExtractElement(Ops[1], (uint64_t)0);
11416     Value *B = Builder.CreateExtractElement(Ops[2], (uint64_t)0);
11465     Value *Or = EmitX86MaskLogic(*this, Instruction::Or, Ops);
11466     Value *C = llvm::Constant::getAllOnesValue(Ops[0]->getType());
11467     Value *Cmp = Builder.CreateICmpEQ(Or, C);
11474     Value *Or = EmitX86MaskLogic(*this, Instruction::Or, Ops);
11475     Value *C = llvm::Constant::getNullValue(Ops[0]->getType());
11476     Value *Cmp = Builder.CreateICmpEQ(Or, C);
11518     Value *LHS = getMaskVecValue(*this, Ops[0], NumElts);
11519     Value *RHS = getMaskVecValue(*this, Ops[1], NumElts);
11546     Value *LHS = getMaskVecValue(*this, Ops[0], NumElts);
11547     Value *RHS = getMaskVecValue(*this, Ops[1], NumElts);
11549     Value *Res = Builder.CreateCall(Intr, {LHS, RHS});
11582     Value *Res = getMaskVecValue(*this, Ops[0], NumElts);
11594     Value *Res = getMaskVecValue(*this, Ops[0], NumElts);
11602     Value *LHS = getMaskVecValue(*this, Ops[0], NumElts);
11603     Value *RHS = getMaskVecValue(*this, Ops[1], NumElts);
11616     Value *Res = Builder.CreateShuffleVector(RHS, LHS,
11632     Value *A = Builder.CreateExtractElement(Ops[0], (uint64_t)0);
11648     Value *A = Builder.CreateExtractElement(Ops[1], (uint64_t)0);
11651     Value *Src = Builder.CreateExtractElement(Ops[2], (uint64_t)0);
11851     Value *Call = Builder.CreateCall(CGM.getIntrinsic(ID));
11877     Value *Call = Builder.CreateCall(CGM.getIntrinsic(IID),
11891     Value *MaskIn = Ops[2];
11917     Value *Fpclass = Builder.CreateCall(CGM.getIntrinsic(ID), Ops);
11952     Value *Call = Builder.CreateCall(CGM.getIntrinsic(ID), {Ops[0], Ops[1]});
11953     Value *Result = Builder.CreateExtractValue(Call, 0);
11986     Value *MaskIn = Ops[2];
12003     Value *Shufbit = Builder.CreateCall(CGM.getIntrinsic(ID), Ops);
12102       Value *Cmp = Builder.CreateFCmp(Pred, Ops[0], Ops[1]);
12166     Value *Res = Builder.CreateCall(CGM.getIntrinsic(IID), Ops[0]);
12174     Value *LHS = Builder.CreateIntCast(Ops[0], Int64Ty, isSigned);
12175     Value *RHS = Builder.CreateIntCast(Ops[1], Int64Ty, isSigned);
12186     Value *LHS = Builder.CreateIntCast(Ops[0], Int128Ty, IsSigned);
12187     Value *RHS = Builder.CreateIntCast(Ops[1], Int128Ty, IsSigned);
12189     Value *MulResult, *HigherBits;
12220     Value *HighPart128 =
12222     Value *LowPart128 = Builder.CreateZExt(Ops[0], Int128Ty);
12223     Value *Val = Builder.CreateOr(HighPart128, LowPart128);
12224     Value *Amt = Builder.CreateAnd(Builder.CreateZExt(Ops[2], Int128Ty),
12226     Value *Res;
12272     Value *Destination =
12274     Value *ExchangeHigh128 = Builder.CreateZExt(Ops[1], Int128Ty);
12275     Value *ExchangeLow128 = Builder.CreateZExt(Ops[2], Int128Ty);
12279     Value *Exchange = Builder.CreateOr(
12283     Value *Comparand = Builder.CreateLoad(ComparandResult);
12295     Value *Success = Builder.CreateExtractValue(CXI, 1);
12329     Value *Ptr =
12341     Value *Ptr =
12379 Value *CodeGenFunction::EmitPPCBuiltinExpr(unsigned BuiltinID,
12381   SmallVector<Value*, 4> Ops;
12531     Value *X = EmitScalarExpr(E->getArg(0));
12542     Value *X = EmitScalarExpr(E->getArg(0));
12543     Value *Undef = ConstantInt::get(Builder.getInt1Ty(), false);
12552     Value *X = EmitScalarExpr(E->getArg(0));
12553     Value *Undef = ConstantInt::get(Builder.getInt1Ty(), false);
12562     Value *X = EmitScalarExpr(E->getArg(0));
12570     Value *X = EmitScalarExpr(E->getArg(0));
12571     Value *Y = EmitScalarExpr(E->getArg(1));
12588     Value *X = EmitScalarExpr(E->getArg(0));
12612     Value *X = EmitScalarExpr(E->getArg(0));
12627     Value *X = EmitScalarExpr(E->getArg(0));
12628     Value *Y = EmitScalarExpr(E->getArg(1));
12629     Value *Z = EmitScalarExpr(E->getArg(2));
12630     Value *Zero = llvm::ConstantFP::getZeroValueForNegation(ResultType);
12646         Value *FsubRes =
12717       Value *Call = Builder.CreateCall(F, Ops);
12725       Value *ShuffleCall = Builder.CreateShuffleVector(Call, Call, ShuffleMask);
12751     Value *ShuffleCall =
12792     Value *ShuffleCall =
12801     Value *UndefValue =
12803     Value *Res = Builder.CreateInsertElement(
12812     Value *Unpacked = Builder.CreateBitCast(
12823 Value *CodeGenFunction::EmitAMDGPUBuiltinExpr(unsigned BuiltinID,
12833     llvm::Value *X = EmitScalarExpr(E->getArg(0));
12834     llvm::Value *Y = EmitScalarExpr(E->getArg(1));
12835     llvm::Value *Z = EmitScalarExpr(E->getArg(2));
12840     llvm::Value *Tmp = Builder.CreateCall(Callee, {X, Y, Z});
12842     llvm::Value *Result = Builder.CreateExtractValue(Tmp, 0);
12843     llvm::Value *Flag = Builder.CreateExtractValue(Tmp, 1);
12848     llvm::Value *FlagExt = Builder.CreateZExt(Flag, RealFlagType);
12854     llvm::Value *Src0 = EmitScalarExpr(E->getArg(0));
12855     llvm::Value *Src1 = EmitScalarExpr(E->getArg(1));
12856     llvm::Value *Src2 = EmitScalarExpr(E->getArg(2));
12857     llvm::Value *Src3 = EmitScalarExpr(E->getArg(3));
12861     llvm::Value *Src3ToBool = Builder.CreateIsNotNull(Src3);
12871     llvm::SmallVector<llvm::Value *, 6> Args;
12917     Value *Src0 = EmitScalarExpr(E->getArg(0));
12923     Value *Src0 = EmitScalarExpr(E->getArg(0));
12942     llvm::Value *Src0 = EmitScalarExpr(E->getArg(0));
12943     llvm::Value *Src1 = EmitScalarExpr(E->getArg(1));
12944     llvm::Value *Src2 = EmitScalarExpr(E->getArg(2));
12947     Value *F = CGM.getIntrinsic(Intrinsic::amdgcn_icmp,
12953     llvm::Value *Src0 = EmitScalarExpr(E->getArg(0));
12954     llvm::Value *Src1 = EmitScalarExpr(E->getArg(1));
12955     llvm::Value *Src2 = EmitScalarExpr(E->getArg(2));
12958     Value *F = CGM.getIntrinsic(Intrinsic::amdgcn_fcmp,
12973     Value *Src0 = EmitScalarExpr(E->getArg(0));
13018 static Value *EmitSystemZIntrinsicWithCC(CodeGenFunction &CGF,
13022   SmallVector<Value *, 8> Args(NumArgs);
13027   Value *Call = CGF.Builder.CreateCall(F, Args);
13028   Value *CC = CGF.Builder.CreateExtractValue(Call, 1);
13033 Value *CodeGenFunction::EmitSystemZBuiltinExpr(unsigned BuiltinID,
13037     Value *TDB = EmitScalarExpr(E->getArg(0));
13038     Value *Control = llvm::ConstantInt::get(Int32Ty, 0xff0c);
13043     Value *TDB = EmitScalarExpr(E->getArg(0));
13044     Value *Control = llvm::ConstantInt::get(Int32Ty, 0xff0c);
13049     Value *TDB = llvm::ConstantPointerNull::get(Int8PtrTy);
13050     Value *Control = llvm::ConstantInt::get(Int32Ty, 0xff08);
13055     Value *Data = EmitScalarExpr(E->getArg(0));
13060     Value *Address = EmitScalarExpr(E->getArg(0));
13061     Value *Data = EmitScalarExpr(E->getArg(1));
13076     Value *X = EmitScalarExpr(E->getArg(0));
13086     Value *X = EmitScalarExpr(E->getArg(0));
13087     Value *Undef = ConstantInt::get(Builder.getInt1Ty(), false);
13097     Value *X = EmitScalarExpr(E->getArg(0));
13098     Value *Undef = ConstantInt::get(Builder.getInt1Ty(), false);
13106     Value *X = EmitScalarExpr(E->getArg(0));
13113     Value *X = EmitScalarExpr(E->getArg(0));
13114     Value *Y = EmitScalarExpr(E->getArg(1));
13115     Value *Z = EmitScalarExpr(E->getArg(2));
13122     Value *X = EmitScalarExpr(E->getArg(0));
13123     Value *Y = EmitScalarExpr(E->getArg(1));
13124     Value *Z = EmitScalarExpr(E->getArg(2));
13125     Value *Zero = llvm::ConstantFP::getZeroValueForNegation(ResultType);
13132     Value *X = EmitScalarExpr(E->getArg(0));
13133     Value *Y = EmitScalarExpr(E->getArg(1));
13134     Value *Z = EmitScalarExpr(E->getArg(2));
13135     Value *Zero = llvm::ConstantFP::getZeroValueForNegation(ResultType);
13142     Value *X = EmitScalarExpr(E->getArg(0));
13143     Value *Y = EmitScalarExpr(E->getArg(1));
13144     Value *Z = EmitScalarExpr(E->getArg(2));
13145     Value *Zero = llvm::ConstantFP::getZeroValueForNegation(ResultType);
13147     Value *NegZ = Builder.CreateFSub(Zero, Z, "sub");
13153     Value *X = EmitScalarExpr(E->getArg(0));
13160     Value *X = EmitScalarExpr(E->getArg(0));
13161     Value *Zero = llvm::ConstantFP::getZeroValueForNegation(ResultType);
13168     Value *X = EmitScalarExpr(E->getArg(0));
13207     Value *M4Value = llvm::ConstantInt::get(getLLVMContext(), M4);
13208     Value *M5Value = llvm::ConstantInt::get(getLLVMContext(), M5);
13214     Value *X = EmitScalarExpr(E->getArg(0));
13215     Value *Y = EmitScalarExpr(E->getArg(1));
13238     Value *M4Value = llvm::ConstantInt::get(getLLVMContext(), M4);
13244     Value *X = EmitScalarExpr(E->getArg(0));
13245     Value *Y = EmitScalarExpr(E->getArg(1));
13268     Value *M4Value = llvm::ConstantInt::get(getLLVMContext(), M4);
13276     Value *X = EmitScalarExpr(E->getArg(0));
13615 Value *
13618     Value *Ptr = EmitScalarExpr(E->getArg(0));
13627     Value *Ptr = EmitScalarExpr(E->getArg(0));
13693     Value *Ptr = EmitScalarExpr(E->getArg(0));
13694     Value *Val = EmitScalarExpr(E->getArg(1));
13700     Value *Ptr = EmitScalarExpr(E->getArg(0));
13701     Value *Val = EmitScalarExpr(E->getArg(1));
13708     Value *Ptr = EmitScalarExpr(E->getArg(0));
13709     Value *Val = EmitScalarExpr(E->getArg(1));
13835     Value *Ptr = EmitScalarExpr(E->getArg(0));
13845     Value *Ptr = EmitScalarExpr(E->getArg(0));
13854     Value *Mask = EmitScalarExpr(E->getArg(0));
13855     Value *Val = EmitScalarExpr(E->getArg(1));
13857     Value *ResultPair = Builder.CreateCall(
13862     Value *Pred = Builder.CreateZExt(Builder.CreateExtractValue(ResultPair, 1),
13908     Value *Src = EmitScalarExpr(E->getArg(1));
13909     Value *Ldm = EmitScalarExpr(E->getArg(2));
13919     Value *Result =
13951     Value *Dst = EmitScalarExpr(E->getArg(0));
13953     Value *Ldm = EmitScalarExpr(E->getArg(2));
13965     SmallVector<Value *, 10> Values = {Dst};
13967       Value *V = Builder.CreateAlignedLoad(
13973     Value *Result = Builder.CreateCall(Intrinsic, Values);
14021     SmallVector<Value *, 24> Values;
14026       Value *V = Builder.CreateAlignedLoad(
14035       Value *V = Builder.CreateAlignedLoad(
14045       Value *V = Builder.CreateAlignedLoad(
14051     Value *Result = Builder.CreateCall(Intrinsic, Values);
14065 Value *CodeGenFunction::EmitWebAssemblyBuiltinExpr(unsigned BuiltinID,
14070     Value *I = EmitScalarExpr(E->getArg(0));
14076     Value *Args[] = {
14092     Value *Args[] = {llvm::ConstantInt::get(getLLVMContext(), SegConst),
14103     Value *Arg = llvm::ConstantInt::get(getLLVMContext(), SegConst);
14122     Value *Tag = EmitScalarExpr(E->getArg(0));
14123     Value *Obj = EmitScalarExpr(E->getArg(1));
14132     Value *Addr = EmitScalarExpr(E->getArg(0));
14133     Value *Expected = EmitScalarExpr(E->getArg(1));
14134     Value *Timeout = EmitScalarExpr(E->getArg(2));
14139     Value *Addr = EmitScalarExpr(E->getArg(0));
14140     Value *Expected = EmitScalarExpr(E->getArg(1));
14141     Value *Timeout = EmitScalarExpr(E->getArg(2));
14146     Value *Addr = EmitScalarExpr(E->getArg(0));
14147     Value *Count = EmitScalarExpr(E->getArg(1));
14155     Value *Src = EmitScalarExpr(E->getArg(0));
14165     Value *Src = EmitScalarExpr(E->getArg(0));
14177     Value *Src = EmitScalarExpr(E->getArg(0));
14189     Value *Src = EmitScalarExpr(E->getArg(0));
14199     Value *LHS = EmitScalarExpr(E->getArg(0));
14200     Value *RHS = EmitScalarExpr(E->getArg(1));
14209     Value *LHS = EmitScalarExpr(E->getArg(0));
14210     Value *RHS = EmitScalarExpr(E->getArg(1));
14216     Value *Src = EmitScalarExpr(E->getArg(0));
14217     Value *Indices = EmitScalarExpr(E->getArg(1));
14232     Value *Vec = EmitScalarExpr(E->getArg(0));
14233     Value *Lane = llvm::ConstantInt::get(getLLVMContext(), LaneConst);
14234     Value *Extract = Builder.CreateExtractElement(Vec, Lane);
14260     Value *Vec = EmitScalarExpr(E->getArg(0));
14261     Value *Lane = llvm::ConstantInt::get(getLLVMContext(), LaneConst);
14262     Value *Val = EmitScalarExpr(E->getArg(2));
14267       Value *Trunc = Builder.CreateTrunc(Val, ElemType);
14308     Value *LHS = EmitScalarExpr(E->getArg(0));
14309     Value *RHS = EmitScalarExpr(E->getArg(1));
14314     Value *V1 = EmitScalarExpr(E->getArg(0));
14315     Value *V2 = EmitScalarExpr(E->getArg(1));
14316     Value *C = EmitScalarExpr(E->getArg(2));
14346     Value *Vec = EmitScalarExpr(E->getArg(0));
14352     Value *Vec = EmitScalarExpr(E->getArg(0));
14358     Value *Vec = EmitScalarExpr(E->getArg(0));
14366     Value *A = EmitScalarExpr(E->getArg(0));
14367     Value *B = EmitScalarExpr(E->getArg(1));
14368     Value *C = EmitScalarExpr(E->getArg(2));
14389     Value *Low = EmitScalarExpr(E->getArg(0));
14390     Value *High = EmitScalarExpr(E->getArg(1));
14416     Value *Vec = EmitScalarExpr(E->getArg(0));
14447 Value *CodeGenFunction::EmitHexagonBuiltinExpr(unsigned BuiltinID,
14449   SmallVector<llvm::Value *, 4> Ops;
14457     llvm::Value *Base = Builder.CreateLoad(BP);
14466     llvm::Value *Result = Builder.CreateCall(CGM.getIntrinsic(IntID), Ops);
14467     llvm::Value *NewBase = Builder.CreateExtractValue(Result, 1);
14468     llvm::Value *LV = Builder.CreateBitCast(EmitScalarExpr(E->getArg(0)),
14482     llvm::Value *Base = Builder.CreateLoad(BP);
14491     llvm::Value *NewBase = Builder.CreateCall(CGM.getIntrinsic(IntID), Ops);
14492     llvm::Value *LV = Builder.CreateBitCast(EmitScalarExpr(E->getArg(0)),
14507     llvm::Value *BaseAddress =
14516     llvm::Value *DestAddress = DestAddr.getPointer();
14523     llvm::Value *Result = Builder.CreateCall(CGM.getIntrinsic(IntID), Ops);
14525     llvm::Value *DestVal = Builder.CreateExtractValue(Result, 0);
14532     llvm::Value *DestForStore =
14555     llvm::Value *Result = Builder.CreateCall(CGM.getIntrinsic(ID), Ops);
14556     llvm::Value *Vprd = Builder.CreateExtractValue(Result, 1);
14557     llvm::Value *Base = Builder.CreateBitCast(EmitScalarExpr(E->getArg(2)),
14577     llvm::Value *Result = Builder.CreateCall(CGM.getIntrinsic(ID), Ops);
14578     llvm::Value *Vprd = Builder.CreateExtractValue(Result, 1);
14579     llvm::Value *Base = Builder.CreateBitCast(EmitScalarExpr(E->getArg(2)),
tools/clang/lib/CodeGen/CGCUDANV.cpp
  260     llvm::Value* VarPtr = CGF.GetAddrOfLocalVar(Args[i]).getPointer();
  261     llvm::Value *VoidVarPtr = CGF.Builder.CreatePointerCast(VarPtr, VoidPtrTy);
  316   llvm::Value *Kernel = CGF.Builder.CreatePointerCast(CGF.CurFn, VoidPtrTy);
  356     llvm::Value *Args[] = {
  364     llvm::Value *CBZero = CGF.Builder.CreateICmpEQ(CB, Zero);
  373   llvm::Value *Arg = CGF.Builder.CreatePointerCast(CGF.CurFn, CharPtrTy);
  423     llvm::Value *Args[] = {
  451     llvm::Value *Args[] = {
  642       llvm::Value *EQZero = CtorBuilder.CreateICmpEQ(HandleValue, Zero);
  709     llvm::Value *Args[] = {RegisterGlobalsFunc,
  784     llvm::Value *NEZero = DtorBuilder.CreateICmpNE(HandleValue, Zero);
tools/clang/lib/CodeGen/CGCXX.cpp
  253   llvm::Value *VTable = CGM.getCXXABI().getAddrOfVTable(RD, CharUnits());
  263   llvm::Value *VFuncPtr =
  265   llvm::Value *VFunc =
tools/clang/lib/CodeGen/CGCXXABI.cpp
   42     llvm::Value *&ThisPtrForCall,
   43     llvm::Value *MemPtr, const MemberPointerType *MPT) {
   57 llvm::Value *
   59                                        Address Base, llvm::Value *MemPtr,
   67 llvm::Value *CGCXXABI::EmitMemberPointerConversion(CodeGenFunction &CGF,
   69                                                    llvm::Value *Src) {
   79 llvm::Value *
   81                                       llvm::Value *L,
   82                                       llvm::Value *R,
   89 llvm::Value *
   91                                      llvm::Value *MemPtr,
  145 llvm::Value *CGCXXABI::loadIncomingCXXThis(CodeGenFunction &CGF) {
  150 void CGCXXABI::setCXXABIThisValue(CodeGenFunction &CGF, llvm::Value *ThisPtr) {
  174                                         llvm::Value *NumElements,
  203                                llvm::Value *&numElements,
  204                                llvm::Value *&allocPtr, CharUnits &cookieSize) {
  223 llvm::Value *CGCXXABI::readArrayCookieImpl(CodeGenFunction &CGF,
  303                                               llvm::Value *Exn) {
tools/clang/lib/CodeGen/CGCXXABI.h
   55   llvm::Value *getThisValue(CodeGenFunction &CGF) {
   71   llvm::Value *&getStructorImplicitParamValue(CodeGenFunction &CGF) {
   76   llvm::Value *loadIncomingCXXThis(CodeGenFunction &CGF);
   78   void setCXXABIThisValue(CodeGenFunction &CGF, llvm::Value *ThisPtr);
  156       llvm::Value *&ThisPtrForCall, llvm::Value *MemPtr,
  156       llvm::Value *&ThisPtrForCall, llvm::Value *MemPtr,
  160   virtual llvm::Value *
  162                                Address Base, llvm::Value *MemPtr,
  167   virtual llvm::Value *EmitMemberPointerConversion(CodeGenFunction &CGF,
  169                                                    llvm::Value *Src);
  199   virtual llvm::Value *
  201                               llvm::Value *L,
  202                               llvm::Value *R,
  207   virtual llvm::Value *
  209                              llvm::Value *MemPtr,
  244                                       llvm::Value *Exn);
  254   virtual llvm::Value *EmitTypeid(CodeGenFunction &CGF, QualType SrcRecordTy,
  261   virtual llvm::Value *
  266   virtual llvm::Value *EmitDynamicCastToVoid(CodeGenFunction &CGF,
  273   virtual llvm::Value *GetVirtualBaseClassOffset(CodeGenFunction &CGF,
  402   virtual llvm::Value *
  428   virtual llvm::Value *EmitVirtualDestructorCall(CodeGenFunction &CGF,
  447   virtual llvm::Value *performThisAdjustment(CodeGenFunction &CGF,
  451   virtual llvm::Value *performReturnAdjustment(CodeGenFunction &CGF,
  494                                         llvm::Value *NumElements,
  513                                QualType ElementType, llvm::Value *&NumElements,
  514                                llvm::Value *&AllocPtr, CharUnits &CookieSize);
  534   virtual llvm::Value *readArrayCookieImpl(CodeGenFunction &IGF, Address ptr,
  596   virtual std::pair<llvm::Value *, const CXXRecordDecl *>
tools/clang/lib/CodeGen/CGCall.cpp
 1010     llvm::Value *EltAddr =
 1017     QualType Ty, LValue LV, SmallVectorImpl<llvm::Value *>::iterator &AI) {
 1057     SmallVectorImpl<llvm::Value *> &IRCallArgs, unsigned &IRCallArgPos) {
 1103     llvm::Value *V = RV.getScalarVal();
 1163 static llvm::Value *CoerceIntOrPtrToIntOrPtr(llvm::Value *Val,
 1163 static llvm::Value *CoerceIntOrPtrToIntOrPtr(llvm::Value *Val,
 1217 static llvm::Value *CreateCoercedLoad(Address Src, llvm::Type *Ty,
 1238     llvm::Value *Load = CGF.Builder.CreateLoad(Src);
 1269 static void BuildAggStore(CodeGenFunction &CGF, llvm::Value *Val,
 1276       llvm::Value *Elt = CGF.Builder.CreateExtractValue(Val, i);
 1290 static void CreateCoercedStore(llvm::Value *Src,
 2164 static llvm::Value *emitArgumentDemotion(CodeGenFunction &CGF,
 2166                                          llvm::Value *value) {
 2216       llvm::Value *errorValue = CGF.Builder.CreateLoad(Temp);
 2247   SmallVector<llvm::Value *, 16> FnArgs;
 2338         llvm::Value *V =
 2356         llvm::Value *V = FnArgs[FirstIRArg];
 2405             llvm::Value *AlignmentValue =
 2410                                           +llvm::Value::MaximumAlignment);
 2427           llvm::Value *incomingErrorValue = Builder.CreateLoad(arg);
 2501         llvm::Value *V =
 2558         llvm::Value *U = llvm::UndefValue::get(ConvertType(Arg->getType()));
 2586 static llvm::Value *tryEmitFusedAutoreleaseOfResult(CodeGenFunction &CGF,
 2587                                                     llvm::Value *result) {
 2674 static llvm::Value *tryRemoveRetainOfSelf(CodeGenFunction &CGF,
 2675                                           llvm::Value *result) {
 2691   llvm::Value *retainedValue = retainCall->getArgOperand(0);
 2713 static llvm::Value *emitAutoreleaseOfResult(CodeGenFunction &CGF,
 2714                                             llvm::Value *result) {
 2719   if (llvm::Value *self = tryRemoveRetainOfSelf(CGF, result))
 2724     if (llvm::Value *fused = tryEmitFusedAutoreleaseOfResult(CGF, result))
 2760           const llvm::Value *CastAddr = Intrinsic->getArgOperand(1);
 2815   llvm::Value *RV = nullptr;
 2827       llvm::Value *ArgStruct = &*EI;
 2828       llvm::Value *SRet = Builder.CreateStructGEP(
 2924     llvm::SmallVector<llvm::Value*, 4> results;
 2969 void CodeGenFunction::EmitReturnValueCheck(llvm::Value *RV) {
 3006   llvm::Value *SLocPtr = Builder.CreateLoad(ReturnLocation, "return.sloc.load");
 3007   llvm::Value *CanNullCheck = Builder.CreateIsNotNull(SLocPtr);
 3015   llvm::Value *Cond = Builder.CreateIsNotNull(RV);
 3017   llvm::Value *DynamicData[] = {SLocPtr};
 3039   llvm::Value *Placeholder = llvm::UndefValue::get(IRPtrTy->getPointerTo());
 3081     llvm::Value *ptr = Builder.CreateLoad(local);
 3107 static bool isProvablyNull(llvm::Value *addr) {
 3129     llvm::Value *isNull =
 3136   llvm::Value *value = CGF.Builder.CreateLoad(writeback.Temporary);
 3160     llvm::Value *oldValue = CGF.EmitLoadOfScalar(srcLV, SourceLocation());
 3251     llvm::Value *null =
 3261   llvm::Value *finalArgument;
 3268     llvm::Value *isNull =
 3287   llvm::Value *valueToUse = nullptr;
 3294     llvm::Value *src = srcRV.getScalarVal();
 3393   llvm::Value *V = RV.getScalarVal();
 3394   llvm::Value *Cond =
 3431     llvm::Value *V = evaluateOrEmitBuiltinObjectSize(Arg, PS->getType(), T,
 3664                                          ArrayRef<llvm::Value *> args,
 3699                                                  ArrayRef<llvm::Value *> args,
 3709     llvm::FunctionCallee callee, ArrayRef<llvm::Value *> args) {
 3740                                          ArrayRef<llvm::Value *> args,
 3750                                                   ArrayRef<llvm::Value *> Args,
 3775                                                   llvm::Value *New) {
 3851   SmallVector<llvm::Value *, 16> IRCallArgs(IRFunctionArgs.totalIRArgs());
 3857   llvm::Value *UnusedReturnSizePtr = nullptr;
 3957         llvm::Value *V = Addr.getPointer();
 4006           llvm::Value *LifetimeSize =
 4037         llvm::Value *V;
 4060           llvm::Value *errorValue = Builder.CreateLoad(swiftErrorArg);
 4119           llvm::Value *LI = Builder.CreateLoad(EltPtr);
 4136       llvm::Value *tempSize = nullptr;
 4170         llvm::Value *elt = Builder.CreateLoad(eltAddr);
 4191   llvm::Value *CalleePtr = ConcreteCallee.getFunctionPointer();
 4195     llvm::Value *Arg = ArgMemory.getPointer();
 4453     llvm::Value *errorResult = Builder.CreateLoad(swiftErrorTemp);
 4483         llvm::Value *elt = CI;
 4513           llvm::Value *Real = Builder.CreateExtractValue(CI, 0);
 4514           llvm::Value *Imag = Builder.CreateExtractValue(CI, 1);
 4531           llvm::Value *V = CI;
 4565       llvm::Value *OffsetValue = nullptr;
 4569       llvm::Value *Alignment = EmitScalarExpr(AA->getAlignment());
 4574       llvm::Value *AlignmentVal = CallArgs[AA->getParamIndex().getLLVMIndex()]
tools/clang/lib/CodeGen/CGCall.h
  111     CGCallee(const CGCalleeInfo &abstractInfo, llvm::Value *functionPtr)
  183     llvm::Value *getFunctionPointer() const {
  187     void setFunctionPointer(llvm::Value *functionPtr) {
  276       llvm::Value *ToUse;
  309                       llvm::Value *toUse) {
  364     llvm::PointerIntPair<llvm::Value *, 2, unsigned int> Value;
tools/clang/lib/CodeGen/CGClass.cpp
  130                                                  llvm::Value *memberPtr,
  135   llvm::Value *ptr =
  229                                 llvm::Value *virtualOffset,
  236   llvm::Value *baseOffset;
  248   llvm::Value *ptr = addr.getPointer();
  334     llvm::Value *isNull = Builder.CreateIsNull(Value.getPointer());
  347   llvm::Value *VirtualOffset = nullptr;
  389   llvm::Value *NonVirtualOffset =
  406     llvm::Value *IsNull = Builder.CreateIsNull(BaseAddr.getPointer());
  412   llvm::Value *Value = Builder.CreateBitCast(BaseAddr.getPointer(), Int8PtrTy);
  435 llvm::Value *CodeGenFunction::GetVTTParameter(GlobalDecl GD,
  446   llvm::Value *VTT;
  620   llvm::Value *ThisPtr = CGF.LoadCXXThis();
  648       llvm::Value *SrcPtr
  801   llvm::Value *ThisPtr = LoadCXXThis();
  960       llvm::Value *SrcPtr = CGF.Builder.CreateLoad(CGF.GetAddrOfLocalVar(SrcRec));
 1290   llvm::Value *const OldThis = CXXThisValue;
 1550   llvm::Value *LoadThisForDtorDelete(CodeGenFunction &CGF,
 1571                                      llvm::Value *ShouldDeleteCondition,
 1575     llvm::Value *ShouldCallDelete
 1597     llvm::Value *ShouldDeleteCondition;
 1600     CallDtorDeleteConditional(llvm::Value *ShouldDeleteCondition)
 1635  static void EmitSanitizerDtorCallback(CodeGenFunction &CGF, llvm::Value *Ptr,
 1640    llvm::Value *Args[] = {CGF.Builder.CreateBitCast(Ptr, CGF.VoidPtrTy),
 1716       llvm::Value *OffsetPtr = CGF.Builder.CreateGEP(
 1752       llvm::Value *VTablePtr = CGF.LoadCXXThis();
 1896   llvm::Value *numElements =
 1913                                                  llvm::Value *numElements,
 1935     llvm::Value *iszero = Builder.CreateIsNull(numElements, "isempty");
 1941   llvm::Value *arrayBegin = arrayBase.getPointer();
 1942   llvm::Value *arrayEnd = Builder.CreateInBoundsGEP(arrayBegin, numElements,
 2001   llvm::Value *next =
 2007   llvm::Value *done = Builder.CreateICmpEQ(next, arrayEnd, "arrayctor.done");
 2039   llvm::Value *ThisPtr = This.getPointer();
 2273   llvm::Value *VTableGlobal =
 2286   llvm::Value *VPtrValue =
 2288   llvm::Value *Cmp =
 2457   llvm::Value *VTableAddressPoint =
 2465   llvm::Value *VirtualOffset = nullptr;
 2588 llvm::Value *CodeGenFunction::GetVTablePtr(Address This,
 2639                                                    llvm::Value *VTable,
 2647     llvm::Value *TypeId =
 2650     llvm::Value *CastedVTable = Builder.CreateBitCast(VTable, Int8PtrTy);
 2651     llvm::Value *TypeTest =
 2659                                                 llvm::Value *VTable,
 2669                                                 llvm::Value *Derived,
 2691     llvm::Value *DerivedNotNull =
 2702   llvm::Value *VTable;
 2715                                          llvm::Value *VTable,
 2756   llvm::Value *TypeId = llvm::MetadataAsValue::get(getLLVMContext(), MD);
 2758   llvm::Value *CastedVTable = Builder.CreateBitCast(VTable, Int8PtrTy);
 2759   llvm::Value *TypeTest = Builder.CreateCall(
 2779   llvm::Value *AllVtables = llvm::MetadataAsValue::get(
 2782   llvm::Value *ValidVtable = Builder.CreateCall(
 2805 llvm::Value *CodeGenFunction::EmitVTableTypeCheckedLoad(
 2806     const CXXRecordDecl *RD, llvm::Value *VTable, uint64_t VTableByteOffset) {
 2813   llvm::Value *TypeId = llvm::MetadataAsValue::get(CGM.getLLVMContext(), MD);
 2815   llvm::Value *CastedVTable = Builder.CreateBitCast(VTable, Int8PtrTy);
 2816   llvm::Value *CheckedLoad = Builder.CreateCall(
 2820   llvm::Value *CheckResult = Builder.CreateExtractValue(CheckedLoad, 1);
 2910   llvm::Value *ThisPtr = llvm::UndefValue::get(getTypes().ConvertType(ThisType));
tools/clang/lib/CodeGen/CGCleanup.cpp
   37     llvm::Value *V = rv.getScalarVal();
   94     llvm::Value *real =
   96     llvm::Value *imag =
  304 static void createStoreInstBefore(llvm::Value *value, Address addr,
  419     std::initializer_list<llvm::Value **> ValuesToReload) {
  444   for (llvm::Value **ReloadedValue : ValuesToReload) {
  475     std::initializer_list<llvm::Value **> ValuesToReload) {
  565     llvm::Value *IsActive
  982       llvm::Value *ParentPad = CurrentFuncletPad;
tools/clang/lib/CodeGen/CGCleanup.h
  441   llvm::Value **getFilters() {
  445   llvm::Value * const *getFilters() const {
  457     return sizeof(EHFilterScope) + numFilters * sizeof(llvm::Value*);
  462   void setFilter(unsigned i, llvm::Value *filterValue) {
  467   llvm::Value *getFilter(unsigned i) const {
tools/clang/lib/CodeGen/CGCoroutine.cpp
   53   llvm::Value *ResumeEHVar = nullptr;
  201   auto *SuspendRet = CGF.EmitScalarExpr(S.getSuspendExpr());
  457     auto *Cond = CGF.Builder.CreateICmpNE(CoroFree, NullPtr);
  568   auto *AllocateCall = EmitScalarExpr(S.getAllocate());
  577     auto *Cond = Builder.CreateICmpNE(AllocateCall, NullPtr);
  649         Value *SkipBody = Builder.CreateFlagLoad(CurCoro.Data->ResumeEHVar,
  698   SmallVector<llvm::Value *, 8> Args;
tools/clang/lib/CodeGen/CGDebugInfo.cpp
 3905                                                 llvm::Value *Storage,
 4045 CGDebugInfo::EmitDeclareOfAutoVariable(const VarDecl *VD, llvm::Value *Storage,
 4087     const VarDecl *VD, llvm::Value *Storage, CGBuilderTy &Builder,
 4157 void CGDebugInfo::EmitDeclareOfArgVariable(const VarDecl *VD, llvm::Value *AI,
tools/clang/lib/CodeGen/CGDebugInfo.h
  438   EmitDeclareOfAutoVariable(const VarDecl *Decl, llvm::Value *AI,
  448       const VarDecl *variable, llvm::Value *storage, CGBuilderTy &Builder,
  453   void EmitDeclareOfArgVariable(const VarDecl *Decl, llvm::Value *AI,
  521   llvm::DILocalVariable *EmitDeclare(const VarDecl *decl, llvm::Value *AI,
tools/clang/lib/CodeGen/CGDecl.cpp
  477     DestroyNRVOVariable(Address addr, QualType type, llvm::Value *NRVOFlag)
  480     llvm::Value *NRVOFlag;
  493         llvm::Value *DidNRVO =
  510                            const CXXDestructorDecl *Dtor, llvm::Value *NRVOFlag)
  525     DestroyNRVOVariableC(Address addr, llvm::Value *NRVOFlag, QualType Ty)
  537       llvm::Value *V = CGF.Builder.CreateLoad(Stack);
  552       llvm::Value *value = CGF.EmitLoadOfScalar(CGF.EmitDeclRefLValue(&DRE),
  572       llvm::Value *Addr = CGF.EmitDeclRefLValue(&DRE).getPointer();
  581       llvm::Value *Arg =
  719 void CodeGenFunction::EmitNullabilityCheck(LValue LHS, llvm::Value *RHS,
  731   llvm::Value *IsNotNull = Builder.CreateIsNotNull(RHS);
  744     llvm::Value *value = EmitScalarExpr(init);
  782     llvm::Value *zero = CGM.getNullPointer(ty, tempLV.getType());
  794   llvm::Value *value = nullptr;
  848     llvm::Value *oldValue = EmitLoadOfScalar(lvalue, init->getExprLoc());
  962 static llvm::Value *shouldUseMemSetToInitialize(llvm::Constant *Init,
 1174   llvm::Value *Pattern =
 1286 llvm::Value *CodeGenFunction::EmitLifetimeStart(uint64_t Size,
 1287                                                 llvm::Value *Addr) {
 1294   llvm::Value *SizeV = llvm::ConstantInt::get(Int64Ty, Size);
 1302 void CodeGenFunction::EmitLifetimeEnd(llvm::Value *Size, llvm::Value *Addr) {
 1302 void CodeGenFunction::EmitLifetimeEnd(llvm::Value *Size, llvm::Value *Addr) {
 1460           llvm::Value *Zero = Builder.getFalse();
 1530       llvm::Value *V = Builder.CreateCall(F);
 1711     llvm::Value *IsZeroSizedVLA = Builder.CreateICmpEQ(
 1718     llvm::Value *BaseSizeInChars =
 1721     llvm::Value *End =
 1732     llvm::Value *Next =
 1734     llvm::Value *Done = Builder.CreateICmpEQ(Next, End, "vla-init.isdone");
 2108   llvm::Value *length = emitArrayLength(arrayType, type, addr);
 2124   llvm::Value *begin = addr.getPointer();
 2125   llvm::Value *end = Builder.CreateInBoundsGEP(begin, length);
 2140 void CodeGenFunction::emitArrayDestroy(llvm::Value *begin,
 2141                                        llvm::Value *end,
 2155     llvm::Value *isEmpty = Builder.CreateICmpEQ(begin, end,
 2168   llvm::Value *negativeOne = llvm::ConstantInt::get(SizeTy, -1, true);
 2169   llvm::Value *element = Builder.CreateInBoundsGEP(elementPast, negativeOne,
 2183   llvm::Value *done = Builder.CreateICmpEQ(element, begin, "arraydestroy.done");
 2194                                     llvm::Value *begin, llvm::Value *end,
 2194                                     llvm::Value *begin, llvm::Value *end,
 2207     llvm::Value *zero = llvm::ConstantInt::get(CGF.SizeTy, 0);
 2209     SmallVector<llvm::Value*,4> gepIndices(arrayDepth+1, zero);
 2226     llvm::Value *ArrayBegin;
 2227     llvm::Value *ArrayEnd;
 2232     RegularPartialArrayDestroy(llvm::Value *arrayBegin, llvm::Value *arrayEnd,
 2232     RegularPartialArrayDestroy(llvm::Value *arrayBegin, llvm::Value *arrayEnd,
 2249     llvm::Value *ArrayBegin;
 2255     IrregularPartialArrayDestroy(llvm::Value *arrayBegin,
 2265       llvm::Value *arrayEnd = CGF.Builder.CreateLoad(ArrayEndPointer);
 2278 void CodeGenFunction::pushIrregularPartialArrayCleanup(llvm::Value *arrayBegin,
 2295 void CodeGenFunction::pushRegularPartialArrayCleanup(llvm::Value *arrayBegin,
 2296                                                      llvm::Value *arrayEnd,
 2330     ConsumeARCParameter(llvm::Value *param,
 2334     llvm::Value *Param;
 2360       llvm::Value *V = Arg.isIndirect()
 2382     auto *V = DeclPtr.getPointer();
 2427   llvm::Value *ArgVal = (DoStore ? Arg.getDirectValue() : nullptr);
 2457             llvm::Value *Null = CGM.EmitNullConstant(D.getType());
tools/clang/lib/CodeGen/CGDeclCXX.cpp
  167   llvm::Value *Args[2] = { llvm::ConstantInt::getSigned(Int64Ty, Width),
  297 void CodeGenFunction::EmitCXXGuardedInitBranch(llvm::Value *NeedsInit,
  683       llvm::Value *GuardVal = Builder.CreateLoad(Guard);
  684       llvm::Value *Uninit = Builder.CreateIsNull(GuardVal,
  708       llvm::Value *token = EmitObjCAutoreleasePoolPush();
  741       llvm::Value *Callee;
tools/clang/lib/CodeGen/CGException.cpp
  261     llvm::Value *Val = LPI->getClause(I)->stripPointerCasts();
  365     llvm::Value *exn;
  366     FreeException(llvm::Value *exn) : exn(exn) {}
  415 llvm::Value *CodeGenFunction::getExceptionFromSlot() {
  419 llvm::Value *CodeGenFunction::getSelectorFromSlot() {
  476       llvm::Value *EHType = CGM.GetAddrOfRTTIDescriptor(ExceptType,
  499     llvm::Value *selector = CGF.getSelectorFromSlot();
  502     llvm::Value *zero = CGF.Builder.getInt32(0);
  503     llvm::Value *failsFilter =
  515   llvm::Value *exn = CGF.getExceptionFromSlot();
  780   llvm::Value *LPadExn = Builder.CreateExtractValue(LPadInst, 0);
  782   llvm::Value *LPadSel = Builder.CreateExtractValue(LPadInst, 1);
  794   SmallVector<llvm::Value*, 4> filterTypes;
  795   llvm::SmallPtrSet<llvm::Value*, 4> catchTypes;
  903   llvm::Value *ParentPad = CGF.CurrentFuncletPad;
  947   llvm::Value *ParentPad = CGF.CurrentFuncletPad;
  964   SmallVector<llvm::Value *, 4> CatchTypes;
 1032     llvm::Value *MatchesTypeIndex =
 1073   llvm::Value *selector = CGF.getSelectorFromSlot();
 1080     llvm::Value *typeValue = handler.Type.RTTI;
 1113     llvm::Value *matchesTypeIndex =
 1270     llvm::Value *ForEHVar;
 1272     CallEndCatchForFinally(llvm::Value *ForEHVar,
 1281       llvm::Value *ShouldEndCatch =
 1292     llvm::Value *ForEHVar;
 1295     llvm::Value *SavedExnVar;
 1297     PerformFinally(const Stmt *Body, llvm::Value *ForEHVar,
 1299                    llvm::FunctionCallee RethrowFn, llvm::Value *SavedExnVar)
 1311       llvm::Value *SavedCleanupDest =
 1324         llvm::Value *ShouldRethrow =
 1430     llvm::Value *exn = nullptr;
 1477   llvm::Value *Exn = nullptr;
 1501   llvm::Value *Exn = nullptr;
 1534   llvm::Value *ParentPad = CurrentFuncletPad;
 1540   llvm::Value *Exn = nullptr;
 1583   llvm::Value *Exn = getExceptionFromSlot();
 1584   llvm::Value *Sel = getSelectorFromSlot();
 1587   llvm::Value *LPadVal = llvm::UndefValue::get(LPadType);
 1627     llvm::Value *FP = nullptr;
 1637     llvm::Value *IsForEH =
 1713                                                    llvm::Value *ParentFP) {
 1745   llvm::Value *ChildVar =
 1767   llvm::Value *EntryFP = nullptr;
 1784   llvm::Value *ParentFP = EntryFP;
 1901   llvm::Value *R = EmitScalarExpr(FilterExpr);
 1926                                                llvm::Value *ParentFP,
 1927                                                llvm::Value *EntryFP) {
 1956   llvm::Value *Ptrs = Builder.CreateBitCast(SEHInfo, PtrsTy->getPointerTo());
 1957   llvm::Value *Rec = Builder.CreateStructGEP(PtrsTy, Ptrs, 0);
 1959   llvm::Value *Code = Builder.CreateAlignedLoad(Rec, getIntAlign());
 1964 llvm::Value *CodeGenFunction::EmitSEHExceptionInfo() {
 1973 llvm::Value *CodeGenFunction::EmitSEHExceptionCode() {
 1978 llvm::Value *CodeGenFunction::EmitSEHAbnormalTermination() {
 2080     llvm::Value *Code = Builder.CreateCall(SEHCodeIntrin, {CPI});
tools/clang/lib/CodeGen/CGExpr.cpp
   50 llvm::Value *CodeGenFunction::EmitCastToVoidPtr(llvm::Value *value) {
   50 llvm::Value *CodeGenFunction::EmitCastToVoidPtr(llvm::Value *value) {
   67                                                      llvm::Value *ArraySize) {
   77                                           llvm::Value *ArraySize,
   82   llvm::Value *V = Alloca.getPointer();
  108                                                     llvm::Value *ArraySize) {
  126 void CodeGenFunction::InitTempAlloca(Address Var, llvm::Value *Init) {
  164 llvm::Value *CodeGenFunction::EvaluateExprAsBool(const Expr *E) {
  167     llvm::Value *MemPtr = EmitScalarExpr(E);
  505       if (auto *Size = EmitLifetimeStart(
  536       if (auto *Size = EmitLifetimeStart(
  581       llvm::Value *Ptr = EmitScalarExpr(Adjustment.Ptr.RHS);
  597   llvm::Value *Value = LV.getPointer();
  622 static llvm::Value *emitHash16Bytes(CGBuilderTy &Builder, llvm::Value *Low,
  622 static llvm::Value *emitHash16Bytes(CGBuilderTy &Builder, llvm::Value *Low,
  623                                     llvm::Value *High) {
  624   llvm::Value *KMul = Builder.getInt64(0x9ddfea08eb382d69ULL);
  625   llvm::Value *K47 = Builder.getInt64(47);
  626   llvm::Value *A0 = Builder.CreateMul(Builder.CreateXor(Low, High), KMul);
  627   llvm::Value *A1 = Builder.CreateXor(Builder.CreateLShr(A0, K47), A0);
  628   llvm::Value *B0 = Builder.CreateMul(Builder.CreateXor(High, A1), KMul);
  629   llvm::Value *B1 = Builder.CreateXor(Builder.CreateLShr(B0, K47), B0);
  654                                     llvm::Value *Ptr, QualType Ty,
  657                                     llvm::Value *ArraySize) {
  674   SmallVector<std::pair<llvm::Value *, SanitizerMask>, 3> Checks;
  682   llvm::Value *True = llvm::ConstantInt::getTrue(getLLVMContext());
  683   llvm::Value *IsNonNull = nullptr;
  715     llvm::Value *Size = llvm::ConstantInt::get(IntPtrTy, TySize);
  728       llvm::Value *Min = Builder.getFalse();
  729       llvm::Value *NullIsUnknown = Builder.getFalse();
  730       llvm::Value *Dynamic = Builder.getFalse();
  731       llvm::Value *CastAddr = Builder.CreateBitCast(Ptr, Int8PtrTy);
  732       llvm::Value *LargeEnough = Builder.CreateICmpUGE(
  739   llvm::Value *PtrAsInt = nullptr;
  751       llvm::Value *Align = Builder.CreateAnd(
  753       llvm::Value *Aligned =
  810       llvm::Value *Low = llvm::ConstantInt::get(Int64Ty, TypeHash);
  813       llvm::Value *VPtrVal = Builder.CreateLoad(VPtrAddr);
  814       llvm::Value *High = Builder.CreateZExt(VPtrVal, Int64Ty);
  816       llvm::Value *Hash = emitHash16Bytes(Builder, Low, High);
  822       llvm::Value *Cache = CGM.CreateRuntimeVariable(HashTable,
  824       llvm::Value *Slot = Builder.CreateAnd(Hash,
  827       llvm::Value *Indices[] = { Builder.getInt32(0), Slot };
  828       llvm::Value *CacheVal =
  836       llvm::Value *EqualHash = Builder.CreateICmpEQ(CacheVal, Hash);
  843       llvm::Value *DynamicData[] = { Ptr, Hash };
  886 llvm::Value *CodeGenFunction::LoadPassedObjectSize(const Expr *E,
  918   llvm::Value *SizeInBytes = EmitLoadOfScalar(AddrOfSize, /*Volatile=*/false,
  920   llvm::Value *SizeOfElement =
  927 static llvm::Value *getArrayIndexingBound(
  951   if (llvm::Value *POS = CGF.LoadPassedObjectSize(Base, EltTy)) {
  960                                       llvm::Value *Index, QualType IndexType,
  967   llvm::Value *Bound = getArrayIndexingBound(*this, Base, IndexedType);
  972   llvm::Value *IndexVal = Builder.CreateIntCast(Index, SizeTy, IndexSigned);
  973   llvm::Value *BoundVal = Builder.CreateIntCast(Bound, SizeTy, false);
  980   llvm::Value *Check = Accessed ? Builder.CreateICmpULT(IndexVal, BoundVal)
  992   llvm::Value *NextVal;
 1152     llvm::Value *U = llvm::UndefValue::get(EltTy);
 1310       llvm::Value *V = LV.getPointer();
 1514 llvm::Value *CodeGenFunction::emitScalarConstant(
 1524 llvm::Value *CodeGenFunction::EmitLoadOfScalar(LValue lvalue,
 1587 bool CodeGenFunction::EmitScalarRangeCheck(llvm::Value *Value, QualType Ty,
 1614   llvm::Value *Check;
 1619     llvm::Value *Upper =
 1621     llvm::Value *Lower =
 1634 llvm::Value *CodeGenFunction::EmitLoadOfScalar(Address Addr, bool Volatile,
 1655         llvm::Value *V = Builder.CreateLoad(Cast, Volatile, "loadVec4");
 1691 llvm::Value *CodeGenFunction::EmitToMemory(llvm::Value *Value, QualType Ty) {
 1691 llvm::Value *CodeGenFunction::EmitToMemory(llvm::Value *Value, QualType Ty) {
 1705 llvm::Value *CodeGenFunction::EmitFromMemory(llvm::Value *Value, QualType Ty) {
 1705 llvm::Value *CodeGenFunction::EmitFromMemory(llvm::Value *Value, QualType Ty) {
 1716 void CodeGenFunction::EmitStoreOfScalar(llvm::Value *Value, Address Addr,
 1732         llvm::Value *MaskV = llvm::ConstantVector::get(Mask);
 1764 void CodeGenFunction::EmitStoreOfScalar(llvm::Value *value, LValue lvalue,
 1788     llvm::Value *Object = EmitARCLoadWeakRetained(LV.getAddress());
 1828   llvm::Value *Val = Builder.CreateLoad(Ptr, LV.isVolatileQualified(), "bf.load");
 1853   llvm::Value *Vec = Builder.CreateLoad(LV.getExtVectorAddress(),
 1863     llvm::Value *Elt = llvm::ConstantInt::get(SizeTy, InIdx);
 1874   llvm::Value *MaskV = llvm::ConstantVector::get(Mask);
 1916   llvm::Value *Call = Builder.CreateCall(
 1932       llvm::Value *Vec = Builder.CreateLoad(Dst.getVectorAddress(),
 1990     llvm::Value *src = Src.getScalarVal();
 1998     llvm::Value *src = Src.getScalarVal();
 2003       llvm::Value *RHS = dst.getPointer();
 2005       llvm::Value *LHS =
 2008       llvm::Value *BytesBetween = Builder.CreateSub(LHS, RHS, "ivar.offset");
 2025                                                      llvm::Value **Result) {
 2031   llvm::Value *SrcVal = Src.getScalarVal();
 2036   llvm::Value *MaskedVal = SrcVal;
 2042     llvm::Value *Val =
 2073     llvm::Value *ResultVal = MaskedVal;
 2095   llvm::Value *Vec = Builder.CreateLoad(Dst.getExtVectorAddress(),
 2099   llvm::Value *SrcVal = Src.getScalarVal();
 2112       llvm::Value *MaskV = llvm::ConstantVector::get(Mask);
 2125       llvm::Value *ExtMaskV = llvm::ConstantVector::get(ExtMask);
 2126       llvm::Value *ExtSrcVal =
 2144       llvm::Value *MaskV = llvm::ConstantVector::get(Mask);
 2153     llvm::Value *Elt = llvm::ConstantInt::get(SizeTy, InIdx);
 2177   llvm::Value *Value = Src.getScalarVal();
 2284 static llvm::Value *
 2286                                 llvm::Value *V, llvm::Type *IRType,
 2346   llvm::Value *Addr = Builder.CreateLoad(Ptr);
 2376   llvm::Value *V = CGF.CGM.GetAddrOfGlobalVar(VD);
 2422   llvm::Value *V = EmitFunctionDeclPointer(CGF.CGM, FD);
 2429                                       llvm::Value *ThisValue) {
 2458   llvm::Value *Ptr =
 2834 llvm::Value *CodeGenFunction::EmitCheckValue(llvm::Value *V) {
 2834 llvm::Value *CodeGenFunction::EmitCheckValue(llvm::Value *V) {
 2959                                  ArrayRef<llvm::Value *> FnArgs,
 3006     ArrayRef<std::pair<llvm::Value *, SanitizerMask>> Checked,
 3008     ArrayRef<llvm::Value *> DynamicArgs) {
 3015   llvm::Value *FatalCond = nullptr;
 3016   llvm::Value *RecoverableCond = nullptr;
 3017   llvm::Value *TrapCond = nullptr;
 3019     llvm::Value *Check = Checked[i].first;
 3021     llvm::Value *&Cond =
 3035   llvm::Value *JointCond;
 3065   SmallVector<llvm::Value *, 4> Args;
 3116     SanitizerMask Kind, llvm::Value *Cond, llvm::ConstantInt *TypeId,
 3117     llvm::Value *Ptr, ArrayRef<llvm::Constant *> StaticArgs) {
 3213   llvm::Value *Data =
 3216   llvm::Value *Addr =
 3221   llvm::Value *DataIsNotNullPtr =
 3230   llvm::Value *V = Builder.CreateConstGEP2_32(
 3235   llvm::Value *CheckKind = Builder.CreateLoad(CheckKindAddr);
 3237   llvm::Value *AllVtables = llvm::MetadataAsValue::get(
 3240   llvm::Value *ValidVtable = Builder.CreateZExt(
 3252   SmallVector<std::pair<llvm::Value *, SanitizerMask>, 5> Checks;
 3256     llvm::Value *Cond =
 3282 void CodeGenFunction::EmitTrapCheck(llvm::Value *Checked) {
 3365 static llvm::Value *emitArraySubscriptGEP(CodeGenFunction &CGF,
 3366                                           llvm::Value *ptr,
 3367                                           ArrayRef<llvm::Value*> indices,
 3382                                       llvm::Value *idx,
 3406                                      ArrayRef<llvm::Value *> indices,
 3429   llvm::Value *eltPtr;
 3453   llvm::Value *IdxPre =
 3457     auto *Idx = IdxPre;
 3484     auto *Idx = EmitIdxAfterBase(/*Promote*/false);
 3495     auto *Idx = EmitIdxAfterBase(/*Promote*/true);
 3514     auto *Idx = EmitIdxAfterBase(/*Promote*/true);
 3517     llvm::Value *numElements = getVLASize(vla).NumElts;
 3538     auto *Idx = EmitIdxAfterBase(/*Promote*/true);
 3541     llvm::Value *InterfaceSizeVal =
 3544     llvm::Value *ScaledIdx = Builder.CreateMul(Idx, InterfaceSizeVal);
 3556     llvm::Value *EltPtr =
 3577     auto *Idx = EmitIdxAfterBase(/*Promote*/true);
 3590     auto *Idx = EmitIdxAfterBase(/*Promote*/true);
 3654   llvm::Value *Idx = nullptr;
 3690         auto *LowerBoundVal =
 3696         auto *LengthVal =
 3726         auto *LengthVal = Builder.CreateIntCast(
 3752     llvm::Value *NumElements = getVLASize(VLA).NumElts;
 3823     llvm::Value *Vec = EmitScalarExpr(E->getBase());
 4068       auto *stripped = Builder.CreateStripInvariantGroup(addr.getPointer());
 4431     llvm::Value *V = getTargetHooks().performAddrSpaceCast(
 4586   llvm::Value *calleePtr;
 4728 llvm::Value *CodeGenFunction::EmitIvarOffset(const ObjCInterfaceDecl *Interface,
 4734                                           llvm::Value *BaseValue,
 4743   llvm::Value *BaseValue = nullptr;
 4774                                  llvm::Value *Chain) {
 4804       llvm::Value *CalleePtr = Callee.getFunctionPointer();
 4806       llvm::Value *CalleePrefixStruct = Builder.CreateBitCast(
 4808       llvm::Value *CalleeSigPtr =
 4810       llvm::Value *CalleeSig =
 4812       llvm::Value *CalleeSigMatch = Builder.CreateICmpEQ(CalleeSig, PrefixSig);
 4819       llvm::Value *CalleeRTTIPtr =
 4821       llvm::Value *CalleeRTTIEncoded =
 4823       llvm::Value *CalleeRTTI =
 4825       llvm::Value *CalleeRTTIMatch =
 4853     llvm::Value *TypeId = llvm::MetadataAsValue::get(getLLVMContext(), MD);
 4855     llvm::Value *CalleePtr = Callee.getFunctionPointer();
 4856     llvm::Value *CastedCallee = Builder.CreateBitCast(CalleePtr, Int8PtrTy);
 4857     llvm::Value *TypeTest = Builder.CreateCall(
 4937     llvm::Value *CalleePtr = Callee.getFunctionPointer();
 4966   llvm::Value *OffsetV = EmitScalarExpr(E->getRHS());
 4997 void CodeGenFunction::SetFPAccuracy(llvm::Value *Val, float Accuracy) {
tools/clang/lib/CodeGen/CGExprAgg.cpp
  167                               llvm::Value *outerBegin = nullptr);
  266   llvm::Value *LifetimeSizePtr = nullptr;
  363     llvm::Value *size = llvm::ConstantInt::get(CGF.SizeTy, sz.getQuantity());
  414   llvm::Value *Zero = llvm::ConstantInt::get(CGF.PtrDiffTy, 0);
  415   llvm::Value *IdxStart[] = { Zero, Zero };
  416   llvm::Value *ArrayStart =
  426   llvm::Value *Size = Builder.getInt(ArrayType->getSize());
  432     llvm::Value *IdxEnd[] = { Zero, Size };
  433     llvm::Value *ArrayEnd =
  481   llvm::Value *zero = llvm::ConstantInt::get(CGF.SizeTy, 0);
  482   llvm::Value *indices[] = { zero, zero };
  483   llvm::Value *begin =
  538   llvm::Value *one = llvm::ConstantInt::get(CGF.SizeTy, 1);
  545   llvm::Value *element = begin;
  585     llvm::Value *end = Builder.CreateInBoundsGEP(begin,
  615     llvm::Value *nextElement =
  622     llvm::Value *done = Builder.CreateICmpEQ(nextElement, end,
  729     llvm::Value *SizeVal = llvm::ConstantInt::get(
  921 static llvm::Value *EmitCompare(CGBuilderTy &Builder, CodeGenFunction &CGF,
  922                                 const BinaryOperator *E, llvm::Value *LHS,
  923                                 llvm::Value *RHS, CompareKind Kind,
 1009     Value *Cmp = EmitCompare(Builder, CGF, E, LHSValues.first, RHSValues.first,
 1014     Value *CmpImag = EmitCompare(Builder, CGF, E, LHSValues.second,
 1022   Value *Select;
 1030     Value *SelectOne =
 1037     Value *SelectEq = Builder.CreateSelect(
 1040     Value *SelectGT = Builder.CreateSelect(EmitCmp(CK_Greater),
 1439     llvm::Value *null = CGF.CGM.EmitNullConstant(type);
 1638                                             llvm::Value *outerBegin) {
 1649   llvm::Value *zero = llvm::ConstantInt::get(CGF.SizeTy, 0);
 1650   llvm::Value *indices[] = {zero, zero};
 1651   llvm::Value *begin = Builder.CreateInBoundsGEP(destPtr.getPointer(), indices,
 1674   llvm::Value *element = Builder.CreateInBoundsGEP(begin, index);
 1713   llvm::Value *nextIndex = Builder.CreateNUWAdd(
 1718   llvm::Value *done = Builder.CreateICmpEQ(
 1958   llvm::Value *SizeVal = nullptr;
tools/clang/lib/CodeGen/CGExprCXX.cpp
   37                                   llvm::Value *This, llvm::Value *ImplicitParam,
   37                                   llvm::Value *This, llvm::Value *ImplicitParam,
   81     llvm::Value *This, llvm::Value *ImplicitParam, QualType ImplicitParamTy,
   81     llvm::Value *This, llvm::Value *ImplicitParam, QualType ImplicitParamTy,
   94     GlobalDecl Dtor, const CGCallee &Callee, llvm::Value *This, QualType ThisTy,
   95     llvm::Value *ImplicitParam, QualType ImplicitParamTy, const CallExpr *CE) {
  381       llvm::Value *VTable;
  437   llvm::Value *MemFnPtr = EmitScalarExpr(MemFnExpr);
  440   llvm::Value *ThisPtrForCall = nullptr;
  543       llvm::Value *StoreSizeVal = CGF.CGM.getSize(StoreSize);
  557       llvm::Value *StoreSizeVal = CGF.CGM.getSize(StoreSize);
  673 static llvm::Value *EmitCXXNewAllocSize(CodeGenFunction &CGF,
  676                                         llvm::Value *&numElements,
  677                                         llvm::Value *&sizeWithoutCookie) {
  728   llvm::Value *size;
  801     llvm::Value *hasOverflow = nullptr;
  810       llvm::Value *thresholdV
  865       llvm::Value *tsmV =
  867       llvm::Value *result =
  870       llvm::Value *overflowed = CGF.Builder.CreateExtractValue(result, 1);
  888           llvm::Value *asmV =
  905       llvm::Value *cookieSizeV = llvm::ConstantInt::get(CGF.SizeTy, cookieSize);
  906       llvm::Value *result =
  909       llvm::Value *overflowed = CGF.Builder.CreateExtractValue(result, 1);
  965     Address BeginPtr, llvm::Value *NumElements,
  966     llvm::Value *AllocSizeWithoutCookie) {
  997     auto *RemainingSize = AllocSizeWithoutCookie;
 1212   llvm::Value *EndPtr =
 1218     llvm::Value *IsEmpty =
 1257   llvm::Value *NextPtr =
 1263   llvm::Value *IsEnd = Builder.CreateICmpEQ(NextPtr, EndPtr, "array.atend");
 1272                                Address NewPtr, llvm::Value *NumElements,
 1273                                llvm::Value *AllocSizeWithoutCookie) {
 1469                                   llvm::Value *AllocSize,
 1478       typedef llvm::Value *ValueTy;
 1534 llvm::Value *CodeGenFunction::EmitCXXNewExpr(const CXXNewExpr *E) {
 1553   llvm::Value *numElements = nullptr;
 1554   llvm::Value *allocSizeWithoutCookie = nullptr;
 1555   llvm::Value *allocSize =
 1664     llvm::Value *isNull =
 1733   llvm::Value *resultPtr = result.getPointer();
 1752                                      llvm::Value *Ptr, QualType DeleteTy,
 1753                                      llvm::Value *NumElements,
 1768   llvm::Value *DeletePtr = Builder.CreateBitCast(Ptr, ConvertType(ArgTy));
 1783     llvm::Value *Size = llvm::ConstantInt::get(ConvertType(SizeType),
 1803     llvm::Value *Align = llvm::ConstantInt::get(ConvertType(AlignValType),
 1818     llvm::Value *Ptr;
 1822     CallObjectDelete(llvm::Value *Ptr,
 1835                                              llvm::Value *CompletePtr,
 1948     llvm::Value *Ptr;
 1950     llvm::Value *NumElements;
 1954     CallArrayDelete(llvm::Value *Ptr,
 1956                     llvm::Value *NumElements,
 1974   llvm::Value *numElements = nullptr;
 1975   llvm::Value *allocatedPtr = nullptr;
 1997     llvm::Value *arrayBegin = deletedPtr.getPointer();
 1998     llvm::Value *arrayEnd =
 2022   llvm::Value *IsNull = Builder.CreateIsNull(Ptr.getPointer(), "isnull");
 2041     llvm::Value *Zero = Builder.getInt32(0);
 2042     SmallVector<llvm::Value*,8> GEP;
 2103 static llvm::Value *EmitTypeidFromVTable(CodeGenFunction &CGF, const Expr *E,
 2131     llvm::Value *IsNull = CGF.Builder.CreateIsNull(ThisPtr.getPointer());
 2143 llvm::Value *CodeGenFunction::EmitCXXTypeidExpr(const CXXTypeidExpr *E) {
 2167 static llvm::Value *EmitDynamicCastToNull(CodeGenFunction &CGF,
 2182 llvm::Value *CodeGenFunction::EmitDynamicCast(Address ThisAddr,
 2216     if (llvm::Value *T = EmitDynamicCastToNull(*this, DestTy))
 2236     llvm::Value *IsNull = Builder.CreateIsNull(ThisAddr.getPointer());
 2241   llvm::Value *Value;
tools/clang/lib/CodeGen/CGExprComplex.cpp
   86   ComplexPairTy EmitScalarToComplexCast(llvm::Value *Val, QualType SrcType,
  354   llvm::Value *Real = nullptr, *Imag = nullptr;
  395   llvm::Value *U = llvm::UndefValue::get(EltTy);
  401   llvm::Value *Imag = CGF.EmitScalarExpr(IL->getSubExpr());
  438 ComplexPairTy ComplexExprEmitter::EmitScalarToComplexCast(llvm::Value *Val,
  551   llvm::Value *ResR, *ResI;
  567   llvm::Value *ResI;
  577   llvm::Value *ResR, *ResI;
  596   llvm::Value *ResR, *ResI;
  678   Value *ResR, *ResI;
  701       Value *AC = Builder.CreateFMul(Op.LHS.first, Op.RHS.first, "mul_ac");
  702       Value *BD = Builder.CreateFMul(Op.LHS.second, Op.RHS.second, "mul_bd");
  703       Value *AD = Builder.CreateFMul(Op.LHS.first, Op.RHS.second, "mul_ad");
  704       Value *BC = Builder.CreateFMul(Op.LHS.second, Op.RHS.first, "mul_bc");
  713       Value *IsRNaN = Builder.CreateFCmpUNO(ResR, ResR, "isnan_cmp");
  726       Value *IsINaN = Builder.CreateFCmpUNO(ResI, ResI, "isnan_cmp");
  733       Value *LibCallR, *LibCallI;
  765     Value *ResRl = Builder.CreateMul(Op.LHS.first, Op.RHS.first, "mul.rl");
  766     Value *ResRr = Builder.CreateMul(Op.LHS.second, Op.RHS.second, "mul.rr");
  769     Value *ResIl = Builder.CreateMul(Op.LHS.second, Op.RHS.first, "mul.il");
  770     Value *ResIr = Builder.CreateMul(Op.LHS.first, Op.RHS.second, "mul.ir");
  779   llvm::Value *LHSr = Op.LHS.first, *LHSi = Op.LHS.second;
  780   llvm::Value *RHSr = Op.RHS.first, *RHSi = Op.RHS.second;
  782   llvm::Value *DSTr, *DSTi;
  818       llvm::Value *AC = Builder.CreateFMul(LHSr, RHSr); // a*c
  819       llvm::Value *BD = Builder.CreateFMul(LHSi, RHSi); // b*d
  820       llvm::Value *ACpBD = Builder.CreateFAdd(AC, BD); // ac+bd
  822       llvm::Value *CC = Builder.CreateFMul(RHSr, RHSr); // c*c
  823       llvm::Value *DD = Builder.CreateFMul(RHSi, RHSi); // d*d
  824       llvm::Value *CCpDD = Builder.CreateFAdd(CC, DD); // cc+dd
  826       llvm::Value *BC = Builder.CreateFMul(LHSi, RHSr); // b*c
  827       llvm::Value *AD = Builder.CreateFMul(LHSr, RHSi); // a*d
  828       llvm::Value *BCmAD = Builder.CreateFSub(BC, AD); // bc-ad
  842     llvm::Value *Tmp1 = Builder.CreateMul(LHSr, RHSr); // a*c
  843     llvm::Value *Tmp2 = Builder.CreateMul(LHSi, RHSi); // b*d
  844     llvm::Value *Tmp3 = Builder.CreateAdd(Tmp1, Tmp2); // ac+bd
  846     llvm::Value *Tmp4 = Builder.CreateMul(RHSr, RHSr); // c*c
  847     llvm::Value *Tmp5 = Builder.CreateMul(RHSi, RHSi); // d*d
  848     llvm::Value *Tmp6 = Builder.CreateAdd(Tmp4, Tmp5); // cc+dd
  850     llvm::Value *Tmp7 = Builder.CreateMul(LHSi, RHSr); // b*c
  851     llvm::Value *Tmp8 = Builder.CreateMul(LHSr, RHSi); // a*d
  852     llvm::Value *Tmp9 = Builder.CreateSub(Tmp7, Tmp8); // bc-ad
  923     llvm::Value *LHSVal = CGF.EmitLoadOfScalar(LHS, Loc);
  945     llvm::Value *ResVal =
 1069     llvm::Value *Real = CGF.EmitScalarExpr(E->getInit(0));
 1070     llvm::Value *Imag = CGF.EmitScalarExpr(E->getInit(1));
 1080   llvm::Value* zeroConstant = llvm::Constant::getNullValue(LTy);
 1092     llvm::Value *U = llvm::UndefValue::get(EltTy);
 1165                                     llvm::Value *&Result) {
tools/clang/lib/CodeGen/CGExprScalar.cpp
   87   Value *LHS;
   88   Value *RHS;
  220 static Value *propagateFMFlags(Value *V, const BinOpInfo &Op) {
  220 static Value *propagateFMFlags(Value *V, const BinOpInfo &Op) {
  230   : public StmtVisitor<ScalarExprEmitter, Value*> {
  258   void EmitBinOpCheck(ArrayRef<std::pair<Value *, SanitizerMask>> Checks,
  261   Value *EmitLoadOfLValue(LValue LV, SourceLocation Loc) {
  265   void EmitLValueAlignmentAssumption(const Expr *E, Value *V) {
  295     Value *AlignmentValue = CGF.EmitScalarExpr(AVAttr->getAlignment());
  303   Value *EmitLoadOfLValue(const Expr *E) {
  304     Value *V = EmitLoadOfLValue(EmitCheckedLValue(E, CodeGenFunction::TCK_Load),
  313   Value *EmitConversionToBool(Value *Src, QualType DstTy);
  313   Value *EmitConversionToBool(Value *Src, QualType DstTy);
  317   void EmitFloatConversionCheck(Value *OrigSrc, QualType OrigSrcType,
  318                                 Value *Src, QualType SrcType, QualType DstType,
  333   void EmitIntegerTruncationCheck(Value *Src, QualType SrcType, Value *Dst,
  333   void EmitIntegerTruncationCheck(Value *Src, QualType SrcType, Value *Dst,
  339   void EmitIntegerSignChangeCheck(Value *Src, QualType SrcType, Value *Dst,
  339   void EmitIntegerSignChangeCheck(Value *Src, QualType SrcType, Value *Dst,
  361   Value *
  362   EmitScalarConversion(Value *Src, QualType SrcTy, QualType DstTy,
  368   Value *EmitFixedPointConversion(Value *Src, QualType SrcTy, QualType DstTy,
  368   Value *EmitFixedPointConversion(Value *Src, QualType SrcTy, QualType DstTy,
  370   Value *EmitFixedPointConversion(Value *Src, FixedPointSemantics &SrcFixedSema,
  370   Value *EmitFixedPointConversion(Value *Src, FixedPointSemantics &SrcFixedSema,
  377   Value *EmitComplexToScalarConversion(CodeGenFunction::ComplexPairTy Src,
  382   Value *EmitNullValue(QualType Ty);
  385   Value *EmitFloatToBoolConversion(Value *V) {
  385   Value *EmitFloatToBoolConversion(Value *V) {
  387     llvm::Value *Zero = llvm::Constant::getNullValue(V->getType());
  392   Value *EmitPointerToBoolConversion(Value *V, QualType QT) {
  392   Value *EmitPointerToBoolConversion(Value *V, QualType QT) {
  393     Value *Zero = CGF.CGM.getNullPointer(cast<llvm::PointerType>(V->getType()), QT);
  398   Value *EmitIntToBoolConversion(Value *V) {
  398   Value *EmitIntToBoolConversion(Value *V) {
  404         Value *Result = ZI->getOperand(0);
  421   Value *Visit(Expr *E) {
  426   Value *VisitStmt(Stmt *S) {
  430   Value *VisitExpr(Expr *S);
  432   Value *VisitConstantExpr(ConstantExpr *E) {
  435   Value *VisitParenExpr(ParenExpr *PE) {
  438   Value *VisitSubstNonTypeTemplateParmExpr(SubstNonTypeTemplateParmExpr *E) {
  441   Value *VisitGenericSelectionExpr(GenericSelectionExpr *GE) {
  444   Value *VisitCoawaitExpr(CoawaitExpr *S) {
  447   Value *VisitCoyieldExpr(CoyieldExpr *S) {
  450   Value *VisitUnaryCoawait(const UnaryOperator *E) {
  455   Value *VisitIntegerLiteral(const IntegerLiteral *E) {
  458   Value *VisitFixedPointLiteral(const FixedPointLiteral *E) {
  461   Value *VisitFloatingLiteral(const FloatingLiteral *E) {
  464   Value *VisitCharacterLiteral(const CharacterLiteral *E) {
  467   Value *VisitObjCBoolLiteralExpr(const ObjCBoolLiteralExpr *E) {
  470   Value *VisitCXXBoolLiteralExpr(const CXXBoolLiteralExpr *E) {
  473   Value *VisitCXXScalarValueInitExpr(const CXXScalarValueInitExpr *E) {
  476   Value *VisitGNUNullExpr(const GNUNullExpr *E) {
  479   Value *VisitOffsetOfExpr(OffsetOfExpr *E);
  480   Value *VisitUnaryExprOrTypeTraitExpr(const UnaryExprOrTypeTraitExpr *E);
  481   Value *VisitAddrLabelExpr(const AddrLabelExpr *E) {
  482     llvm::Value *V = CGF.GetAddrOfLabel(E->getLabel());
  486   Value *VisitSizeOfPackExpr(SizeOfPackExpr *E) {
  490   Value *VisitPseudoObjectExpr(PseudoObjectExpr *E) {
  494   Value *VisitOpaqueValueExpr(OpaqueValueExpr *E) {
  504   Value *VisitDeclRefExpr(DeclRefExpr *E) {
  510   Value *VisitObjCSelectorExpr(ObjCSelectorExpr *E) {
  513   Value *VisitObjCProtocolExpr(ObjCProtocolExpr *E) {
  516   Value *VisitObjCIvarRefExpr(ObjCIvarRefExpr *E) {
  519   Value *VisitObjCMessageExpr(ObjCMessageExpr *E) {
  526   Value *VisitObjCIsaExpr(ObjCIsaExpr *E) {
  528     Value *V = CGF.EmitLoadOfLValue(LV, E->getExprLoc()).getScalarVal();
  532   Value *VisitObjCAvailabilityCheckExpr(ObjCAvailabilityCheckExpr *E) {
  541     llvm::Value *Args[] = {
  550   Value *VisitArraySubscriptExpr(ArraySubscriptExpr *E);
  551   Value *VisitShuffleVectorExpr(ShuffleVectorExpr *E);
  552   Value *VisitConvertVectorExpr(ConvertVectorExpr *E);
  553   Value *VisitMemberExpr(MemberExpr *E);
  554   Value *VisitExtVectorElementExpr(Expr *E) { return EmitLoadOfLValue(E); }
  555   Value *VisitCompoundLiteralExpr(CompoundLiteralExpr *E) {
  559   Value *VisitInitListExpr(InitListExpr *E);
  561   Value *VisitArrayInitIndexExpr(ArrayInitIndexExpr *E) {
  567   Value *VisitImplicitValueInitExpr(const ImplicitValueInitExpr *E) {
  570   Value *VisitExplicitCastExpr(ExplicitCastExpr *E) {
  574   Value *VisitCastExpr(CastExpr *E);
  576   Value *VisitCallExpr(const CallExpr *E) {
  580     Value *V = CGF.EmitCallExpr(E).getScalarVal();
  586   Value *VisitStmtExpr(const StmtExpr *E);
  589   Value *VisitUnaryPostDec(const UnaryOperator *E) {
  593   Value *VisitUnaryPostInc(const UnaryOperator *E) {
  597   Value *VisitUnaryPreDec(const UnaryOperator *E) {
  601   Value *VisitUnaryPreInc(const UnaryOperator *E) {
  606   llvm::Value *EmitIncDecConsiderOverflowBehavior(const UnaryOperator *E,
  607                                                   llvm::Value *InVal,
  610   llvm::Value *EmitScalarPrePostIncDec(const UnaryOperator *E, LValue LV,
  614   Value *VisitUnaryAddrOf(const UnaryOperator *E) {
  620   Value *VisitUnaryDeref(const UnaryOperator *E) {
  625   Value *VisitUnaryPlus(const UnaryOperator *E) {
  630   Value *VisitUnaryMinus    (const UnaryOperator *E);
  631   Value *VisitUnaryNot      (const UnaryOperator *E);
  632   Value *VisitUnaryLNot     (const UnaryOperator *E);
  633   Value *VisitUnaryReal     (const UnaryOperator *E);
  634   Value *VisitUnaryImag     (const UnaryOperator *E);
  635   Value *VisitUnaryExtension(const UnaryOperator *E) {
  640   Value *VisitMaterializeTemporaryExpr(const MaterializeTemporaryExpr *E) {
  643   Value *VisitSourceLocExpr(SourceLocExpr *SLE) {
  651   Value *VisitCXXDefaultArgExpr(CXXDefaultArgExpr *DAE) {
  655   Value *VisitCXXDefaultInitExpr(CXXDefaultInitExpr *DIE) {
  659   Value *VisitCXXThisExpr(CXXThisExpr *TE) {
  663   Value *VisitExprWithCleanups(ExprWithCleanups *E);
  664   Value *VisitCXXNewExpr(const CXXNewExpr *E) {
  667   Value *VisitCXXDeleteExpr(const CXXDeleteExpr *E) {
  672   Value *VisitTypeTraitExpr(const TypeTraitExpr *E) {
  676   Value *VisitConceptSpecializationExpr(const ConceptSpecializationExpr *E) {
  680   Value *VisitArrayTypeTraitExpr(const ArrayTypeTraitExpr *E) {
  684   Value *VisitExpressionTraitExpr(const ExpressionTraitExpr *E) {
  688   Value *VisitCXXPseudoDestructorExpr(const CXXPseudoDestructorExpr *E) {
  698   Value *VisitCXXNullPtrLiteralExpr(const CXXNullPtrLiteralExpr *E) {
  702   Value *VisitCXXThrowExpr(const CXXThrowExpr *E) {
  707   Value *VisitCXXNoexceptExpr(const CXXNoexceptExpr *E) {
  712   Value *EmitMul(const BinOpInfo &Ops) {
  734       Value *V = Builder.CreateFMul(Ops.LHS, Ops.RHS, "mul");
  741   Value *EmitOverflowCheckedBinOp(const BinOpInfo &Ops);
  745                                                   llvm::Value *Zero,bool isDiv);
  747   static Value *GetWidthMinusOneValue(Value* LHS,Value* RHS);
  747   static Value *GetWidthMinusOneValue(Value* LHS,Value* RHS);
  747   static Value *GetWidthMinusOneValue(Value* LHS,Value* RHS);
  748   Value *EmitDiv(const BinOpInfo &Ops);
  749   Value *EmitRem(const BinOpInfo &Ops);
  750   Value *EmitAdd(const BinOpInfo &Ops);
  751   Value *EmitSub(const BinOpInfo &Ops);
  752   Value *EmitShl(const BinOpInfo &Ops);
  753   Value *EmitShr(const BinOpInfo &Ops);
  754   Value *EmitAnd(const BinOpInfo &Ops) {
  757   Value *EmitXor(const BinOpInfo &Ops) {
  760   Value *EmitOr (const BinOpInfo &Ops) {
  765   Value *EmitFixedPointBinOp(const BinOpInfo &Ops);
  772   Value *EmitCompoundAssign(const CompoundAssignOperator *E,
  796   Value *EmitCompare(const BinaryOperator *E, llvm::CmpInst::Predicate UICmpOpc,
  811   Value *VisitBinAssign     (const BinaryOperator *E);
  813   Value *VisitBinLAnd       (const BinaryOperator *E);
  814   Value *VisitBinLOr        (const BinaryOperator *E);
  815   Value *VisitBinComma      (const BinaryOperator *E);
  817   Value *VisitBinPtrMemD(const Expr *E) { return EmitLoadOfLValue(E); }
  818   Value *VisitBinPtrMemI(const Expr *E) { return EmitLoadOfLValue(E); }
  820   Value *VisitCXXRewrittenBinaryOperator(CXXRewrittenBinaryOperator *E) {
  825   Value *VisitBlockExpr(const BlockExpr *BE);
  826   Value *VisitAbstractConditionalOperator(const AbstractConditionalOperator *);
  827   Value *VisitChooseExpr(ChooseExpr *CE);
  828   Value *VisitVAArgExpr(VAArgExpr *VE);
  829   Value *VisitObjCStringLiteral(const ObjCStringLiteral *E) {
  832   Value *VisitObjCBoxedExpr(ObjCBoxedExpr *E) {
  835   Value *VisitObjCArrayLiteral(ObjCArrayLiteral *E) {
  838   Value *VisitObjCDictionaryLiteral(ObjCDictionaryLiteral *E) {
  841   Value *VisitAsTypeExpr(AsTypeExpr *CE);
  842   Value *VisitAtomicExpr(AtomicExpr *AE);
  852 Value *ScalarExprEmitter::EmitConversionToBool(Value *Src, QualType SrcType) {
  852 Value *ScalarExprEmitter::EmitConversionToBool(Value *Src, QualType SrcType) {
  872     Value *OrigSrc, QualType OrigSrcType, Value *Src, QualType SrcType,
  872     Value *OrigSrc, QualType OrigSrcType, Value *Src, QualType SrcType,
  882   llvm::Value *Check = nullptr;
  926   llvm::Value *GE =
  928   llvm::Value *LE =
  942                  std::pair<llvm::Value *, SanitizerMask>>
  943 EmitIntegerTruncationCheckHelper(Value *Src, QualType SrcType, Value *Dst,
  943 EmitIntegerTruncationCheckHelper(Value *Src, QualType SrcType, Value *Dst,
  970   llvm::Value *Check = nullptr;
  979 void ScalarExprEmitter::EmitIntegerTruncationCheck(Value *Src, QualType SrcType,
  980                                                    Value *Dst, QualType DstType,
 1010             std::pair<llvm::Value *, SanitizerMask>>
 1030                  std::pair<llvm::Value *, SanitizerMask>>
 1031 EmitIntegerSignChangeCheckHelper(Value *Src, QualType SrcType, Value *Dst,
 1031 EmitIntegerSignChangeCheckHelper(Value *Src, QualType SrcType, Value *Dst,
 1072   llvm::Value *SrcIsNegative = EmitIsNegativeTest(Src, SrcType, "src");
 1074   llvm::Value *DstIsNegative = EmitIsNegativeTest(Dst, DstType, "dst");
 1079   llvm::Value *Check = nullptr;
 1087 void ScalarExprEmitter::EmitIntegerSignChangeCheck(Value *Src, QualType SrcType,
 1088                                                    Value *Dst, QualType DstType,
 1134             std::pair<llvm::Value *, SanitizerMask>>
 1139   llvm::SmallVector<std::pair<llvm::Value *, SanitizerMask>, 2> Checks;
 1170 Value *ScalarExprEmitter::EmitScalarConversion(Value *Src, QualType SrcType,
 1170 Value *ScalarExprEmitter::EmitScalarConversion(Value *Src, QualType SrcType,
 1212   llvm::Value *OrigSrc = Src;
 1269     llvm::Value* IntResult =
 1332   Value *Res = nullptr;
 1408 Value *ScalarExprEmitter::EmitFixedPointConversion(Value *Src, QualType SrcTy,
 1408 Value *ScalarExprEmitter::EmitFixedPointConversion(Value *Src, QualType SrcTy,
 1419 Value *ScalarExprEmitter::EmitFixedPointConversion(
 1420     Value *Src, FixedPointSemantics &SrcFPSema, FixedPointSemantics &DstFPSema,
 1435   Value *Result = Src;
 1444       Value *Zero = llvm::Constant::getNullValue(Result->getType());
 1445       Value *IsNegative = Builder.CreateICmpSLT(Result, Zero);
 1446       Value *LowBits = ConstantInt::get(
 1448       Value *Rounded = Builder.CreateAdd(Result, LowBits);
 1477       Value *Max = ConstantInt::get(
 1480       Value *TooHigh = SrcIsSigned ? Builder.CreateICmpSGT(Result, Max)
 1487       Value *Min = ConstantInt::get(
 1490       Value *TooLow = Builder.CreateICmpSLT(Result, Min);
 1503 Value *ScalarExprEmitter::EmitComplexToScalarConversion(
 1524 Value *ScalarExprEmitter::EmitNullValue(QualType Ty) {
 1533     ArrayRef<std::pair<Value *, SanitizerMask>> Checks, const BinOpInfo &Info) {
 1537   SmallVector<llvm::Value *, 2> DynamicData;
 1583 Value *ScalarExprEmitter::VisitExpr(Expr *E) {
 1590 Value *ScalarExprEmitter::VisitShuffleVectorExpr(ShuffleVectorExpr *E) {
 1593     Value *LHS = CGF.EmitScalarExpr(E->getExpr(0));
 1594     Value *RHS = CGF.EmitScalarExpr(E->getExpr(1));
 1595     Value *Mask;
 1605     Value *MaskBits =
 1617     Value* NewV = llvm::UndefValue::get(RTy);
 1619       Value *IIndx = llvm::ConstantInt::get(CGF.SizeTy, i);
 1620       Value *Indx = Builder.CreateExtractElement(Mask, IIndx, "shuf_idx");
 1622       Value *VExt = Builder.CreateExtractElement(LHS, Indx, "shuf_elt");
 1628   Value* V1 = CGF.EmitScalarExpr(E->getExpr(0));
 1629   Value* V2 = CGF.EmitScalarExpr(E->getExpr(1));
 1641   Value *SV = llvm::ConstantVector::get(indices);
 1645 Value *ScalarExprEmitter::VisitConvertVectorExpr(ConvertVectorExpr *E) {
 1649   Value *Src  = CGF.EmitScalarExpr(E->getSrcExpr());
 1682     llvm::Value *Zero = llvm::Constant::getNullValue(SrcTy);
 1691   Value *Res = nullptr;
 1719 Value *ScalarExprEmitter::VisitMemberExpr(MemberExpr *E) {
 1735 Value *ScalarExprEmitter::VisitArraySubscriptExpr(ArraySubscriptExpr *E) {
 1747   Value *Base = Visit(E->getBase());
 1748   Value *Idx  = Visit(E->getIdx());
 1775 Value *ScalarExprEmitter::VisitInitListExpr(InitListExpr *E) {
 1805   llvm::Value *V = llvm::UndefValue::get(VType);
 1808     Value *Init = Visit(IE);
 1822           Value *LHS = nullptr, *RHS = nullptr;
 1867       Value *SVOp = SVI->getOperand(0);
 1926     Value *Idx = Builder.getInt32(CurIdx);
 1927     llvm::Value *Init = llvm::Constant::getNullValue(EltTy);
 1956 Value *ScalarExprEmitter::VisitCastExpr(CastExpr *CE) {
 1994     Value *Src = Visit(const_cast<Expr*>(E));
 2121     Value *Src = Visit(E);
 2160     Value *Src = Visit(const_cast<Expr*>(E));
 2167     llvm::Value* IntResult =
 2170     auto *IntToPtr = Builder.CreateIntToPtr(IntResult, DestLLVMTy);
 2182     auto *PtrExpr = Visit(E);
 2201     Value *Elt = Visit(const_cast<Expr*>(E));
 2260     llvm::Value *MemPtr = Visit(E);
 2293 Value *ScalarExprEmitter::VisitStmtExpr(const StmtExpr *E) {
 2303 Value *ScalarExprEmitter::VisitExprWithCleanups(ExprWithCleanups *E) {
 2306   Value *V = Visit(E->getSubExpr());
 2318                                            llvm::Value *InVal, bool IsInc) {
 2329 llvm::Value *ScalarExprEmitter::EmitIncDecConsiderOverflowBehavior(
 2330     const UnaryOperator *E, llvm::Value *InVal, bool IsInc) {
 2331   llvm::Value *Amount =
 2349 llvm::Value *
 2355   llvm::Value *value;
 2356   llvm::Value *input;
 2364       llvm::Value *True = CGF.EmitToMemory(Builder.getTrue(), type);
 2388       llvm::Value *amt = CGF.EmitToMemory(
 2390       llvm::Value *old = Builder.CreateAtomicRMW(aop,
 2431       llvm::Value *amt = llvm::ConstantInt::get(value->getType(), amount, true);
 2442       llvm::Value *numElts = CGF.getVLASize(vla).NumElts;
 2453       llvm::Value *amt = Builder.getInt32(amount);
 2466       llvm::Value *amt = Builder.getInt32(amount);
 2478       llvm::Value *amt = llvm::ConstantInt::get(value->getType(), amount);
 2491     llvm::Value *amt;
 2547     llvm::Value *sizeValue =
 2564     llvm::Value *old = CGF.EmitToMemory(Pair.first.getScalarVal(), type);
 2565     llvm::Value *success = Pair.second;
 2585 Value *ScalarExprEmitter::VisitUnaryMinus(const UnaryOperator *E) {
 2587   Value *Op = Visit(E->getSubExpr());
 2604 Value *ScalarExprEmitter::VisitUnaryNot(const UnaryOperator *E) {
 2606   Value *Op = Visit(E->getSubExpr());
 2610 Value *ScalarExprEmitter::VisitUnaryLNot(const UnaryOperator *E) {
 2613     Value *Oper = Visit(E->getSubExpr());
 2614     Value *Zero = llvm::Constant::getNullValue(Oper->getType());
 2615     Value *Result;
 2624   Value *BoolVal = CGF.EvaluateExprAsBool(E->getSubExpr());
 2635 Value *ScalarExprEmitter::VisitOffsetOfExpr(OffsetOfExpr *E) {
 2646   llvm::Value* Result = llvm::Constant::getNullValue(ResultType);
 2650     llvm::Value *Offset = nullptr;
 2655       llvm::Value* Idx = CGF.EmitScalarExpr(IdxExpr);
 2664       llvm::Value* ElemSize = llvm::ConstantInt::get(ResultType,
 2728 Value *
 2745       llvm::Value *size = VlaSize.NumElts;
 2768 Value *ScalarExprEmitter::VisitUnaryReal(const UnaryOperator *E) {
 2785 Value *ScalarExprEmitter::VisitUnaryImag(const UnaryOperator *E) {
 2879         llvm::Value *amt = CGF.EmitToMemory(
 2920     llvm::Value *old = CGF.EmitToMemory(Pair.first.getScalarVal(), LHSTy);
 2921     llvm::Value *success = Pair.second;
 2940 Value *ScalarExprEmitter::EmitCompoundAssign(const CompoundAssignOperator *E,
 2943   Value *RHS = nullptr;
 2963     const BinOpInfo &Ops, llvm::Value *Zero, bool isDiv) {
 2964   SmallVector<std::pair<llvm::Value *, SanitizerMask>, 2> Checks;
 2978     llvm::Value *IntMin =
 2980     llvm::Value *NegOne = llvm::ConstantInt::get(Ty, -1ULL);
 2982     llvm::Value *LHSCmp = Builder.CreateICmpNE(Ops.LHS, IntMin);
 2983     llvm::Value *RHSCmp = Builder.CreateICmpNE(Ops.RHS, NegOne);
 2984     llvm::Value *NotOverflow = Builder.CreateOr(LHSCmp, RHSCmp, "or");
 2993 Value *ScalarExprEmitter::EmitDiv(const BinOpInfo &Ops) {
 3000       llvm::Value *Zero = llvm::Constant::getNullValue(ConvertType(Ops.Ty));
 3005       llvm::Value *Zero = llvm::Constant::getNullValue(ConvertType(Ops.Ty));
 3006       llvm::Value *NonZero = Builder.CreateFCmpUNE(Ops.RHS, Zero);
 3013     llvm::Value *Val = Builder.CreateFDiv(Ops.LHS, Ops.RHS, "div");
 3035 Value *ScalarExprEmitter::EmitRem(const BinOpInfo &Ops) {
 3042     llvm::Value *Zero = llvm::Constant::getNullValue(ConvertType(Ops.Ty));
 3052 Value *ScalarExprEmitter::EmitOverflowCheckedBinOp(const BinOpInfo &Ops) {
 3088   Value *resultAndOverflow = Builder.CreateCall(intrinsic, {Ops.LHS, Ops.RHS});
 3089   Value *result = Builder.CreateExtractValue(resultAndOverflow, 0);
 3090   Value *overflow = Builder.CreateExtractValue(resultAndOverflow, 1);
 3099       llvm::Value *NotOverflow = Builder.CreateNot(overflow);
 3130   llvm::Value *lhs = Builder.CreateSExt(Ops.LHS, CGF.Int64Ty);
 3131   llvm::Value *rhs = Builder.CreateSExt(Ops.RHS, CGF.Int64Ty);
 3135   llvm::Value *handlerArgs[] = {
 3141   llvm::Value *handlerResult =
 3157 static Value *emitPointerArithmetic(CodeGenFunction &CGF,
 3164   Value *pointer = op.LHS;
 3166   Value *index = op.RHS;
 3225     llvm::Value *objectSize
 3230     Value *result = CGF.Builder.CreateBitCast(pointer, CGF.VoidPtrTy);
 3239     llvm::Value *numElements = CGF.getVLASize(vla).NumElts;
 3261     Value *result = CGF.Builder.CreateBitCast(pointer, CGF.VoidPtrTy);
 3278 static Value* buildFMulAdd(llvm::BinaryOperator *MulOp, Value *Addend,
 3278 static Value* buildFMulAdd(llvm::BinaryOperator *MulOp, Value *Addend,
 3283   Value *MulOp0 = MulOp->getOperand(0);
 3284   Value *MulOp1 = MulOp->getOperand(1);
 3297   Value *FMulAdd = Builder.CreateCall(
 3311 static Value* tryEmitFMulAdd(const BinOpInfo &op,
 3340 Value *ScalarExprEmitter::EmitAdd(const BinOpInfo &op) {
 3367     if (Value *FMulAdd = tryEmitFMulAdd(op, CGF, Builder))
 3370     Value *V = Builder.CreateFAdd(op.LHS, op.RHS, "add");
 3382 Value *ScalarExprEmitter::EmitFixedPointBinOp(const BinOpInfo &op) {
 3395   Value *LHS = op.LHS;
 3396   Value *RHS = op.RHS;
 3404   Value *FullLHS = EmitFixedPointConversion(LHS, LHSFixedSema, CommonFixedSema,
 3406   Value *FullRHS = EmitFixedPointConversion(RHS, RHSFixedSema, CommonFixedSema,
 3410   Value *Result;
 3487 Value *ScalarExprEmitter::EmitSub(const BinOpInfo &op) {
 3512       if (Value *FMulAdd = tryEmitFMulAdd(op, CGF, Builder, true))
 3514       Value *V = Builder.CreateFSub(op.LHS, op.RHS, "sub");
 3532   llvm::Value *LHS
 3534   llvm::Value *RHS
 3536   Value *diffInChars = Builder.CreateSub(LHS, RHS, "sub.ptr.sub");
 3542   llvm::Value *divisor = nullptr;
 3581 Value *ScalarExprEmitter::GetWidthMinusOneValue(Value* LHS,Value* RHS) {
 3581 Value *ScalarExprEmitter::GetWidthMinusOneValue(Value* LHS,Value* RHS) {
 3581 Value *ScalarExprEmitter::GetWidthMinusOneValue(Value* LHS,Value* RHS) {
 3590 Value *ScalarExprEmitter::EmitShl(const BinOpInfo &Ops) {
 3593   Value *RHS = Ops.RHS;
 3609     SmallVector<std::pair<Value *, SanitizerMask>, 2> Checks;
 3610     llvm::Value *WidthMinusOne = GetWidthMinusOneValue(Ops.LHS, Ops.RHS);
 3611     llvm::Value *ValidExponent = Builder.CreateICmpULE(Ops.RHS, WidthMinusOne);
 3626       llvm::Value *PromotedWidthMinusOne =
 3630       llvm::Value *BitsShiftedOff = Builder.CreateLShr(
 3639         llvm::Value *One = llvm::ConstantInt::get(BitsShiftedOff->getType(), 1);
 3642       llvm::Value *Zero = llvm::ConstantInt::get(BitsShiftedOff->getType(), 0);
 3643       llvm::Value *ValidBase = Builder.CreateICmpEQ(BitsShiftedOff, Zero);
 3658 Value *ScalarExprEmitter::EmitShr(const BinOpInfo &Ops) {
 3661   Value *RHS = Ops.RHS;
 3672     llvm::Value *Valid =
 3725 Value *ScalarExprEmitter::EmitCompare(const BinaryOperator *E,
 3730   Value *Result;
 3736     Value *LHS = CGF.EmitScalarExpr(E->getLHS());
 3737     Value *RHS = CGF.EmitScalarExpr(E->getRHS());
 3742     Value *LHS = BOInfo.LHS;
 3743     Value *RHS = BOInfo.RHS;
 3754       Value *FirstVecArg = LHS,
 3804       Value *CR6Param = Builder.getInt32(CR6);
 3879     Value *ResultR, *ResultI;
 3903 Value *ScalarExprEmitter::VisitBinAssign(const BinaryOperator *E) {
 3906   Value *RHS;
 3962 Value *ScalarExprEmitter::VisitBinLAnd(const BinaryOperator *E) {
 3967     Value *LHS = Visit(E->getLHS());
 3968     Value *RHS = Visit(E->getRHS());
 3969     Value *Zero = llvm::ConstantAggregateZero::get(LHS->getType());
 3977     Value *And = Builder.CreateAnd(LHS, RHS);
 3990       Value *RHSCond = CGF.EvaluateExprAsBool(E->getRHS());
 4021   Value *RHSCond = CGF.EvaluateExprAsBool(E->getRHS());
 4046 Value *ScalarExprEmitter::VisitBinLOr(const BinaryOperator *E) {
 4051     Value *LHS = Visit(E->getLHS());
 4052     Value *RHS = Visit(E->getRHS());
 4053     Value *Zero = llvm::ConstantAggregateZero::get(LHS->getType());
 4061     Value *Or = Builder.CreateOr(LHS, RHS);
 4074       Value *RHSCond = CGF.EvaluateExprAsBool(E->getRHS());
 4108   Value *RHSCond = CGF.EvaluateExprAsBool(E->getRHS());
 4124 Value *ScalarExprEmitter::VisitBinComma(const BinaryOperator *E) {
 4152 Value *ScalarExprEmitter::
 4174       Value *Result = Visit(live);
 4192     llvm::Value *CondV = CGF.EmitScalarExpr(condExpr);
 4193     llvm::Value *LHS = Visit(lhsExpr);
 4194     llvm::Value *RHS = Visit(rhsExpr);
 4202     llvm::Value *zeroVec = llvm::Constant::getNullValue(vecTy);
 4203     llvm::Value *TestMSB = Builder.CreateICmpSLT(CondV, zeroVec);
 4204     llvm::Value *tmp = Builder.CreateSExt(TestMSB,
 4208     llvm::Value *tmp2 = Builder.CreateNot(tmp);
 4211     llvm::Value *RHSTmp = RHS;
 4212     llvm::Value *LHSTmp = LHS;
 4221     llvm::Value *tmp3 = Builder.CreateAnd(RHSTmp, tmp2);
 4222     llvm::Value *tmp4 = Builder.CreateAnd(LHSTmp, tmp);
 4223     llvm::Value *tmp5 = Builder.CreateOr(tmp3, tmp4, "cond");
 4235     llvm::Value *CondV = CGF.EvaluateExprAsBool(condExpr);
 4236     llvm::Value *StepV = Builder.CreateZExtOrBitCast(CondV, CGF.Int64Ty);
 4240     llvm::Value *LHS = Visit(lhsExpr);
 4241     llvm::Value *RHS = Visit(rhsExpr);
 4261   Value *LHS = Visit(lhsExpr);
 4269   Value *RHS = Visit(rhsExpr);
 4288 Value *ScalarExprEmitter::VisitChooseExpr(ChooseExpr *E) {
 4292 Value *ScalarExprEmitter::VisitVAArgExpr(VAArgExpr *VE) {
 4310   llvm::Value *Val = Builder.CreateLoad(ArgPtr);
 4323 Value *ScalarExprEmitter::VisitBlockExpr(const BlockExpr *block) {
 4328 static Value *ConvertVec3AndVec4(CGBuilderTy &Builder, CodeGenFunction &CGF,
 4329                                  Value *Src, unsigned NumElementsDst) {
 4330   llvm::Value *UnV = llvm::UndefValue::get(Src->getType());
 4357 static Value *createCastsForTypeOfSameSize(CGBuilderTy &Builder,
 4359                                            Value *Src, llvm::Type *DstTy,
 4387 Value *ScalarExprEmitter::VisitAsTypeExpr(AsTypeExpr *E) {
 4388   Value *Src  = CGF.EmitScalarExpr(E->getSrcExpr());
 4430 Value *ScalarExprEmitter::VisitAtomicExpr(AtomicExpr *E) {
 4440 Value *CodeGenFunction::EmitScalarExpr(const Expr *E, bool IgnoreResultAssign) {
 4450 Value *CodeGenFunction::EmitScalarConversion(Value *Src, QualType SrcTy,
 4450 Value *CodeGenFunction::EmitScalarConversion(Value *Src, QualType SrcTy,
 4460 Value *CodeGenFunction::EmitComplexToScalarConversion(ComplexPairTy Src,
 4471 llvm::Value *CodeGenFunction::
 4498   Value *Result = nullptr;
 4547   llvm::Value *TotalOffset;
 4549   llvm::Value *OffsetOverflows;
 4556 static GEPOffsetAndOverflow EmitGEPOffsetInBytes(Value *BasePtr, Value *GEPVal,
 4556 static GEPOffsetAndOverflow EmitGEPOffsetInBytes(Value *BasePtr, Value *GEPVal,
 4563   llvm::Value *TotalOffset = nullptr;
 4569     Value *BasePtr_int =
 4571     Value *GEPVal_int =
 4592   llvm::Value *OffsetOverflows = Builder.getFalse();
 4622     llvm::Value *LocalOffset;
 4623     auto *Index = GTI.getOperand();
 4636       auto *IndexS = Builder.CreateIntCast(Index, IntPtrTy, /*isSigned=*/true);
 4651 Value *
 4652 CodeGenFunction::EmitCheckedInBoundsGEP(Value *Ptr, ArrayRef<Value *> IdxList,
 4652 CodeGenFunction::EmitCheckedInBoundsGEP(Value *Ptr, ArrayRef<Value *> IdxList,
 4655   Value *GEPVal = Builder.CreateInBoundsGEP(Ptr, IdxList, Name);
 4696   auto *IntPtr = Builder.CreatePtrToInt(Ptr, IntPtrTy);
 4697   auto *ComputedGEP = Builder.CreateAdd(IntPtr, EvaluatedGEP.TotalOffset);
 4699   llvm::SmallVector<std::pair<llvm::Value *, SanitizerMask>, 2> Checks;
 4713     auto *BaseIsNotNullptr = Builder.CreateIsNotNull(Ptr);
 4714     auto *ResultIsNotNullptr = Builder.CreateIsNotNull(ComputedGEP);
 4715     auto *Valid =
 4727     llvm::Value *ValidGEP;
 4728     auto *NoOffsetOverflow = Builder.CreateNot(EvaluatedGEP.OffsetOverflows);
 4735       auto *PosOrZeroValid = Builder.CreateICmpUGE(ComputedGEP, IntPtr);
 4736       auto *PosOrZeroOffset =
 4738       llvm::Value *NegValid = Builder.CreateICmpULT(ComputedGEP, IntPtr);
 4762   llvm::Value *DynamicArgs[] = {IntPtr, ComputedGEP};
tools/clang/lib/CodeGen/CGGPUBuiltin.cpp
   93   llvm::Value *BufferPtr;
  108     llvm::Value *Alloca = CreateTempAlloca(AllocaTy);
  111       llvm::Value *P = Builder.CreateStructGEP(AllocaTy, Alloca, I - 1);
  112       llvm::Value *Arg = Args[I].getRValue(*this).getScalarVal();
tools/clang/lib/CodeGen/CGNonTrivialStruct.cpp
  349     llvm::Value *NumElts = CGF.emitArrayLength(AT, BaseEltQT, DstAddr);
  351     llvm::Value *BaseEltSizeVal =
  353     llvm::Value *SizeInBytes =
  356     llvm::Value *DstArrayEnd =
  378     llvm::Value *Done =
  471       llvm::Value *V = CGF->Builder.CreateLoad(CGF->GetAddrOfLocalVar(Args[I]));
  484     llvm::Value *Ptrs[N];
  521       llvm::Value *SizeVal =
  534       llvm::Value *SrcVal = this->CGF->Builder.CreateLoad(SrcAddr, false);
  677     llvm::Value *SrcVal = CGF->EmitLoadOfScalar(
  679     llvm::Value *Val = CGF->EmitARCRetain(QT, SrcVal);
  708     llvm::Value *SrcVal =
  739     llvm::Value *SrcVal = CGF->EmitLoadOfScalar(
  771     llvm::Value *SrcVal =
  775     llvm::Value *DstVal =
tools/clang/lib/CodeGen/CGObjC.cpp
   30 typedef llvm::PointerIntPair<llvm::Value*,1,bool> TryEmitResult;
   45 llvm::Value *CodeGenFunction::EmitObjCStringLiteral(const ObjCStringLiteral *E)
   58 llvm::Value *
   78   llvm::Value *Receiver = Runtime.GetClass(*this, ClassDecl);
  103     llvm::Value *Cast = Builder.CreateBitCast(GV, ConvertType(EncodingQT));
  117 llvm::Value *CodeGenFunction::EmitObjCCollectionLiteral(const Expr *E,
  134     llvm::Value *Ptr = EmitLoadOfScalar(LV, E->getBeginLoc());
  157   SmallVector<llvm::Value *, 16> NeededObjects;
  170       llvm::Value *value = EmitScalarExpr(Rhs);
  180       llvm::Value *keyValue = EmitScalarExpr(Key);
  187       llvm::Value *valueValue = EmitScalarExpr(Value);
  209   llvm::Value *Count =
  221   llvm::Value *Receiver = Runtime.GetClass(*this, Class);
  240 llvm::Value *CodeGenFunction::EmitObjCArrayLiteral(const ObjCArrayLiteral *E) {
  244 llvm::Value *CodeGenFunction::EmitObjCDictionaryLiteral(
  250 llvm::Value *CodeGenFunction::EmitObjCSelectorExpr(const ObjCSelectorExpr *E) {
  258 llvm::Value *CodeGenFunction::EmitObjCProtocolExpr(const ObjCProtocolExpr *E) {
  370 static Optional<llvm::Value *>
  372                                   llvm::Value *Receiver,
  395           const llvm::Value* arg = Args.front().getKnownRValue().getScalarVal();
  436 static Optional<llvm::Value *>
  471   llvm::Value *Receiver;
  500       llvm::Value *result = EmitARCLoadWeakRetained(lvalue.getAddress());
  505   if (Optional<llvm::Value *> Val = tryEmitSpecializedAllocInit(*this, E))
  524   llvm::Value *Receiver = nullptr;
  614     if (Optional<llvm::Value *> SpecializedResult =
  631     llvm::Value *newSelf = result.getScalarVal();
  656     llvm::Value *self = CGF.LoadObjCSelf();
  710 static llvm::Value *emitARCRetainLoadOfScalar(CodeGenFunction &CGF,
  993                                           llvm::Value *returnAddr,
 1004   llvm::Value *ivarAddr =
 1075     llvm::Value *ivarVal = load;
 1101     llvm::Value *cmd =
 1103     llvm::Value *self = Builder.CreateBitCast(LoadObjCSelf(), VoidPtrTy);
 1104     llvm::Value *ivarOffset =
 1164       llvm::Value *value;
 1207   llvm::Value *ivarAddr = CGF.EmitLValueForIvar(CGF.TypeOfSelfObject(),
 1218   llvm::Value *argAddr = CGF.EmitLValue(&argRef).getPointer();
 1223   llvm::Value *size =
 1253   llvm::Value *ivarAddr =
 1264   llvm::Value *argAddr = CGF.EmitLValue(&argRef).getPointer();
 1355     llvm::Value *load = Builder.CreateLoad(argAddr);
 1388     llvm::Value *cmd =
 1390     llvm::Value *self =
 1392     llvm::Value *ivarOffset =
 1395     llvm::Value *arg = Builder.CreateLoad(argAddr, "arg");
 1506     llvm::Value *addr;
 1511     DestroyIvar(llvm::Value *addr, const ObjCIvarDecl *ivar,
 1530   llvm::Value *null = getNullForVariable(addr);
 1538   llvm::Value *self = CGF.LoadObjCSelf();
 1595     llvm::Value *SelfAsId =
 1606 llvm::Value *CodeGenFunction::LoadObjCSelf() {
 1669   llvm::Value *Collection;
 1710   llvm::Value *initialBufferLimit = CountRV.getScalarVal();
 1715   llvm::Value *zero = llvm::Constant::getNullValue(NSUIntegerTy);
 1734   llvm::Value *StateMutationsPtr
 1737   llvm::Value *initialMutations =
 1760   llvm::Value *currentMutations
 1772   llvm::Value *V =
 1816   llvm::Value *EnumStateItems =
 1820   llvm::Value *CurrentItemPtr =
 1822   llvm::Value *CurrentItem =
 1861   llvm::Value *indexPlusOne =
 1884   llvm::Value *refetchCount = CountRV.getScalarVal();
 1899     llvm::Value *null = llvm::Constant::getNullValue(convertedElementType);
 1926     CallObjCRelease(llvm::Value *object) : object(object) {}
 1927     llvm::Value *object;
 1938 llvm::Value *CodeGenFunction::EmitObjCConsumeObject(QualType type,
 1939                                                     llvm::Value *object) {
 1946 llvm::Value *CodeGenFunction::EmitObjCExtendObjectLifetime(QualType type,
 1947                                                            llvm::Value *value) {
 1953 void CodeGenFunction::EmitARCIntrinsicUse(ArrayRef<llvm::Value*> values) {
 1963 static void setARCRuntimeFunctionLinkage(CodeGenModule &CGM, llvm::Value *RTF) {
 1983 static llvm::Value *emitARCValueOperation(
 1984     CodeGenFunction &CGF, llvm::Value *value, llvm::Type *returnType,
 2009 static llvm::Value *emitARCLoadOperation(CodeGenFunction &CGF, Address addr,
 2022   llvm::Value *result = CGF.EmitNounwindRuntimeCall(fn, addr.getPointer());
 2033 static llvm::Value *emitARCStoreOperation(CodeGenFunction &CGF, Address addr,
 2034                                           llvm::Value *value,
 2047   llvm::Value *args[] = {
 2070   llvm::Value *args[] = {
 2080 static llvm::Value *emitObjCValueOperation(CodeGenFunction &CGF,
 2081                                            llvm::Value *value,
 2113 llvm::Value *CodeGenFunction::EmitARCRetain(QualType type, llvm::Value *value) {
 2113 llvm::Value *CodeGenFunction::EmitARCRetain(QualType type, llvm::Value *value) {
 2122 llvm::Value *CodeGenFunction::EmitARCRetainNonBlock(llvm::Value *value) {
 2122 llvm::Value *CodeGenFunction::EmitARCRetainNonBlock(llvm::Value *value) {
 2134 llvm::Value *CodeGenFunction::EmitARCRetainBlock(llvm::Value *value,
 2134 llvm::Value *CodeGenFunction::EmitARCRetainBlock(llvm::Value *value,
 2136   llvm::Value *result
 2200 llvm::Value *
 2201 CodeGenFunction::EmitARCRetainAutoreleasedReturnValue(llvm::Value *value) {
 2221 llvm::Value *
 2222 CodeGenFunction::EmitARCUnsafeClaimAutoreleasedReturnValue(llvm::Value *value) {
 2231 void CodeGenFunction::EmitARCRelease(llvm::Value *value,
 2265     llvm::Value *null = getNullForVariable(addr);
 2270   llvm::Value *value = Builder.CreateLoad(addr);
 2276 llvm::Value *CodeGenFunction::EmitARCStoreStrongCall(Address addr,
 2277                                                      llvm::Value *value,
 2287   llvm::Value *args[] = {
 2300 llvm::Value *CodeGenFunction::EmitARCStoreStrong(LValue dst,
 2301                                                  llvm::Value *newValue,
 2321   llvm::Value *oldValue = EmitLoadOfScalar(dst, SourceLocation());
 2335 llvm::Value *CodeGenFunction::EmitARCAutorelease(llvm::Value *value) {
 2335 llvm::Value *CodeGenFunction::EmitARCAutorelease(llvm::Value *value) {
 2343 llvm::Value *
 2344 CodeGenFunction::EmitARCAutoreleaseReturnValue(llvm::Value *value) {
 2353 llvm::Value *
 2354 CodeGenFunction::EmitARCRetainAutoreleaseReturnValue(llvm::Value *value) {
 2366 llvm::Value *CodeGenFunction::EmitARCRetainAutorelease(QualType type,
 2367                                                        llvm::Value *value) {
 2382 llvm::Value *
 2383 CodeGenFunction::EmitARCRetainAutoreleaseNonBlock(llvm::Value *value) {
 2391 llvm::Value *CodeGenFunction::EmitARCLoadWeak(Address addr) {
 2398 llvm::Value *CodeGenFunction::EmitARCLoadWeakRetained(Address addr) {
 2406 llvm::Value *CodeGenFunction::EmitARCStoreWeak(Address addr,
 2407                                                llvm::Value *value,
 2418 void CodeGenFunction::EmitARCInitWeak(Address addr, llvm::Value *value) {
 2469   llvm::Value *Object = EmitARCLoadWeakRetained(SrcAddr);
 2476   llvm::Value *Object = EmitARCLoadWeakRetained(SrcAddr);
 2484 llvm::Value *CodeGenFunction::EmitObjCAutoreleasePoolPush() {
 2496 void CodeGenFunction::EmitObjCAutoreleasePoolPop(llvm::Value *value) {
 2528 llvm::Value *CodeGenFunction::EmitObjCMRRAutoreleasePoolPush() {
 2530   llvm::Value *Receiver = Runtime.EmitNSAutoreleasePoolClassRef(*this);
 2553 llvm::Value *CodeGenFunction::EmitObjCAlloc(llvm::Value *value,
 2553 llvm::Value *CodeGenFunction::EmitObjCAlloc(llvm::Value *value,
 2562 llvm::Value *CodeGenFunction::EmitObjCAllocWithZone(llvm::Value *value,
 2562 llvm::Value *CodeGenFunction::EmitObjCAllocWithZone(llvm::Value *value,
 2569 llvm::Value *CodeGenFunction::EmitObjCAllocInit(llvm::Value *value,
 2569 llvm::Value *CodeGenFunction::EmitObjCAllocInit(llvm::Value *value,
 2578 void CodeGenFunction::EmitObjCMRRAutoreleasePoolPop(llvm::Value *Arg) {
 2606   llvm::Value *value = CGF.Builder.CreateLoad(addr);
 2612 llvm::Value *CodeGenFunction::EmitObjCAutorelease(llvm::Value *value,
 2612 llvm::Value *CodeGenFunction::EmitObjCAutorelease(llvm::Value *value,
 2622 llvm::Value *CodeGenFunction::EmitObjCRetainNonBlock(llvm::Value *value,
 2622 llvm::Value *CodeGenFunction::EmitObjCRetainNonBlock(llvm::Value *value,
 2631 void CodeGenFunction::EmitObjCRelease(llvm::Value *value,
 2661     llvm::Value *Token;
 2663     CallObjCAutoreleasePoolObject(llvm::Value *token) : Token(token) {}
 2670     llvm::Value *Token;
 2672     CallObjCMRRAutoreleasePoolObject(llvm::Value *token) : Token(token) {}
 2680 void CodeGenFunction::EmitObjCAutoreleasePoolCleanup(llvm::Value *Ptr) {
 2705   llvm::Value *result;
 2731     llvm::Value *result = CGF.EmitLoadOfLValue(lv,
 2763 typedef llvm::function_ref<llvm::Value *(CodeGenFunction &CGF,
 2764                                          llvm::Value *value)>
 2768 static llvm::Value *emitARCOperationAfterCall(CodeGenFunction &CGF,
 2769                                               llvm::Value *value,
 2796     llvm::Value *operand = bitcast->getOperand(0);
 2811 static llvm::Value *emitARCRetainCallResult(CodeGenFunction &CGF,
 2813   llvm::Value *value = CGF.EmitScalarExpr(e);
 2825 static llvm::Value *emitARCUnsafeClaimCallResult(CodeGenFunction &CGF,
 2827   llvm::Value *value = CGF.EmitScalarExpr(e);
 2837 llvm::Value *CodeGenFunction::EmitARCReclaimReturnedObject(const Expr *E,
 2843     llvm::Value *value = emitARCRetainCallResult(*this, E);
 3137   llvm::Value *getValueOfResult(TryEmitResult result) {
 3142     llvm::Value *value = result.getPointer();
 3155     llvm::Value *result = CGF.EmitScalarExpr(e);
 3172     llvm::Value *result; // will be a +0 value
 3200     llvm::Value *result = emitARCRetainCallResult(CGF, e);
 3206     llvm::Value *result = emitARCRetainCallResult(CGF, e);
 3215     llvm::Value *result = CGF.EmitScalarExpr(e);
 3226 static llvm::Value *emitARCRetainLoadOfScalar(CodeGenFunction &CGF,
 3230   llvm::Value *value = result.getPointer();
 3240 llvm::Value *CodeGenFunction::EmitARCRetainScalarExpr(const Expr *e) {
 3249   llvm::Value *value = result.getPointer();
 3255 llvm::Value *
 3265   llvm::Value *value = result.getPointer();
 3273 llvm::Value *CodeGenFunction::EmitARCExtendBlockObject(const Expr *e) {
 3274   llvm::Value *result;
 3291 llvm::Value *CodeGenFunction::EmitObjCThrowOperand(const Expr *expr) {
 3311   public ARCExprEmitter<ARCUnsafeUnretainedExprEmitter, llvm::Value*> {
 3315   llvm::Value *getValueOfResult(llvm::Value *value) {
 3315   llvm::Value *getValueOfResult(llvm::Value *value) {
 3319   llvm::Value *emitBitCast(llvm::Value *value, llvm::Type *resultType) {
 3319   llvm::Value *emitBitCast(llvm::Value *value, llvm::Type *resultType) {
 3323   llvm::Value *visitLValueToRValue(const Expr *e) {
 3329   llvm::Value *visitConsumeObject(const Expr *e) {
 3330     llvm::Value *value = CGF.EmitScalarExpr(e);
 3336   llvm::Value *visitExtendBlockObject(const Expr *e) {
 3341   llvm::Value *visitReclaimReturnedObject(const Expr *e) {
 3347   llvm::Value *visitCall(const Expr *e) {
 3352   llvm::Value *visitExpr(const Expr *e) {
 3358 static llvm::Value *emitARCUnsafeUnretainedScalarExpr(CodeGenFunction &CGF,
 3367 llvm::Value *CodeGenFunction::EmitARCUnsafeUnretainedScalarExpr(const Expr *e) {
 3378 std::pair<LValue,llvm::Value*>
 3383   llvm::Value *value;
 3397 std::pair<LValue,llvm::Value*>
 3402   llvm::Value *value = result.getPointer();
 3418     llvm::Value *oldValue = EmitLoadOfScalar(lvalue, SourceLocation());
 3428 std::pair<LValue,llvm::Value*>
 3430   llvm::Value *value = EmitARCRetainAutoreleaseScalarExpr(e->getRHS());
 3450     llvm::Value *token = EmitObjCAutoreleasePoolPush();
 3453     llvm::Value *token = EmitObjCMRRAutoreleasePoolPush();
 3466 void CodeGenFunction::EmitExtendGCLifetime(llvm::Value *object) {
 3672 llvm::Value *
 3673 CodeGenFunction::EmitBlockCopyAndAutorelease(llvm::Value *Block, QualType Ty) {
 3684   llvm::Value *Val = Block;
 3697 llvm::Value *
 3698 CodeGenFunction::EmitBuiltinAvailable(ArrayRef<llvm::Value *> Args) {
 3708   llvm::Value *CallRes =
tools/clang/lib/CodeGen/CGObjCGNU.cpp
  324   llvm::Value* EnforceType(CGBuilderTy &B, llvm::Value *V, llvm::Type *Ty) {
  324   llvm::Value* EnforceType(CGBuilderTy &B, llvm::Value *V, llvm::Type *Ty) {
  519   virtual llvm::Value *GetTypedSelector(CodeGenFunction &CGF, Selector Sel,
  539   virtual llvm::Value *GetClassNamed(CodeGenFunction &CGF,
  545   virtual llvm::Value *LookupIMP(CodeGenFunction &CGF,
  546                                  llvm::Value *&Receiver,
  547                                  llvm::Value *cmd,
  554   virtual llvm::Value *LookupIMPSuper(CodeGenFunction &CGF,
  556                                       llvm::Value *cmd,
  581                       llvm::Value *Receiver, const CallArgList &CallArgs,
  588                            bool isCategoryImpl, llvm::Value *Receiver,
  591   llvm::Value *GetClass(CodeGenFunction &CGF,
  593   llvm::Value *GetSelector(CodeGenFunction &CGF, Selector Sel) override;
  595   llvm::Value *GetSelector(CodeGenFunction &CGF,
  612   llvm::Value *GenerateProtocolRef(CodeGenFunction &CGF,
  633   llvm::Value * EmitObjCWeakRead(CodeGenFunction &CGF,
  636                           llvm::Value *src, Address dst) override;
  638                             llvm::Value *src, Address dest,
  640   void EmitObjCIvarAssign(CodeGenFunction &CGF, llvm::Value *src,
  641                           Address dest, llvm::Value *ivarOffset) override;
  643                                 llvm::Value *src, Address dest) override;
  646                                 llvm::Value *Size) override;
  648                               llvm::Value *BaseValue, const ObjCIvarDecl *Ivar,
  650   llvm::Value *EmitIvarOffset(CodeGenFunction &CGF,
  653   llvm::Value *EmitNSAutoreleasePoolClassRef(CodeGenFunction &CGF) override;
  686   llvm::Value *LookupIMP(CodeGenFunction &CGF, llvm::Value *&Receiver,
  686   llvm::Value *LookupIMP(CodeGenFunction &CGF, llvm::Value *&Receiver,
  687                          llvm::Value *cmd, llvm::MDNode *node,
  690     llvm::Value *args[] = {
  698   llvm::Value *LookupIMPSuper(CodeGenFunction &CGF, Address ObjCSuper,
  699                               llvm::Value *cmd, MessageSendInfo &MSI) override {
  701     llvm::Value *lookupArgs[] = {EnforceType(Builder, ObjCSuper,
  748     llvm::Value *LookupIMP(CodeGenFunction &CGF, llvm::Value *&Receiver,
  748     llvm::Value *LookupIMP(CodeGenFunction &CGF, llvm::Value *&Receiver,
  749                            llvm::Value *cmd, llvm::MDNode *node,
  759       llvm::Value *self;
  771       llvm::Value *args[] = {
  780       llvm::Value *imp = Builder.CreateAlignedLoad(
  789     llvm::Value *LookupIMPSuper(CodeGenFunction &CGF, Address ObjCSuper,
  790                                 llvm::Value *cmd,
  793       llvm::Value *lookupArgs[] = {ObjCSuper.getPointer(), cmd};
  957       ArrayRef<llvm::Value*> Args) {
  959     for (auto *Arg : Args)
 1196   llvm::Value *LookupIMPSuper(CodeGenFunction &CGF, Address ObjCSuper,
 1197                               llvm::Value *cmd, MessageSendInfo &MSI) override {
 1200     llvm::Value *lookupArgs[] = {CGObjCGNU::EnforceType(Builder, ObjCSuper,
 1251   llvm::Value *GetClassNamed(CodeGenFunction &CGF,
 1305   llvm::Value *GenerateProtocolRef(CodeGenFunction &CGF,
 1424   llvm::Value *GetTypedSelector(CodeGenFunction &CGF, Selector Sel,
 1673   llvm::Value *EmitIvarOffset(CodeGenFunction &CGF,
 1682     llvm::Value *Offset = CGF.Builder.CreateAlignedLoad(IvarOffsetPointer, Align);
 2037   llvm::Value *LookupIMP(CodeGenFunction &CGF, llvm::Value *&Receiver,
 2037   llvm::Value *LookupIMP(CodeGenFunction &CGF, llvm::Value *&Receiver,
 2038                          llvm::Value *cmd, llvm::MDNode *node,
 2041     llvm::Value *args[] = {
 2055   llvm::Value *LookupIMPSuper(CodeGenFunction &CGF, Address ObjCSuper,
 2056                               llvm::Value *cmd, MessageSendInfo &MSI) override {
 2058     llvm::Value *lookupArgs[] = {
 2068   llvm::Value *GetClassNamed(CodeGenFunction &CGF, const std::string &Name,
 2268 llvm::Value *CGObjCGNU::GetClassNamed(CodeGenFunction &CGF,
 2288 llvm::Value *CGObjCGNU::GetClass(CodeGenFunction &CGF,
 2290   auto *Value =
 2297 llvm::Value *CGObjCGNU::EmitNSAutoreleasePoolClassRef(CodeGenFunction &CGF) {
 2298   auto *Value  = GetClassNamed(CGF, "NSAutoreleasePool", false);
 2316 llvm::Value *CGObjCGNU::GetTypedSelector(CodeGenFunction &CGF, Selector Sel,
 2339   llvm::Value *SelValue = GetSelector(CGF, Sel);
 2349 llvm::Value *CGObjCGNU::GetSelector(CodeGenFunction &CGF, Selector Sel) {
 2353 llvm::Value *CGObjCGNU::GetSelector(CodeGenFunction &CGF,
 2499                                     llvm::Value *Receiver,
 2514   llvm::Value *cmd = GetSelector(CGF, Sel);
 2523   llvm::Value *ReceiverClass = nullptr;
 2593   llvm::Value *imp = LookupIMPSuper(CGF, ObjCSuper, cmd, MSI);
 2617                                llvm::Value *Receiver,
 2657     llvm::Value *isNil = Builder.CreateICmpEQ(Receiver,
 2664   llvm::Value *cmd;
 2687   llvm::Value *imp;
 2733       llvm::Value *v = msgRet.getScalarVal();
 2748       std::pair<llvm::Value*,llvm::Value*> v = msgRet.getComplexVal();
 2748       std::pair<llvm::Value*,llvm::Value*> v = msgRet.getComplexVal();
 3031 llvm::Value *CGObjCGNU::GenerateProtocolRef(CodeGenFunction &CGF,
 3825     llvm::Value *HasRegisterAlias = Builder.CreateICmpNE(RegisterAlias,
 3934   llvm::Value *ExceptionAsObject;
 3938     llvm::Value *Exception = CGF.EmitObjCThrowOperand(ThrowExpr);
 3968 llvm::Value * CGObjCGNU::EmitObjCWeakRead(CodeGenFunction &CGF,
 3976                                    llvm::Value *src, Address dst) {
 3984                                      llvm::Value *src, Address dst,
 3995                                    llvm::Value *src, Address dst,
 3996                                    llvm::Value *ivarOffset) {
 4004                                          llvm::Value *src, Address dst) {
 4014                                          llvm::Value *Size) {
 4039                                        llvm::Value *BaseValue,
 4064 llvm::Value *CGObjCGNU::EmitIvarOffset(CodeGenFunction &CGF,
 4085     llvm::Value *Offset = TheModule.getGlobalVariable(name);
tools/clang/lib/CodeGen/CGObjCMac.cpp
 1029   llvm::Value *EmitClassRefViaRuntime(CodeGenFunction &CGF,
 1068                                   llvm::Value *Sel,
 1069                                   llvm::Value *Arg0,
 1237   llvm::Value *EmitClassRef(CodeGenFunction &CGF,
 1240   llvm::Value *EmitClassRefFromId(CodeGenFunction &CGF,
 1243   llvm::Value *EmitNSAutoreleasePoolClassRef(CodeGenFunction &CGF) override;
 1246   llvm::Value *EmitSuperClassRef(const ObjCInterfaceDecl *ID);
 1305   llvm::Value *EmitSelector(CodeGenFunction &CGF, Selector Sel);
 1318                                       Selector Sel, llvm::Value *Receiver,
 1327                            bool isCategoryImpl, llvm::Value *Receiver,
 1331   llvm::Value *GetClass(CodeGenFunction &CGF,
 1334   llvm::Value *GetSelector(CodeGenFunction &CGF, Selector Sel) override;
 1339   llvm::Value *GetSelector(CodeGenFunction &CGF,
 1350   llvm::Value *GenerateProtocolRef(CodeGenFunction &CGF,
 1370   llvm::Value * EmitObjCWeakRead(CodeGen::CodeGenFunction &CGF,
 1373                           llvm::Value *src, Address dst) override;
 1375                             llvm::Value *src, Address dest,
 1378                           llvm::Value *src, Address dest,
 1379                           llvm::Value *ivarOffset) override;
 1381                                 llvm::Value *src, Address dest) override;
 1384                                 llvm::Value *size) override;
 1387                               llvm::Value *BaseValue, const ObjCIvarDecl *Ivar,
 1389   llvm::Value *EmitIvarOffset(CodeGen::CodeGenFunction &CGF,
 1482                                         llvm::Value *Receiver,
 1499   llvm::Value *EmitLoadOfClassRef(CodeGenFunction &CGF,
 1505   llvm::Value *EmitClassRef(CodeGenFunction &CGF,
 1508   llvm::Value *EmitClassRefFromId(CodeGenFunction &CGF,
 1512   llvm::Value *EmitNSAutoreleasePoolClassRef(CodeGenFunction &CGF) override;
 1516   llvm::Value *EmitSuperClassRef(CodeGenFunction &CGF,
 1521   llvm::Value *EmitMetaClassRef(CodeGenFunction &CGF,
 1533   llvm::Value *EmitSelector(CodeGenFunction &CGF, Selector Sel);
 1603                                       llvm::Value *Receiver,
 1612                            bool isCategoryImpl, llvm::Value *Receiver,
 1616   llvm::Value *GetClass(CodeGenFunction &CGF,
 1619   llvm::Value *GetSelector(CodeGenFunction &CGF, Selector Sel) override
 1626   llvm::Value *GetSelector(CodeGenFunction &CGF,
 1636   llvm::Value *GenerateProtocolRef(CodeGenFunction &CGF,
 1679   llvm::Value * EmitObjCWeakRead(CodeGen::CodeGenFunction &CGF,
 1682                           llvm::Value *src, Address edst) override;
 1684                             llvm::Value *src, Address dest,
 1687                           llvm::Value *src, Address dest,
 1688                           llvm::Value *ivarOffset) override;
 1690                                 llvm::Value *src, Address dest) override;
 1693                                 llvm::Value *size) override;
 1695                               llvm::Value *BaseValue, const ObjCIvarDecl *Ivar,
 1697   llvm::Value *EmitIvarOffset(CodeGen::CodeGenFunction &CGF,
 1709   void init(CodeGenFunction &CGF, llvm::Value *receiver) {
 1718     llvm::Value *isNull = CGF.Builder.CreateIsNull(receiver);
 1830   llvm::Value *Idxs[] = {
 1880 llvm::Value *CGObjCMac::GetClass(CodeGenFunction &CGF,
 1886 llvm::Value *CGObjCMac::GetSelector(CodeGenFunction &CGF, Selector Sel) {
 1892 llvm::Value *CGObjCMac::GetSelector(CodeGenFunction &CGF, const ObjCMethodDecl
 1949   if (llvm::Value *V = ConstantStringClassRef)
 1965   if (llvm::Value *V = ConstantStringClassRef)
 2058                                     llvm::Value *Receiver,
 2067   llvm::Value *ReceiverAsObject =
 2073   llvm::Value *Target;
 2087       llvm::Value *SuperPtr =
 2089       llvm::Value *Super =
 2096     llvm::Value *ClassPtr = EmitSuperClassRef(Class);
 2117                                                llvm::Value *Receiver,
 2140                                  llvm::Value *Sel,
 2141                                  llvm::Value *Arg0,
 2182         llvm::Value *SelfAddr = CGF.GetAddrOfLocalVar(Self).getPointer();
 2985 llvm::Value *CGObjCMac::GenerateProtocolRef(CodeGenFunction &CGF,
 3014 llvm::Value *CGObjCCommonMac::EmitClassRefViaRuntime(
 3020   llvm::Value *className =
 3705 llvm::Value *CGObjCMac::EmitSuperClassRef(const ObjCInterfaceDecl *ID) {
 4158           llvm::Value *CurCleanupDest =
 4174         llvm::Value *SyncArg = CGF.Builder.CreateLoad(SyncArgSlot);
 4182     SmallVector<llvm::Value*, 20> Locals;
 4303 static void addIfPresent(llvm::DenseSet<llvm::Value*> &S, Address V) {
 4309   llvm::DenseSet<llvm::Value*> AllocasToIgnore;
 4462     llvm::Value *SyncArg =
 4515   llvm::Value *GEPIndexes[] = { Zero, Zero, Zero };
 4516   llvm::Value *SetJmpBuffer = CGF.Builder.CreateGEP(
 4527   llvm::Value *DidCatch =
 4588       llvm::Value *Threw =
 4653       llvm::Value *Class = EmitClassRef(CGF, IDecl);
 4655       llvm::Value *matchArgs[] = { Class, Caught };
 4677       llvm::Value *Tmp =
 4740     llvm::Value *PropagatingExn;
 4763   llvm::Value *ExceptionAsObject;
 4766     llvm::Value *Exception = CGF.EmitObjCThrowOperand(ThrowExpr);
 4787 llvm::Value * CGObjCMac::EmitObjCWeakRead(CodeGen::CodeGenFunction &CGF,
 4792   llvm::Value *read_weak =
 4803                                    llvm::Value *src, Address dst) {
 4814   llvm::Value *args[] = { src, dst.getPointer() };
 4823                                      llvm::Value *src, Address dst,
 4835   llvm::Value *args[] = { src, dst.getPointer() };
 4848                                    llvm::Value *src, Address dst,
 4849                                    llvm::Value *ivarOffset) {
 4861   llvm::Value *args[] = { src, dst.getPointer(), ivarOffset };
 4869                                          llvm::Value *src, Address dst) {
 4880   llvm::Value *args[] = { src, dst.getPointer() };
 4888                                          llvm::Value *size) {
 4891   llvm::Value *args[] = { DestPtr.getPointer(), SrcPtr.getPointer(), size };
 4899                                        llvm::Value *BaseValue,
 4908 llvm::Value *CGObjCMac::EmitIvarOffset(CodeGen::CodeGenFunction &CGF,
 5084 llvm::Value *CGObjCMac::EmitClassRefFromId(CodeGenFunction &CGF,
 5103 llvm::Value *CGObjCMac::EmitClassRef(CodeGenFunction &CGF,
 5115 llvm::Value *CGObjCMac::EmitNSAutoreleasePoolClassRef(CodeGenFunction &CGF) {
 5120 llvm::Value *CGObjCMac::EmitSelector(CodeGenFunction &CGF, Selector Sel) {
 6505 llvm::Value *CGObjCNonFragileABIMac::GenerateProtocolRef(CodeGenFunction &CGF,
 7052                                                llvm::Value *BaseValue,
 7056   llvm::Value *Offset = EmitIvarOffset(CGF, ID, Ivar);
 7061 llvm::Value *
 7065   llvm::Value *IvarOffsetValue;
 7117                                               llvm::Value *arg0,
 7213   llvm::Value *calleePtr = CGF.Builder.CreateLoad(calleeAddr, "msgSend_fn");
 7229                                             llvm::Value *Receiver,
 7302 llvm::Value *
 7317 llvm::Value *
 7350 llvm::Value *CGObjCNonFragileABIMac::EmitClassRef(CodeGenFunction &CGF,
 7360 llvm::Value *CGObjCNonFragileABIMac::EmitNSAutoreleasePoolClassRef(
 7366 llvm::Value *
 7390 llvm::Value *CGObjCNonFragileABIMac::EmitMetaClassRef(CodeGenFunction &CGF,
 7413 llvm::Value *CGObjCNonFragileABIMac::GetClass(CodeGenFunction &CGF,
 7435                                                  llvm::Value *Receiver,
 7446   llvm::Value *ReceiverAsObject =
 7452   llvm::Value *Target;
 7475 llvm::Value *CGObjCNonFragileABIMac::EmitSelector(CodeGenFunction &CGF,
 7513                                                 llvm::Value *src,
 7515                                                 llvm::Value *ivarOffset) {
 7526   llvm::Value *args[] = { src, dst.getPointer(), ivarOffset };
 7535   llvm::Value *src, Address dst) {
 7546   llvm::Value *args[] = { src, dst.getPointer() };
 7555   llvm::Value *Size) {
 7558   llvm::Value *args[] = { DestPtr.getPointer(), SrcPtr.getPointer(), Size };
 7565 llvm::Value * CGObjCNonFragileABIMac::EmitObjCWeakRead(
 7570   llvm::Value *read_weak =
 7581                                                 llvm::Value *src, Address dst) {
 7592   llvm::Value *args[] = { src, dst.getPointer() };
 7601                                           llvm::Value *src, Address dst,
 7613   llvm::Value *args[] = { src, dst.getPointer() };
 7667     llvm::Value *Exception = CGF.EmitObjCThrowOperand(ThrowExpr);
 7721   llvm::Value *VTableIdx = llvm::ConstantInt::get(CGM.Int32Ty, 2);
tools/clang/lib/CodeGen/CGObjCRuntime.cpp
   54                                                llvm::Value *BaseValue,
   57                                                llvm::Value *Offset) {
   65   llvm::Value *V = CGF.Builder.CreateBitCast(BaseValue, CGF.Int8PtrTy);
  237     llvm::Value *RawExn = CGF.getExceptionFromSlot();
  240     llvm::Value *Exn = RawExn;
  258       llvm::Value *CastExn = CGF.Builder.CreateBitCast(Exn, CatchType);
  288                                          llvm::Value *exn,
  314     llvm::Value *SyncArg;
  315     CallSyncExit(llvm::FunctionCallee SyncExitFn, llvm::Value *SyncArg)
  333   llvm::Value *lock;
tools/clang/lib/CodeGen/CGObjCRuntime.h
   87                                   llvm::Value *BaseValue,
   90                                   llvm::Value *Offset);
  103   void EmitInitOfCatchParam(CodeGenFunction &CGF, llvm::Value *exn,
  124   virtual llvm::Value *GetSelector(CodeGenFunction &CGF, Selector Sel) = 0;
  134   virtual llvm::Value *GetSelector(CodeGenFunction &CGF,
  167                       llvm::Value *Receiver,
  185                            llvm::Value *Self,
  192   virtual llvm::Value *GenerateProtocolRef(CodeGenFunction &CGF,
  231   virtual llvm::Value *GetClass(CodeGenFunction &CGF,
  235   virtual llvm::Value *EmitNSAutoreleasePoolClassRef(CodeGenFunction &CGF) {
  250   virtual llvm::Value *EmitObjCWeakRead(CodeGen::CodeGenFunction &CGF,
  253                                   llvm::Value *src, Address dest) = 0;
  255                                     llvm::Value *src, Address dest,
  258                                   llvm::Value *src, Address dest,
  259                                   llvm::Value *ivarOffset) = 0;
  261                                         llvm::Value *src, Address dest) = 0;
  265                                       llvm::Value *BaseValue,
  268   virtual llvm::Value *EmitIvarOffset(CodeGen::CodeGenFunction &CGF,
  274                                         llvm::Value *Size) = 0;
tools/clang/lib/CodeGen/CGOpenCLRuntime.cpp
   98 llvm::Value *CGOpenCLRuntime::getPipeElemSize(const Expr *PipeArg) {
  108 llvm::Value *CGOpenCLRuntime::getPipeElemAlign(const Expr *PipeArg) {
  146                                       llvm::Value *Block) {
tools/clang/lib/CodeGen/CGOpenCLRuntime.h
   46     llvm::Value *BlockArg;      /// The first argument to enqueued block kernel.
   73   virtual llvm::Value *getPipeElemSize(const Expr *PipeArg);
   77   virtual llvm::Value *getPipeElemAlign(const Expr *PipeArg);
   93                        llvm::Value *Block);
tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp
  149         llvm::Value *Res =
  231   llvm::Value *getContextValue() const override {
  237   void setContextValue(llvm::Value *V) override {
  869   llvm::Value *NumElements = CGF.emitArrayLength(ArrayTy, ElementTy, DestAddr);
  876   llvm::Value *SrcBegin = nullptr;
  879   llvm::Value *DestBegin = DestAddr.getPointer();
  881   llvm::Value *DestEnd = CGF.Builder.CreateGEP(DestBegin, NumElements);
  885   llvm::Value *IsEmpty =
  925     llvm::Value *SrcElementNext = CGF.Builder.CreateConstGEP1_32(
  931   llvm::Value *DestElementNext = CGF.Builder.CreateConstGEP1_32(
  934   llvm::Value *Done =
 1007   llvm::Value *Size;
 1008   llvm::Value *SizeInChars;
 1034                                          llvm::Value *Size) {
 1126                           llvm::Value *Addr) {
 1181     llvm::Value *Adjustment = CGF.Builder.CreatePtrDiff(
 1183     llvm::Value *PrivatePointer =
 1187     llvm::Value *Ptr = CGF.Builder.CreateGEP(PrivatePointer, Adjustment);
 1492     llvm::Value *ThreadID = getThreadID(CGF, D.getBeginLoc());
 1493     llvm::Value *UpLoc = emitUpdateLocation(CGF, D.getBeginLoc());
 1494     llvm::Value *TaskArgs[] = {
 1571   llvm::Value *Entry = OpenMPDefaultLocMap.lookup(FlagsKey);
 1605   llvm::Value *Undef = llvm::UndefValue::get(CGF.Int32Ty);
 1625 llvm::Value *CGOpenMPRuntime::emitUpdateLocation(CodeGenFunction &CGF,
 1665   llvm::Value *OMPDebugLoc = OpenMPDebugLocMap.lookup(Loc.getRawEncoding());
 1686 llvm::Value *CGOpenMPRuntime::getThreadID(CodeGenFunction &CGF,
 1690   llvm::Value *ThreadID = nullptr;
 2690     llvm::Value *Ptr = CGM.getModule().getNamedValue(PtrName);
 2727   llvm::Value *Args[] = {emitUpdateLocation(CGF, Loc), getThreadID(CGF, Loc),
 2738     CodeGenFunction &CGF, Address VDAddr, llvm::Value *Ctor,
 2739     llvm::Value *CopyCtor, llvm::Value *Dtor, SourceLocation Loc) {
 2739     llvm::Value *CopyCtor, llvm::Value *Dtor, SourceLocation Loc) {
 2742   llvm::Value *OMPLoc = emitUpdateLocation(CGF, Loc);
 2747   llvm::Value *Args[] = {
 2765     llvm::Value *Ctor = nullptr, *CopyCtor = nullptr, *Dtor = nullptr;
 2785       llvm::Value *ArgVal = CtorCGF.EmitLoadOfScalar(
 2821       llvm::Value *ArgVal = DtorCGF.EmitLoadOfScalar(
 2993   llvm::Value *GAddr =
 2995   llvm::Value *Args[] = {
 3052                                        ArrayRef<llvm::Value *> CapturedVars,
 3056   llvm::Value *RTLoc = emitUpdateLocation(CGF, Loc);
 3061     llvm::Value *Args[] = {
 3065     llvm::SmallVector<llvm::Value *, 16> RealArgs;
 3076     llvm::Value *ThreadID = RT.getThreadID(CGF, Loc);
 3079     llvm::Value *Args[] = {RTLoc, ThreadID};
 3089     llvm::SmallVector<llvm::Value *, 16> OutlinedFnArgs;
 3097     llvm::Value *EndArgs[] = {RT.emitUpdateLocation(CGF, Loc), ThreadID};
 3123   llvm::Value *ThreadID = getThreadID(CGF, Loc);
 3153 llvm::Value *CGOpenMPRuntime::getCriticalRegionLock(StringRef CriticalName) {
 3163   ArrayRef<llvm::Value *> EnterArgs;
 3165   ArrayRef<llvm::Value *> ExitArgs;
 3171                  ArrayRef<llvm::Value *> EnterArgs,
 3173                  ArrayRef<llvm::Value *> ExitArgs, bool Conditional = false)
 3177     llvm::Value *EnterRes = CGF.EmitRuntimeCall(EnterCallee, EnterArgs);
 3179       llvm::Value *CallBool = CGF.Builder.CreateIsNotNull(EnterRes);
 3208   llvm::Value *Args[] = {emitUpdateLocation(CGF, Loc), getThreadID(CGF, Loc),
 3210   llvm::SmallVector<llvm::Value *, 4> EnterArgs(std::begin(Args),
 3234   llvm::Value *Args[] = {emitUpdateLocation(CGF, Loc), getThreadID(CGF, Loc)};
 3248   llvm::Value *Args[] = {
 3265   llvm::Value *Args[] = {emitUpdateLocation(CGF, Loc), getThreadID(CGF, Loc)};
 3279   llvm::Value *Ptr = CGF.Builder.CreateLoad(PtrAddr);
 3287 static llvm::Value *emitCopyprivateCopyFunction(
 3372   llvm::Value *Args[] = {emitUpdateLocation(CGF, Loc), getThreadID(CGF, Loc)};
 3402     llvm::Value *CpyFn = emitCopyprivateCopyFunction(
 3405     llvm::Value *BufSize = CGF.getTypeSize(CopyprivateArrayTy);
 3409     llvm::Value *DidItVal = CGF.Builder.CreateLoad(DidIt);
 3410     llvm::Value *Args[] = {
 3432     llvm::Value *Args[] = {emitUpdateLocation(CGF, Loc), getThreadID(CGF, Loc)};
 3486   llvm::Value *Args[] = {emitUpdateLocation(CGF, Loc, Flags),
 3491       llvm::Value *Result = CGF.EmitRuntimeCall(
 3499         llvm::Value *Cmp = CGF.Builder.CreateIsNotNull(Result);
 3643   llvm::Value *Chunk = DispatchValues.Chunk ? DispatchValues.Chunk
 3645   llvm::Value *Args[] = {
 3659     CodeGenFunction &CGF, llvm::Value *UpdateLocation, llvm::Value *ThreadId,
 3659     CodeGenFunction &CGF, llvm::Value *UpdateLocation, llvm::Value *ThreadId,
 3678   llvm::Value *Chunk = Values.Chunk;
 3692   llvm::Value *Args[] = {
 3716   llvm::Value *UpdatedLocation = emitUpdateLocation(CGF, Loc,
 3720   llvm::Value *ThreadId = getThreadID(CGF, Loc);
 3733   llvm::Value *UpdatedLocation =
 3735   llvm::Value *ThreadId = getThreadID(CGF, Loc);
 3749   llvm::Value *Args[] = {
 3768   llvm::Value *Args[] = {emitUpdateLocation(CGF, Loc), getThreadID(CGF, Loc)};
 3772 llvm::Value *CGOpenMPRuntime::emitForNext(CodeGenFunction &CGF,
 3781   llvm::Value *Args[] = {
 3789   llvm::Value *Call =
 3797                                            llvm::Value *NumThreads,
 3802   llvm::Value *Args[] = {
 3838   llvm::Value *Args[] = {
 4500                       llvm::Value *TaskPrivatesMap) {
 4528   llvm::Value *GtidParam = CGF.EmitLoadOfScalar(
 4540   llvm::Value *PartidParam = PartIdLVal.getPointer();
 4544   llvm::Value *SharedsParam = CGF.Builder.CreatePointerBitCastOrAddrSpaceCast(
 4549   llvm::Value *PrivatesParam;
 4558   llvm::Value *CommonArgs[] = {GtidParam, PartidParam, PrivatesParam,
 4564   SmallVector<llvm::Value *, 16> CallArgs(std::begin(CommonArgs),
 4569     llvm::Value *LBParam = CGF.EmitLoadOfScalar(LBLVal, Loc);
 4572     llvm::Value *UBParam = CGF.EmitLoadOfScalar(UBLVal, Loc);
 4575     llvm::Value *StParam = CGF.EmitLoadOfScalar(StLVal, Loc);
 4578     llvm::Value *LIParam = CGF.EmitLoadOfScalar(LILVal, Loc);
 4581     llvm::Value *RParam = CGF.EmitLoadOfScalar(RLVal, Loc);
 4598 static llvm::Value *emitDestructorsFunction(CodeGenModule &CGM,
 4657 static llvm::Value *
 4877 static llvm::Value *
 4919     llvm::Value *Lastpriv = CGF.EmitLoadOfScalar(
 5033   llvm::Value *KmpTaskTWithPrivatesTySize =
 5038   llvm::Value *TaskPrivatesMap = nullptr;
 5080   llvm::Value *TaskFlags =
 5087   llvm::Value *SharedsSize = CGM.getSize(C.getTypeSizeInChars(SharedsTy));
 5088   SmallVector<llvm::Value *, 8> AllocArgs = {emitUpdateLocation(CGF, Loc),
 5092   llvm::Value *NewTask;
 5099     llvm::Value *DeviceID;
 5112   llvm::Value *NewTaskNewTaskTTy =
 5155     llvm::Value *DestructorFn = emitDestructorsFunction(
 5192   llvm::Value *NewTask = Result.NewTask;
 5194   llvm::Value *NewTaskNewTaskTTy = Result.NewTaskNewTaskTTy;
 5230       llvm::Value *Size;
 5236         llvm::Value *UpAddr =
 5238         llvm::Value *LowIntPtr =
 5240         llvm::Value *UpIntPtr = CGF.Builder.CreatePtrToInt(UpAddr, CGM.SizeTy);
 5292   llvm::Value *ThreadID = getThreadID(CGF, Loc);
 5293   llvm::Value *UpLoc = emitUpdateLocation(CGF, Loc);
 5294   llvm::Value *TaskArgs[] = { UpLoc, ThreadID, NewTask };
 5295   llvm::Value *DepTaskArgs[7];
 5326   llvm::Value *DepWaitTaskArgs[6];
 5351       llvm::Value *OutlinedFnArgs[] = {ThreadID, NewTaskNewTaskTTy};
 5391   llvm::Value *ThreadID = getThreadID(CGF, Loc);
 5392   llvm::Value *UpLoc = emitUpdateLocation(CGF, Loc);
 5393   llvm::Value *IfVal;
 5433   llvm::Value *TaskArgs[] = {
 5480   llvm::Value *NumElements = CGF.emitArrayLength(ArrayTy, ElementTy, LHSAddr);
 5482   llvm::Value *RHSBegin = RHSAddr.getPointer();
 5483   llvm::Value *LHSBegin = LHSAddr.getPointer();
 5485   llvm::Value *LHSEnd = CGF.Builder.CreateGEP(LHSBegin, NumElements);
 5489   llvm::Value *IsEmpty =
 5522   llvm::Value *LHSElementNext = CGF.Builder.CreateConstGEP1_32(
 5524   llvm::Value *RHSElementNext = CGF.Builder.CreateConstGEP1_32(
 5527   llvm::Value *Done =
 5614       llvm::Value *Ptr = CGF.Builder.CreateLoad(Elem);
 5760       llvm::Value *Size = CGF.Builder.CreateIntCast(
 5777   llvm::Value *Lock = getCriticalRegionLock(Name);
 5781   llvm::Value *IdentTLoc = emitUpdateLocation(CGF, Loc, OMP_ATOMIC_REDUCE);
 5782   llvm::Value *ThreadId = getThreadID(CGF, Loc);
 5783   llvm::Value *ReductionArrayTySize = CGF.getTypeSize(ReductionArrayTy);
 5784   llvm::Value *RL = CGF.Builder.CreatePointerBitCastOrAddrSpaceCast(
 5786   llvm::Value *Args[] = {
 5795   llvm::Value *Res = CGF.EmitRuntimeCall(
 5816   llvm::Value *EndArgs[] = {
 5956     llvm::Value *EndArgs[] = {
 6000 static llvm::Value *emitReduceInitFunction(CodeGenModule &CGM,
 6021   llvm::Value *Size = nullptr;
 6069 static llvm::Value *emitReduceCombFunction(CodeGenModule &CGM,
 6095   llvm::Value *Size = nullptr;
 6145 static llvm::Value *emitReduceFiniFunction(CodeGenModule &CGM,
 6168   llvm::Value *Size = nullptr;
 6186 llvm::Value *CGOpenMPRuntime::emitTaskReductionInit(
 6223     llvm::Value *Idxs[] = {llvm::ConstantInt::get(CGM.SizeTy, /*V=*/0),
 6225     llvm::Value *GEP = CGF.EmitCheckedInBoundsGEP(
 6233     llvm::Value *CastedShared =
 6237     llvm::Value *SizeValInChars;
 6238     llvm::Value *SizeVal;
 6253     llvm::Value *InitAddr =
 6259     llvm::Value *Fini = emitReduceFiniFunction(CGM, Loc, RCG, Cnt);
 6260     llvm::Value *FiniAddr = Fini
 6266     llvm::Value *CombAddr = CGF.EmitCastToVoidPtr(emitReduceCombFunction(
 6281   llvm::Value *Args[] = {
 6299     llvm::Value *SizeVal = CGF.Builder.CreateIntCast(Sizes.second, CGM.SizeTy,
 6320                                               llvm::Value *ReductionsPtr,
 6324   llvm::Value *Args[] = {
 6342   llvm::Value *Args[] = {emitUpdateLocation(CGF, Loc), getThreadID(CGF, Loc)};
 6396       llvm::Value *Args[] = {
 6400       llvm::Value *Result = CGF.EmitRuntimeCall(
 6407       llvm::Value *Cmp = CGF.Builder.CreateIsNotNull(Result);
 6431       llvm::Value *Args[] = {
 6435       llvm::Value *Result = CGF.EmitRuntimeCall(
 6442       llvm::Value *Cmp = CGF.Builder.CreateIsNotNull(Result);
 6601 static llvm::Value *
 6626           llvm::Value *NumTeamsVal =
 6650       llvm::Value *NumTeamsVal =
 6718 static llvm::Value *getNumThreads(CodeGenFunction &CGF, const CapturedStmt *CS,
 6719                                   llvm::Value *DefaultThreadLimitVal) {
 6724       llvm::Value *NumThreads = nullptr;
 6725       llvm::Value *CondVal = nullptr;
 6818 static llvm::Value *
 6828   llvm::Value *ThreadLimitVal = nullptr;
 6829   llvm::Value *NumThreadsVal = nullptr;
 6833     if (llvm::Value *NumThreads = getNumThreads(CGF, CS, ThreadLimitVal))
 6857         llvm::Value *ThreadLimit = CGF.EmitScalarExpr(
 6872         if (llvm::Value *NumThreads = getNumThreads(CGF, CS, ThreadLimitVal))
 6884       llvm::Value *ThreadLimit = CGF.EmitScalarExpr(
 6890     if (llvm::Value *NumThreads = getNumThreads(CGF, CS, ThreadLimitVal))
 6897         if (llvm::Value *NumThreads = getNumThreads(CGF, CS, ThreadLimitVal))
 6907       llvm::Value *ThreadLimit = CGF.EmitScalarExpr(
 6918     llvm::Value *CondVal = nullptr;
 6945       llvm::Value *ThreadLimit = CGF.EmitScalarExpr(
 6953       llvm::Value *NumThreads = CGF.EmitScalarExpr(
 7090     llvm::Value *Ptr = nullptr;
 7096     BasePointerInfo(llvm::Value *Ptr, const ValueDecl *DevPtrDecl = nullptr)
 7098     llvm::Value *operator*() const { return Ptr; }
 7104   using MapValuesArrayTy = SmallVector<llvm::Value *, 4>;
 7170   llvm::Value *getExprTypeSize(const Expr *E) const {
 7192       llvm::Value *ElemSize;
 7207         llvm::Value *LengthVal = CGF.EmitScalarExpr(LenExpr);
 7216       llvm::Value *LengthVal = CGF.getTypeSize(BaseTy);
 7217       llvm::Value *LBVal = CGF.EmitScalarExpr(OAE->getLowerBound());
 7222       llvm::Value *Cmp = CGF.Builder.CreateICmpUGT(LengthVal, LBVal);
 7223       llvm::Value *TrueVal = CGF.Builder.CreateNUWSub(LengthVal, LBVal);
 7648           llvm::Value *Size = nullptr;
 7683         llvm::Value *Size = getExprTypeSize(I->getAssociatedExpression());
 7886     llvm::Value *LB = PartialStruct.LowestElem.second.getPointer();
 7889     llvm::Value *HB = PartialStruct.HighestElem.second.getPointer();
 7890     llvm::Value *HAddr = CGF.Builder.CreateConstGEP1_32(HB, /*Idx0=*/1);
 7891     llvm::Value *CLAddr = CGF.Builder.CreatePointerCast(LB, CGF.VoidPtrTy);
 7892     llvm::Value *CHAddr = CGF.Builder.CreatePointerCast(HAddr, CGF.VoidPtrTy);
 7893     llvm::Value *Diff = CGF.Builder.CreatePtrDiff(CHAddr, CLAddr);
 7894     llvm::Value *Size = CGF.Builder.CreateIntCast(Diff, CGF.Int64Ty,
 8007           llvm::Value *Ptr =
 8062           llvm::Value *BasePtr = this->CGF.EmitLValue(L.IE).getPointer();
 8063           llvm::Value *Ptr = this->CGF.EmitLoadOfScalar(
 8164       const ValueDecl *VD, llvm::Value *Arg, MapBaseValuesArrayTy &BasePointers,
 8225       const llvm::DenseMap<llvm::Value *, llvm::Value *> &LambdaPointers,
 8225       const llvm::DenseMap<llvm::Value *, llvm::Value *> &LambdaPointers,
 8233       llvm::Value *BasePtr = LambdaPointers.lookup(*BasePointers[I]);
 8255                               llvm::Value *Arg,
 8467                               const FieldDecl &RI, llvm::Value *CV,
 8571     for (llvm::Value *S : Sizes)
 8602       for (llvm::Value *S : Sizes)
 8632       llvm::Value *BPVal = *BasePointers[I];
 8633       llvm::Value *BP = CGF.Builder.CreateConstInBoundsGEP2_32(
 8645       llvm::Value *PVal = Pointers[I];
 8646       llvm::Value *P = CGF.Builder.CreateConstInBoundsGEP2_32(
 8655         llvm::Value *S = CGF.Builder.CreateConstInBoundsGEP2_32(
 8672     CodeGenFunction &CGF, llvm::Value *&BasePointersArrayArg,
 8673     llvm::Value *&PointersArrayArg, llvm::Value *&SizesArrayArg,
 8673     llvm::Value *&PointersArrayArg, llvm::Value *&SizesArrayArg,
 8674     llvm::Value *&MapTypesArrayArg, CGOpenMPRuntime::TargetDataInfo &Info) {
 8876   llvm::Value *Size = MapperCGF.EmitLoadOfScalar(
 8879   llvm::Value *PtrBegin = MapperCGF.Builder.CreateBitCast(
 8882   llvm::Value *PtrEnd = MapperCGF.Builder.CreateGEP(PtrBegin, Size);
 8883   llvm::Value *MapType = MapperCGF.EmitLoadOfScalar(
 8887   llvm::Value *Handle = MapperCGF.EmitLoadOfScalar(
 8890   llvm::Value *BaseIn = MapperCGF.EmitLoadOfScalar(
 8893   llvm::Value *BeginIn = MapperCGF.EmitLoadOfScalar(
 8910   llvm::Value *IsEmpty =
 8943   llvm::Value *OffloadingArgs[] = {Handle};
 8944   llvm::Value *PreviousSize = MapperCGF.EmitRuntimeCall(
 8946   llvm::Value *ShiftedPreviousSize = MapperCGF.Builder.CreateShl(
 8952     llvm::Value *CurBaseArg = MapperCGF.Builder.CreateBitCast(
 8954     llvm::Value *CurBeginArg = MapperCGF.Builder.CreateBitCast(
 8956     llvm::Value *CurSizeArg = Sizes[I];
 8961     llvm::Value *OriMapType = MapperCGF.Builder.getInt64(MapTypes[I]);
 8962     llvm::Value *Member = MapperCGF.Builder.CreateAnd(
 8968     llvm::Value *IsMember = MapperCGF.Builder.CreateIsNull(Member);
 8973     llvm::Value *CombinedMember =
 8994     llvm::Value *LeftToFrom = MapperCGF.Builder.CreateAnd(
 9005     llvm::Value *IsAlloc = MapperCGF.Builder.CreateIsNull(LeftToFrom);
 9009     llvm::Value *AllocMapType = MapperCGF.Builder.CreateAnd(
 9015     llvm::Value *IsTo = MapperCGF.Builder.CreateICmpEQ(
 9021     llvm::Value *ToMapType = MapperCGF.Builder.CreateAnd(
 9026     llvm::Value *IsFrom = MapperCGF.Builder.CreateICmpEQ(
 9032     llvm::Value *FromMapType = MapperCGF.Builder.CreateAnd(
 9048     llvm::Value *OffloadingArgs[] = {Handle, CurBaseArg, CurBeginArg,
 9057   llvm::Value *PtrNext = MapperCGF.Builder.CreateConstGEP1_32(
 9060   llvm::Value *IsDone =
 9088     CodeGenFunction &MapperCGF, llvm::Value *Handle, llvm::Value *Base,
 9088     CodeGenFunction &MapperCGF, llvm::Value *Handle, llvm::Value *Base,
 9089     llvm::Value *Begin, llvm::Value *Size, llvm::Value *MapType,
 9089     llvm::Value *Begin, llvm::Value *Size, llvm::Value *MapType,
 9089     llvm::Value *Begin, llvm::Value *Size, llvm::Value *MapType,
 9097   llvm::Value *IsArray = MapperCGF.Builder.CreateICmpSGE(
 9103   llvm::Value *DeleteBit = MapperCGF.Builder.CreateAnd(
 9106   llvm::Value *DeleteCond;
 9119   llvm::Value *ArraySize = MapperCGF.Builder.CreateNUWMul(
 9123   llvm::Value *MapTypeArg = MapperCGF.Builder.CreateAnd(
 9129   llvm::Value *OffloadingArgs[] = {Handle, Base, Begin, ArraySize, MapTypeArg};
 9136     llvm::Value *DeviceID,
 9137     llvm::function_ref<llvm::Value *(CodeGenFunction &CGF,
 9150     if (llvm::Value *NumIterations = SizeEmitter(CGF, *LD)) {
 9151       llvm::Value *Args[] = {DeviceID, NumIterations};
 9161     llvm::Function *OutlinedFn, llvm::Value *OutlinedFnID, const Expr *IfCond,
 9163     llvm::function_ref<llvm::Value *(CodeGenFunction &CGF,
 9172   llvm::SmallVector<llvm::Value *, 16> CapturedVars;
 9181   llvm::Value *MapTypesArray = nullptr;
 9199     llvm::Value *DeviceID;
 9208     llvm::Value *PointerNum =
 9212     llvm::Value *Return;
 9214     llvm::Value *NumTeams = emitNumTeamsForTargetDirective(CGF, D);
 9215     llvm::Value *NumThreads = emitNumThreadsForTargetDirective(CGF, D);
 9256       llvm::Value *OffloadingArgs[] = {DeviceID,
 9270       llvm::Value *OffloadingArgs[] = {DeviceID,
 9288     llvm::Value *Failed = CGF.Builder.CreateIsNotNull(Return);
 9324     llvm::DenseMap<llvm::Value *, llvm::Value *> LambdaPointers;
 9324     llvm::DenseMap<llvm::Value *, llvm::Value *> LambdaPointers;
 9899                                     ArrayRef<llvm::Value *> CapturedVars) {
 9903   llvm::Value *RTLoc = emitUpdateLocation(CGF, Loc);
 9907   llvm::Value *Args[] = {
 9911   llvm::SmallVector<llvm::Value *, 16> RealArgs;
 9926   llvm::Value *RTLoc = emitUpdateLocation(CGF, Loc);
 9928   llvm::Value *NumTeamsVal =
 9934   llvm::Value *ThreadLimitVal =
 9941   llvm::Value *PushNumTeamsArgs[] = {RTLoc, getThreadID(CGF, Loc), NumTeamsVal,
 9975     llvm::Value *BasePointersArrayArg = nullptr;
 9976     llvm::Value *PointersArrayArg = nullptr;
 9977     llvm::Value *SizesArrayArg = nullptr;
 9978     llvm::Value *MapTypesArrayArg = nullptr;
 9983     llvm::Value *DeviceID = nullptr;
 9992     llvm::Value *PointerNum = CGF.Builder.getInt32(Info.NumberOfPtrs);
 9994     llvm::Value *OffloadingArgs[] = {
10011     llvm::Value *BasePointersArrayArg = nullptr;
10012     llvm::Value *PointersArrayArg = nullptr;
10013     llvm::Value *SizesArrayArg = nullptr;
10014     llvm::Value *MapTypesArrayArg = nullptr;
10019     llvm::Value *DeviceID = nullptr;
10028     llvm::Value *PointerNum = CGF.Builder.getInt32(Info.NumberOfPtrs);
10030     llvm::Value *OffloadingArgs[] = {
10086   llvm::Value *MapTypesArray = nullptr;
10091     llvm::Value *DeviceID = nullptr;
10103     llvm::Value *OffloadingArgs[] = {DeviceID,
10788   llvm::Value *Args[DoacrossFinArgs];
10792                     ArrayRef<llvm::Value *> CallArgs)
10844     llvm::Value *NumIterVal =
10858   llvm::Value *Args[] = {
10869   llvm::Value *FiniArgs[DoacrossCleanupTy::DoacrossFinArgs] = {
10888     llvm::Value *CntVal = CGF.EmitScalarConversion(
10894   llvm::Value *Args[] = {
10910                                ArrayRef<llvm::Value *> Args) const {
10925     ArrayRef<llvm::Value *> Args) const {
10949   llvm::Value *Args[CleanupArgs];
10953                        ArrayRef<llvm::Value *> CallArgs)
10979   llvm::Value *Size;
10992   llvm::Value *ThreadID = getThreadID(CGF, CVD->getBeginLoc());
10995   llvm::Value *Allocator = CGF.EmitScalarExpr(AA->getAllocator());
11003   llvm::Value *Args[] = {ThreadID, Size, Allocator};
11005   llvm::Value *Addr =
11008   llvm::Value *FiniArgs[OMPAllocateCleanupTy::CleanupArgs] = {ThreadID, Addr,
11169                                            ArrayRef<llvm::Value *> CapturedVars,
11253 llvm::Value *CGOpenMPSIMDRuntime::emitForNext(CodeGenFunction &CGF,
11262                                                llvm::Value *NumThreads,
11322 llvm::Value *CGOpenMPSIMDRuntime::emitTaskReductionInit(
11337                                                   llvm::Value *ReductionsPtr,
11368     llvm::Function *OutlinedFn, llvm::Value *OutlinedFnID, const Expr *IfCond,
11370     llvm::function_ref<llvm::Value *(CodeGenFunction &CGF,
11392                                         ArrayRef<llvm::Value *> CapturedVars) {
tools/clang/lib/CodeGen/CGOpenMPRuntime.h
  103   llvm::PointerIntPair<llvm::Value *, 1, bool> Final;
  104   llvm::PointerIntPair<llvm::Value *, 1, bool> Schedule;
  105   llvm::PointerIntPair<llvm::Value *, 1, bool> Priority;
  106   llvm::Value *Reductions = nullptr;
  132   SmallVector<std::pair<llvm::Value *, llvm::Value *>, 4> Sizes;
  132   SmallVector<std::pair<llvm::Value *, llvm::Value *>, 4> Sizes;
  162   void emitAggregateType(CodeGenFunction &CGF, unsigned N, llvm::Value *Size);
  189   std::pair<llvm::Value *, llvm::Value *> getSizes(unsigned N) const {
  189   std::pair<llvm::Value *, llvm::Value *> getSizes(unsigned N) const {
  258   llvm::Value *emitUpdateLocation(CodeGenFunction &CGF, SourceLocation Loc,
  266   llvm::Value *getThreadID(CodeGenFunction &CGF, SourceLocation Loc);
  276                 ArrayRef<llvm::Value *> Args = llvm::None) const;
  317   llvm::Value *getCriticalRegionLock(StringRef CriticalName);
  325   using OpenMPDefaultLocMapTy = llvm::DenseMap<FlagsTy, llvm::Value *>;
  332   typedef llvm::DenseMap<unsigned, llvm::Value *> OpenMPDebugLocMapTy;
  340     llvm::Value *DebugLoc;
  341     llvm::Value *ThreadID;
  755                                 llvm::Value *Ctor, llvm::Value *CopyCtor,
  755                                 llvm::Value *Ctor, llvm::Value *CopyCtor,
  756                                 llvm::Value *Dtor, SourceLocation Loc);
  761                                   llvm::Value *Handle, llvm::Value *BasePtr,
  761                                   llvm::Value *Handle, llvm::Value *BasePtr,
  762                                   llvm::Value *Ptr, llvm::Value *Size,
  762                                   llvm::Value *Ptr, llvm::Value *Size,
  763                                   llvm::Value *MapType, CharUnits ElementSize,
  767     llvm::Value *NewTask = nullptr;
  769     llvm::Value *NewTaskNewTaskTTy = nullptr;
  772     llvm::Value *TaskDupFn = nullptr;
  811       llvm::Value *DeviceID,
  812       llvm::function_ref<llvm::Value *(CodeGenFunction &CGF,
  902                                 ArrayRef<llvm::Value *> CapturedVars,
 1002     llvm::Value *LB = nullptr;
 1004     llvm::Value *UB = nullptr;
 1007     llvm::Value *Chunk = nullptr;
 1009     DispatchRTInput(llvm::Value *LB, llvm::Value *UB, llvm::Value *Chunk)
 1009     DispatchRTInput(llvm::Value *LB, llvm::Value *UB, llvm::Value *Chunk)
 1009     DispatchRTInput(llvm::Value *LB, llvm::Value *UB, llvm::Value *Chunk)
 1059     llvm::Value *Chunk = nullptr;
 1062                   llvm::Value *Chunk = nullptr)
 1133   virtual llvm::Value *emitForNext(CodeGenFunction &CGF, SourceLocation Loc,
 1143                                     llvm::Value *NumThreads,
 1376   virtual llvm::Value *emitTaskReductionInit(CodeGenFunction &CGF,
 1398                                        llvm::Value *ReductionsPtr,
 1451                  llvm::Function *OutlinedFn, llvm::Value *OutlinedFnID,
 1453                  llvm::function_ref<llvm::Value *(CodeGenFunction &CGF,
 1502                              ArrayRef<llvm::Value *> CapturedVars);
 1520     llvm::Value *BasePointersArray = nullptr;
 1522     llvm::Value *PointersArray = nullptr;
 1524     llvm::Value *SizesArray = nullptr;
 1526     llvm::Value *MapTypesArray = nullptr;
 1616       llvm::Value *&Chunk) const {}
 1629                            ArrayRef<llvm::Value *> Args = llvm::None) const;
 1735                         ArrayRef<llvm::Value *> CapturedVars,
 1880   llvm::Value *emitForNext(CodeGenFunction &CGF, SourceLocation Loc,
 1888   void emitNumThreadsClause(CodeGenFunction &CGF, llvm::Value *NumThreads,
 2068   llvm::Value *emitTaskReductionInit(CodeGenFunction &CGF, SourceLocation Loc,
 2089                                llvm::Value *ReductionsPtr,
 2139                  llvm::Function *OutlinedFn, llvm::Value *OutlinedFnID,
 2141                  llvm::function_ref<llvm::Value *(CodeGenFunction &CGF,
 2171                      ArrayRef<llvm::Value *> CapturedVars) override;
tools/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp
  119   ArrayRef<llvm::Value *> EnterArgs;
  121   ArrayRef<llvm::Value *> ExitArgs;
  127                 ArrayRef<llvm::Value *> EnterArgs,
  129                 ArrayRef<llvm::Value *> ExitArgs, bool Conditional = false)
  133     llvm::Value *EnterRes = CGF.EmitRuntimeCall(EnterCallee, EnterArgs);
  135       llvm::Value *CallBool = CGF.Builder.CreateIsNotNull(EnterRes);
  621 static llvm::Value *getNVPTXWarpSize(CodeGenFunction &CGF) {
  629 static llvm::Value *getNVPTXThreadID(CodeGenFunction &CGF) {
  639 static llvm::Value *getNVPTXWarpID(CodeGenFunction &CGF) {
  647 static llvm::Value *getNVPTXLaneID(CodeGenFunction &CGF) {
  654 static llvm::Value *getNVPTXNumThreads(CodeGenFunction &CGF) {
  666 static llvm::Value *getThreadLimit(CodeGenFunction &CGF,
  682 static llvm::Value *getMasterThreadID(CodeGenFunction &CGF) {
  684   llvm::Value *NumThreads = getNVPTXNumThreads(CGF);
  687   llvm::Value *Mask = Bld.CreateNUWSub(getNVPTXWarpSize(CGF), Bld.getInt32(1));
 1209   llvm::Value *IsWorker =
 1218   llvm::Value *IsMaster =
 1228   llvm::Value *Args[] = {getThreadLimit(CGF),
 1258   llvm::Value *Args[] = {CGF.Builder.getInt16(/*IsOMPRuntimeInitialized=*/1)};
 1330   llvm::Value *Args[] = {getThreadLimit(CGF, /*IsInSPMDExecutionMode=*/true),
 1364   llvm::Value *Args[] = {/*RequiresOMPRuntime=*/
 1436   llvm::Value *Args[] = {WorkFn.getPointer(),
 1438   llvm::Value *Ret = CGF.EmitRuntimeCall(
 1443   llvm::Value *WorkID = Bld.CreateLoad(WorkFn);
 1444   llvm::Value *ShouldTerminate = Bld.CreateIsNull(WorkID, "should_terminate");
 1449   llvm::Value *IsActive =
 1461     llvm::Value *ID = Bld.CreatePointerBitCastOrAddrSpaceCast(W, CGM.Int8PtrTy);
 1463     llvm::Value *WorkFnMatch =
 1491   llvm::Value *WorkFnCast =
 1937                                                 llvm::Value *NumThreads,
 2136     llvm::Value *GlobalRecCastAddr;
 2137     llvm::Value *IsTTD = nullptr;
 2145         llvm::Value *RTLoc = emitUpdateLocation(CGF, Loc);
 2146         llvm::Value *ThreadID = getThreadID(CGF, Loc);
 2147         llvm::Value *PL = CGF.EmitRuntimeCall(
 2152       llvm::Value *IsSPMD = Bld.CreateIsNotNull(CGF.EmitNounwindRuntimeCall(
 2164       llvm::Value *Size = llvm::ConstantInt::get(CGM.SizeTy, GlobalRecordSize);
 2184       llvm::Value *GlobalRecordSizeArg[] = {
 2186       llvm::Value *GlobalRecValue = CGF.EmitRuntimeCall(
 2228         llvm::Value *IsInSharedMemory = CGF.EmitLoadOfScalar(
 2240         llvm::Value *Ld = CGF.EmitLoadOfScalar(
 2243         llvm::Value *ResAddr = Bld.CreatePointerBitCastOrAddrSpaceCast(
 2245         llvm::Value *GlobalRecordSizeArg[] = {
 2264       llvm::Value *GlobalRecValue =
 2273       llvm::Value *GlobalRecordSizeArg[] = {
 2276       llvm::Value *GlobalRecValue = CGF.EmitRuntimeCall(
 2303       llvm::Value *ParValue;
 2316         llvm::Value *Ptr = CGF.Builder.CreateInBoundsGEP(
 2363     llvm::Value *Size = CGF.getTypeSize(VD->getType());
 2367     llvm::Value *AlignVal =
 2373     llvm::Value *GlobalRecordSizeArg[] = {
 2375     llvm::Value *GlobalRecValue = CGF.EmitRuntimeCall(
 2379     llvm::Value *GlobalRecCastAddr = Bld.CreatePointerBitCastOrAddrSpaceCast(
 2402     for (llvm::Value *Addr :
 2432           llvm::Value *IsInSharedMemory = CGF.EmitLoadOfScalar(
 2436           llvm::Value *Args[] = {
 2459                                          ArrayRef<llvm::Value *> CapturedVars) {
 2466   llvm::SmallVector<llvm::Value *, 16> OutlinedFnArgs;
 2475     ArrayRef<llvm::Value *> CapturedVars, const Expr *IfCond) {
 2486     CodeGenFunction &CGF, SourceLocation Loc, llvm::Value *OutlinedFn,
 2487     ArrayRef<llvm::Value *> CapturedVars, const Expr *IfCond) {
 2506     llvm::SmallVector<llvm::Value *, 16> OutlinedFnArgs;
 2516     llvm::Value *RTLoc = emitUpdateLocation(CGF, Loc);
 2517     llvm::Value *ThreadID = getThreadID(CGF, Loc);
 2518     llvm::Value *Args[] = {RTLoc, ThreadID};
 2534     llvm::Value *ID = Bld.CreateBitOrPointerCast(WFn, CGM.Int8PtrTy);
 2537     llvm::Value *Args[] = {ID, /*RequiresOMPRuntime=*/Bld.getInt16(1)};
 2551       llvm::Value *SharedArgsPtr = SharedArgs.getPointer();
 2553       llvm::Value *DataSharingArgs[] = {
 2566       for (llvm::Value *V : CapturedVars) {
 2568         llvm::Value *PtrV;
 2617       llvm::Value *IsSPMD = Bld.CreateIsNotNull(CGF.EmitNounwindRuntimeCall(
 2623       llvm::Value *RTLoc = emitUpdateLocation(CGF, Loc);
 2624       llvm::Value *ThreadID = getThreadID(CGF, Loc);
 2625       llvm::Value *PL = CGF.EmitRuntimeCall(
 2628       llvm::Value *Res = Bld.CreateIsNotNull(PL);
 2656     ArrayRef<llvm::Value *> CapturedVars, const Expr *IfCond) {
 2660   llvm::SmallVector<llvm::Value *, 16> OutlinedFnArgs;
 2675     llvm::SmallVector<llvm::Value *, 16> OutlinedFnArgs;
 2685     llvm::Value *RTLoc = emitUpdateLocation(CGF, Loc);
 2686     llvm::Value *ThreadID = getThreadID(CGF, Loc);
 2687     llvm::Value *Args[] = {RTLoc, ThreadID};
 2718   llvm::Value *Args[] = {
 2736   llvm::Value *Args[] = {emitUpdateLocation(CGF, Loc, Flags),
 2754   llvm::Value *Mask = CGF.EmitRuntimeCall(
 2757   llvm::Value *ThreadID = getNVPTXThreadID(CGF);
 2760   llvm::Value *TeamWidth = getNVPTXNumThreads(CGF);
 2772   llvm::Value *CounterVal = CGF.EmitLoadOfScalar(CounterLVal, Loc);
 2773   llvm::Value *CmpLoopBound = CGF.Builder.CreateICmpSLT(CounterVal, TeamWidth);
 2780   llvm::Value *CmpThreadToCounter =
 2800   llvm::Value *IncCounterVal =
 2810 static llvm::Value *castValueToType(CodeGenFunction &CGF, llvm::Value *Val,
 2810 static llvm::Value *castValueToType(CodeGenFunction &CGF, llvm::Value *Val,
 2835 static llvm::Value *createRuntimeShuffleFunction(CodeGenFunction &CGF,
 2836                                                  llvm::Value *Elem,
 2838                                                  llvm::Value *Offset,
 2856   llvm::Value *ElemCast = castValueToType(CGF, Elem, ElemType, CastTy, Loc);
 2857   llvm::Value *WarpSize =
 2860   llvm::Value *ShuffledVal = CGF.EmitRuntimeCall(
 2868                             llvm::Value *Offset, SourceLocation Loc) {
 2910       llvm::Value *PtrDiff = Bld.CreatePtrDiff(
 2916       llvm::Value *Res = createRuntimeShuffleFunction(
 2927       llvm::Value *Res = createRuntimeShuffleFunction(
 2954   llvm::Value *RemoteLaneOffset;
 2955   llvm::Value *ScratchpadIndex;
 2956   llvm::Value *ScratchpadWidth;
 2970   llvm::Value *RemoteLaneOffset = CopyOptions.RemoteLaneOffset;
 2971   llvm::Value *ScratchpadIndex = CopyOptions.ScratchpadIndex;
 2972   llvm::Value *ScratchpadWidth = CopyOptions.ScratchpadWidth;
 3033       llvm::Value *ElementSizeInChars = CGF.getTypeSize(Private->getType());
 3034       llvm::Value *CurrentOffset =
 3036       llvm::Value *ScratchPadElemAbsolutePtrVal =
 3048       llvm::Value *ElementSizeInChars = CGF.getTypeSize(Private->getType());
 3049       llvm::Value *CurrentOffset =
 3051       llvm::Value *ScratchPadElemAbsolutePtrVal =
 3084         llvm::Value *Elem =
 3126       llvm::Value *ScratchpadBasePtr =
 3128       llvm::Value *ElementSizeInChars = CGF.getTypeSize(Private->getType());
 3167 static llvm::Value *emitInterWarpCopyFunction(CodeGenModule &CGM,
 3223   llvm::Value *ThreadID = getNVPTXThreadID(CGF);
 3225   llvm::Value *LaneID = getNVPTXLaneID(CGF);
 3227   llvm::Value *WarpID = getNVPTXWarpID(CGF);
 3255       llvm::Value *Cnt = nullptr;
 3270         llvm::Value *Cmp =
 3284       llvm::Value *IsWarpMaster = Bld.CreateIsNull(LaneID, "warp_master");
 3290       llvm::Value *ElemPtrPtr = CGF.EmitLoadOfScalar(
 3302       llvm::Value *MediumPtrVal = Bld.CreateInBoundsGEP(
 3311       llvm::Value *Elem =
 3336       llvm::Value *NumWarpsVal = CGF.EmitLoadOfScalar(
 3340       llvm::Value *IsActiveThread =
 3347       llvm::Value *SrcMediumPtrVal = Bld.CreateInBoundsGEP(
 3356       llvm::Value *TargetElemPtrVal = CGF.EmitLoadOfScalar(
 3366       llvm::Value *SrcMediumValue =
 3509   llvm::Value *LaneIDArgVal = CGF.EmitLoadOfScalar(
 3513   llvm::Value *RemoteLaneOffsetArgVal = CGF.EmitLoadOfScalar(
 3517   llvm::Value *AlgoVerArgVal = CGF.EmitLoadOfScalar(
 3555   llvm::Value *CondAlgo0 = Bld.CreateIsNull(AlgoVerArgVal);
 3557   llvm::Value *Algo1 = Bld.CreateICmpEQ(AlgoVerArgVal, Bld.getInt16(1));
 3558   llvm::Value *CondAlgo1 = Bld.CreateAnd(
 3561   llvm::Value *Algo2 = Bld.CreateICmpEQ(AlgoVerArgVal, Bld.getInt16(2));
 3562   llvm::Value *CondAlgo2 = Bld.CreateAnd(
 3567   llvm::Value *CondReduce = Bld.CreateOr(CondAlgo0, CondAlgo1);
 3577   llvm::Value *LocalReduceListPtr = Bld.CreatePointerBitCastOrAddrSpaceCast(
 3579   llvm::Value *RemoteReduceListPtr = Bld.CreatePointerBitCastOrAddrSpaceCast(
 3593   llvm::Value *CondCopy = Bld.CreateAnd(
 3621 static llvm::Value *emitListToGlobalCopyFunction(
 3666   llvm::Value *BufferArrPtr = Bld.CreatePointerBitCastOrAddrSpaceCast(
 3669   llvm::Value *Idxs[] = {llvm::ConstantInt::getNullValue(CGF.Int32Ty),
 3677     llvm::Value *ElemPtrPtr = CGF.EmitLoadOfScalar(
 3689     llvm::Value *BufferPtr = Bld.CreateInBoundsGEP(GlobLVal.getPointer(), Idxs);
 3693       llvm::Value *V = CGF.EmitLoadOfScalar(ElemPtr, /*Volatile=*/false,
 3726 static llvm::Value *emitListToGlobalReduceFunction(
 3765   llvm::Value *BufferArrPtr = Bld.CreatePointerBitCastOrAddrSpaceCast(
 3774   llvm::Value *Idxs[] = {llvm::ConstantInt::getNullValue(CGF.Int32Ty),
 3786     llvm::Value *BufferPtr = Bld.CreateInBoundsGEP(GlobLVal.getPointer(), Idxs);
 3787     llvm::Value *Ptr = CGF.EmitCastToVoidPtr(BufferPtr);
 3793       llvm::Value *Size = CGF.Builder.CreateIntCast(
 3804   llvm::Value *GlobalReduceList =
 3807   llvm::Value *ReducedPtr = CGF.EmitLoadOfScalar(
 3821 static llvm::Value *emitGlobalToListCopyFunction(
 3866   llvm::Value *BufferArrPtr = Bld.CreatePointerBitCastOrAddrSpaceCast(
 3870   llvm::Value *Idxs[] = {llvm::ConstantInt::getNullValue(CGF.Int32Ty),
 3878     llvm::Value *ElemPtrPtr = CGF.EmitLoadOfScalar(
 3890     llvm::Value *BufferPtr = Bld.CreateInBoundsGEP(GlobLVal.getPointer(), Idxs);
 3894       llvm::Value *V = CGF.EmitLoadOfScalar(GlobLVal, Loc);
 3926 static llvm::Value *emitGlobalToListReduceFunction(
 3965   llvm::Value *BufferArrPtr = Bld.CreatePointerBitCastOrAddrSpaceCast(
 3974   llvm::Value *Idxs[] = {llvm::ConstantInt::getNullValue(CGF.Int32Ty),
 3986     llvm::Value *BufferPtr = Bld.CreateInBoundsGEP(GlobLVal.getPointer(), Idxs);
 3987     llvm::Value *Ptr = CGF.EmitCastToVoidPtr(BufferPtr);
 3993       llvm::Value *Size = CGF.Builder.CreateIntCast(
 4004   llvm::Value *GlobalReduceList =
 4007   llvm::Value *ReducedPtr = CGF.EmitLoadOfScalar(
 4284   llvm::Value *RTLoc = emitUpdateLocation(CGF, Loc);
 4285   llvm::Value *ThreadId = getThreadID(CGF, Loc);
 4287   llvm::Value *Res;
 4315       llvm::Value *Size = CGF.Builder.CreateIntCast(
 4325   llvm::Value *RL = CGF.Builder.CreatePointerBitCastOrAddrSpaceCast(
 4330   llvm::Value *ReductionArrayTySize = CGF.getTypeSize(ReductionArrayTy);
 4333   llvm::Value *InterWarpCopyFn =
 4337     llvm::Value *Args[] = {RTLoc,
 4368     llvm::Value *GlobalBufferPtr = CGF.EmitLoadOfScalar(
 4371     llvm::Value *GlobalToBufferCpyFn = ::emitListToGlobalCopyFunction(
 4373     llvm::Value *GlobalToBufferRedFn = ::emitListToGlobalReduceFunction(
 4376     llvm::Value *BufferToGlobalCpyFn = ::emitGlobalToListCopyFunction(
 4378     llvm::Value *BufferToGlobalRedFn = ::emitGlobalToListReduceFunction(
 4382     llvm::Value *Args[] = {
 4404   llvm::Value *Cond = CGF.Builder.CreateICmpEQ(
 4428   llvm::Value *EndArgs[] = {ThreadId};
 4492   llvm::Value *TargetAddr = CGF.EmitLoadOfScalar(
 4510     ArrayRef<llvm::Value *> Args) const {
 4511   SmallVector<llvm::Value *, 4> TargetArgs;
 4520     llvm::Value *NativeArg = Args[I];
 4525     llvm::Value *TargetArg = CGF.Builder.CreatePointerBitCastOrAddrSpaceCast(
 4579   SmallVector<llvm::Value *, 8> Args;
 4591   llvm::Value *GlobalArgsPtr = GlobalArgs.getPointer();
 4592   llvm::Value *DataSharingArgs[] = {GlobalArgsPtr};
 4613     llvm::Value *LB = CGF.EmitLoadOfScalar(
 4623     llvm::Value *UB = CGF.EmitLoadOfScalar(
 4638       llvm::Value *Arg = CGF.EmitLoadOfScalar(TypedAddress,
 4821     llvm::Value *&Chunk) const {
 4875       llvm::Value *CXXThis = CGF.LoadCXXThis();
tools/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.h
  158                                llvm::Value *OutlinedFn,
  159                                ArrayRef<llvm::Value *> CapturedVars,
  175                             ArrayRef<llvm::Value *> CapturedVars,
  223                                     llvm::Value *NumThreads,
  274                      ArrayRef<llvm::Value *> CapturedVars) override;
  287                         ArrayRef<llvm::Value *> CapturedVars,
  356       ArrayRef<llvm::Value *> Args = llvm::None) const override;
  384       llvm::Value *&Chunk) const override;
  460     llvm::SmallVector<llvm::Value *, 4> EscapedVariableLengthDeclsAddrs;
  463     llvm::Value *GlobalRecordAddr = nullptr;
  464     llvm::Value *IsInSPMDModeFlag = nullptr;
tools/clang/lib/CodeGen/CGStmt.cpp
  618   llvm::Value *V = Builder.CreateBitCast(EmitScalarExpr(S.getTarget()),
  743   llvm::Value *BoolCondVal = EvaluateExprAsBool(S.getCond());
  829   llvm::Value *BoolCondVal = EvaluateExprAsBool(S.getCond());
  912     llvm::Value *BoolCondVal = EvaluateExprAsBool(S.getCond());
  993   llvm::Value *BoolCondVal = EvaluateExprAsBool(S.getCond());
 1095     if (llvm::Value *NRVOFlag = NRVOFlags[S.getNRVOCandidate()])
 1227   llvm::Value *Diff =
 1229   llvm::Value *Cond =
 1639   llvm::Value *CondV = EmitScalarExpr(S.getCond());
 1817 llvm::Value*
 1822   llvm::Value *Arg;
 1848 llvm::Value* CodeGenFunction::EmitAsmInput(
 1916                               std::vector<llvm::Value *> &RegResults) {
 1955       llvm::Value *Tmp = CGF.Builder.CreateExtractValue(&Result, i, "asmresult");
 1997   std::vector<llvm::Value*> Args;
 2002   std::vector<llvm::Value*> InOutArgs;
 2101       llvm::Value *Arg = EmitAsmInputLValue(Info, Dest, InputExpr->getType(),
 2159     llvm::Value *Arg = EmitAsmInput(Info, InputExpr, Constraints);
 2279   std::vector<llvm::Value*> RegResults;
 2300     llvm::Value *Tmp = RegResults[i];
 2435       auto *ExprArg =
tools/clang/lib/CodeGen/CGStmtOpenMP.cpp
  265 llvm::Value *CodeGenFunction::getTypeSize(QualType Ty) {
  267   llvm::Value *Size = nullptr;
  286     const CapturedStmt &S, SmallVectorImpl<llvm::Value *> &CapturedVars) {
  295       llvm::Value *Val = VLASizeMap[VAT->getSizeExpr()];
  300       llvm::Value *CV = EmitLoadOfScalar(EmitLValue(*I), CurCap->getLocation());
  311         llvm::Value *SrcAddrVal = EmitScalarConversion(
  336   llvm::Value *CastedPtr = CGF.EmitScalarConversion(
  387     llvm::DenseMap<const Decl *, std::pair<const Expr *, llvm::Value *>>
  389     llvm::Value *&CXXThisValue, const FunctionOptions &FO) {
  514       llvm::Value *ExprArg = CGF.EmitLoadOfScalar(ArgLVal, I->getLocation());
  568   llvm::DenseMap<const Decl *, std::pair<const Expr *, llvm::Value *>> VLASizes;
  607   llvm::SmallVector<llvm::Value *, 4> CallArgs;
  609     llvm::Value *CallArg;
  647   llvm::Value *NumElements = emitArrayLength(ArrayTy, ElementTy, DestAddr);
  650   llvm::Value *SrcBegin = SrcAddr.getPointer();
  651   llvm::Value *DestBegin = DestAddr.getPointer();
  653   llvm::Value *DestEnd = Builder.CreateGEP(DestBegin, NumElements);
  657   llvm::Value *IsEmpty =
  685   llvm::Value *DestElementNext = Builder.CreateConstGEP1_32(
  687   llvm::Value *SrcElementNext = Builder.CreateConstGEP1_32(
  690   llvm::Value *Done =
 1030     llvm::Value *IsLastIterCond) {
 1236     const llvm::function_ref<llvm::Value *(CodeGenFunction &)> CondGen) {
 1243         if (llvm::Value *Cond = CondGen(CGF)) {
 1265                                 llvm::SmallVectorImpl<llvm::Value *> &)>
 1279     llvm::Value *NumThreads =
 1300   llvm::SmallVector<llvm::Value *, 16> CapturedVars;
 1313                                      llvm::SmallVectorImpl<llvm::Value *> &) {}
 1481     const llvm::function_ref<llvm::Value *(CodeGenFunction &)> CondGen) {
 1490         if (llvm::Value *Cond = CondGen(*this)) {
 1543         llvm::Value *PtrValue = CGF.EmitScalarExpr(E);
 1712     const llvm::function_ref<llvm::Value *(CodeGenFunction &)> CondGen) {
 1725         if (llvm::Value *Cond = CondGen(*this)) {
 1886   llvm::Value *BoolCondVal = nullptr;
 2041     const std::pair<llvm::Value *, llvm::Value *> DispatchBounds =
 2041     const std::pair<llvm::Value *, llvm::Value *> DispatchBounds =
 2043     llvm::Value *LBVal = DispatchBounds.first;
 2044     llvm::Value *UBVal = DispatchBounds.second;
 2157   llvm::Value *PrevLBVal = CGF.EmitLoadOfScalar(
 2163   llvm::Value *PrevUBVal = CGF.EmitLoadOfScalar(
 2183 static std::pair<llvm::Value *, llvm::Value *>
 2183 static std::pair<llvm::Value *, llvm::Value *>
 2194   llvm::Value *LBVal =
 2196   llvm::Value *UBVal =
 2203     llvm::SmallVectorImpl<llvm::Value *> &CapturedVars) {
 2207   llvm::Value *LBCast = CGF.Builder.CreateIntCast(
 2213   llvm::Value *UBCast = CGF.Builder.CreateIntCast(
 2409       llvm::Value *Chunk = nullptr;
 2549 static std::pair<llvm::Value *, llvm::Value *>
 2549 static std::pair<llvm::Value *, llvm::Value *>
 2555   llvm::Value *LBVal = CGF.Builder.getIntN(IVSize, 0);
 2556   llvm::Value *UBVal = CGF.EmitScalarExpr(LS.getLastIteration());
 2600                                 llvm::Value *Init = nullptr) {
 2701     llvm::Value *UBVal = CGF.EmitLoadOfScalar(UB, S.getBeginLoc());
 2702     llvm::Value *MinUBGlobalUB = CGF.Builder.CreateSelect(
 2990       llvm::Value *CopyFn = CGF.Builder.CreateLoad(
 2992       llvm::Value *PrivatesPtr = CGF.Builder.CreateLoad(CGF.GetAddrOfLocalVar(
 2996       llvm::SmallVector<llvm::Value *, 16> CallArgs;
 3044       llvm::Value *ReductionsPtr = CGF.Builder.CreateLoad(
 3103         llvm::Value *ReductionsPtr =
 3228       llvm::Value *CopyFn = CGF.Builder.CreateLoad(
 3230       llvm::Value *PrivatesPtr = CGF.Builder.CreateLoad(CGF.GetAddrOfLocalVar(
 3234       llvm::SmallVector<llvm::Value *, 16> CallArgs;
 3347       llvm::Value *ReductionDesc =
 3454       llvm::Value *Chunk = nullptr;
 3626       llvm::SmallVector<llvm::Value *, 16> CapturedVars;
 3640 static llvm::Value *convertToScalarValue(CodeGenFunction &CGF, RValue Val,
 3662     llvm::Value *ScalarVal = CGF.EmitScalarConversion(
 3830   llvm::Value *UpdateVal = Update.getScalarVal();
 3836   llvm::Value *Res =
 4182       llvm::Value *NumIterations = CGF.EmitScalarExpr(D.getNumIterations());
 4247   llvm::SmallVector<llvm::Value *, 16> CapturedVars;
tools/clang/lib/CodeGen/CGVTT.cpp
   76      llvm::Value *Idxs[] = {
tools/clang/lib/CodeGen/CGVTables.cpp
   78   llvm::Value *ReturnValue = RV.getScalarVal();
   85     llvm::Value *IsNull = CGF.Builder.CreateIsNull(ReturnValue);
  166   llvm::Value *Callee = CGM.GetAddrOfFunction(GD, Ty, /*ForVTable=*/true);
  211   llvm::Value *AdjustedThisPtr =
  299   llvm::Value *AdjustedThisPtr =
  390                                         llvm::Value *AdjustedThisPtr,
  396   SmallVector<llvm::Value *, 8> Args;
tools/clang/lib/CodeGen/CGValue.h
   46   llvm::PointerIntPair<llvm::Value *, 2, Flavor> V1;
   48   llvm::PointerIntPair<llvm::Value *, 1, bool> V2;
   58   llvm::Value *getScalarVal() const {
   65   std::pair<llvm::Value *, llvm::Value *> getComplexVal() const {
   65   std::pair<llvm::Value *, llvm::Value *> getComplexVal() const {
   75   llvm::Value *getAggregatePointer() const {
   85   static RValue get(llvm::Value *V) {
   92   static RValue getComplex(llvm::Value *V1, llvm::Value *V2) {
   92   static RValue getComplex(llvm::Value *V1, llvm::Value *V2) {
  100   static RValue getComplex(const std::pair<llvm::Value *, llvm::Value *> &C) {
  100   static RValue getComplex(const std::pair<llvm::Value *, llvm::Value *> &C) {
  175   llvm::Value *V;
  179     llvm::Value *VectorIdx;
  322   llvm::Value *getPointer() const {
  337   llvm::Value *getVectorPointer() const { assert(isVectorElt()); return V; }
  338   llvm::Value *getVectorIdx() const { assert(isVectorElt()); return VectorIdx; }
  344   llvm::Value *getExtVectorPointer() const {
  357   llvm::Value *getBitFieldPointer() const { assert(isBitField()); return V; }
  364   llvm::Value *getGlobalReg() const { assert(isGlobalReg()); return V; }
  379   static LValue MakeVectorElt(Address vecAddress, llvm::Value *Idx,
  438   llvm::Value *Addr;
  578   llvm::Value *getPointer() const {
tools/clang/lib/CodeGen/CodeGenFunction.cpp
  160 LValue CodeGenFunction::MakeNaturalAlignAddrLValue(llvm::Value *V, QualType T) {
  171 CodeGenFunction::MakeNaturalAlignPointeeAddrLValue(llvm::Value *V, QualType T) {
  375     SmallVector<llvm::Value *, 4> EscapeArgs;
  410   for (SmallVectorImpl<std::pair<llvm::Instruction *, llvm::Value *> >::iterator
  522 llvm::Value *
  523 CodeGenFunction::DecodeAddrUsedInPrologue(llvm::Value *F,
  524                                           llvm::Value *EncodedAddr) {
  526   auto *PCRelAsInt = Builder.CreateSExt(EncodedAddr, IntPtrTy);
  527   auto *FuncAsInt = Builder.CreatePtrToInt(F, IntPtrTy, "func_addr.int");
  528   auto *GOTAsInt = Builder.CreateAdd(PCRelAsInt, FuncAsInt, "global_addr.int");
  529   auto *GOTAddr = Builder.CreateIntToPtr(GOTAsInt, Int8PtrPtrTy, "global_addr");
  835   llvm::Value *Undef = llvm::UndefValue::get(Int32Ty);
  922     llvm::Value *Addr = Builder.CreateStructGEP(nullptr, &*EI, Idx);
  976           auto *ExprArg = EmitLoadOfLValue(EmitLValueForLambdaField(FD),
 1224       llvm::Value *IsFalse = Builder.getFalse();
 1553   llvm::Value *CondV;
 1576                                llvm::Value *sizeInChars) {
 1580   llvm::Value *baseSizeInChars
 1585   llvm::Value *end =
 1607   llvm::Value *next =
 1611   llvm::Value *done = Builder.CreateICmpEQ(next, end, "vla-init.isdone");
 1635   llvm::Value *SizeVal;
 1710   llvm::Value *DestVal = TmpBuilder.CreatePHI(Int8PtrTy, 0,
 1720 llvm::Value *CodeGenFunction::emitArrayLength(const ArrayType *origArrayType,
 1727   llvm::Value *numVLAElements = nullptr;
 1751   SmallVector<llvm::Value*, 8> gepIndices;
 1800   llvm::Value *numElements
 1819   llvm::Value *numElements = nullptr;
 1824     llvm::Value *vlaSize = VLASizeMap[type->getSizeExpr()];
 1849   llvm::Value *VlaSize = VLASizeMap[Vla->getSizeExpr()];
 1932         llvm::Value *&entry = VLASizeMap[size];
 1934           llvm::Value *Size = EmitScalarExpr(size);
 1943             llvm::Value *Zero = llvm::Constant::getNullValue(Size->getType());
 2025   llvm::Value *value = rvalue.getScalarVal();
 2045 void CodeGenFunction::EmitAlignmentAssumption(llvm::Value *PtrValue,
 2048                                               llvm::Value *Alignment,
 2049                                               llvm::Value *OffsetValue) {
 2050   llvm::Value *TheCheck;
 2059 void CodeGenFunction::EmitAlignmentAssumption(llvm::Value *PtrValue,
 2062                                               llvm::Value *Alignment,
 2063                                               llvm::Value *OffsetValue) {
 2073 llvm::Value *CodeGenFunction::EmitAnnotationCall(llvm::Function *AnnotationFn,
 2074                                                  llvm::Value *AnnotatedVal,
 2077   llvm::Value *Args[4] = {
 2086 void CodeGenFunction::EmitVarAnnotations(const VarDecl *D, llvm::Value *V) {
 2099   llvm::Value *V = Addr.getPointer();
 2249 llvm::Value *
 2251   llvm::Value *Condition = nullptr;
 2257     llvm::Value *FeatureCond = EmitX86CpuSupports(RO.Conditions.Features);
 2274   llvm::SmallVector<llvm::Value *, 10> Args;
 2304     llvm::Value *Condition = FormResolverCondition(RO);
 2339     llvm::Value *Ptr, QualType Ty, SourceLocation Loc,
 2340     SourceLocation SecondaryLoc, llvm::Value *Alignment,
 2341     llvm::Value *OffsetValue, llvm::Value *TheCheck,
 2341     llvm::Value *OffsetValue, llvm::Value *TheCheck,
 2374     llvm::Value *DynamicData[] = {EmitCheckValue(Ptr),
tools/clang/lib/CodeGen/CodeGenFunction.h
  145   typedef llvm::PointerIntPair<llvm::Value*, 1, bool> saved_type;
  148   static bool needsSaving(llvm::Value *value) {
  157   static saved_type save(CodeGenFunction &CGF, llvm::Value *value);
  158   static llvm::Value *restore(CodeGenFunction &CGF, saved_type value);
  164   typedef T *type;
  199     llvm::Value *Value;
  202     saved_type(llvm::Value *v, Kind k, unsigned a = 0)
  260   typedef std::pair<llvm::Value *, llvm::Value *> ComplexPairTy;
  260   typedef std::pair<llvm::Value *, llvm::Value *> ComplexPairTy;
  282   typedef llvm::function_ref<std::pair<llvm::Value *, llvm::Value *>(
  282   typedef llvm::function_ref<std::pair<llvm::Value *, llvm::Value *>(
  372     virtual void setContextValue(llvm::Value *V) { ThisValue = V; }
  374     virtual llvm::Value *getContextValue() const { return ThisValue; }
  406     llvm::Value *ThisValue;
  488   llvm::Value *BlockPointer = nullptr;
  495   llvm::DenseMap<const VarDecl *, llvm::Value *> NRVOFlags;
  504     llvm::Value *Addr;
  505     llvm::Value *Size;
  508     CallLifetimeEnd(Address addr, llvm::Value *size)
  543   llvm::Value *ExceptionSlot = nullptr;
  555   llvm::Value *SEHInfo = nullptr;
  570   SmallVector<llvm::Value*, 8> ObjCEHValueStack;
  753     void ForceCleanup(std::initializer_list<llvm::Value**> ValuesToReload = {}) {
  954                    std::initializer_list<llvm::Value **> ValuesToReload = {});
  962                    std::initializer_list<llvm::Value **> ValuesToReload = {});
 1033   void setBeforeOutermostConditional(llvm::Value *value, Address addr) {
 1342   void incrementProfileCounter(const Stmt *S, llvm::Value *StepV = nullptr) {
 1390   llvm::DenseMap<const Expr*, llvm::Value*> VLASizeMap;
 1448     llvm::Value *OldCXXThisValue;
 1462     ArrayInitLoopExprScope(CodeGenFunction &CGF, llvm::Value *Index)
 1472     llvm::Value *OldArrayInitIndex;
 1521     llvm::Value *OldCXXABIThisValue;
 1522     llvm::Value *OldCXXThisValue;
 1534   llvm::Value *CXXABIThisValue = nullptr;
 1535   llvm::Value *CXXThisValue = nullptr;
 1545   llvm::Value *ArrayInitIndex = nullptr;
 1554   llvm::Value *CXXStructorImplicitParamValue = nullptr;
 1574   llvm::Value *RetValNullabilityPrecondition = nullptr;
 1598   llvm::MapVector<llvm::Value *, llvm::BasicBlock *> TerminateFunclets;
 1639   llvm::Value *getExceptionFromSlot();
 1640   llvm::Value *getSelectorFromSlot();
 1671   void pushIrregularPartialArrayCleanup(llvm::Value *arrayBegin,
 1676   void pushRegularPartialArrayCleanup(llvm::Value *arrayBegin,
 1677                                       llvm::Value *arrayEnd,
 1692                                    llvm::Value *CompletePtr,
 1701   void emitArrayDestroy(llvm::Value *begin, llvm::Value *end,
 1701   void emitArrayDestroy(llvm::Value *begin, llvm::Value *end,
 1764   llvm::Value *EmitBlockLiteral(const BlockExpr *);
 1782   llvm::Value *EmitBlockCopyAndAutorelease(llvm::Value *Block, QualType Ty);
 1782   llvm::Value *EmitBlockCopyAndAutorelease(llvm::Value *Block, QualType Ty);
 1784   void BuildBlockRelease(llvm::Value *DeclPtr, BlockFieldFlags flags,
 1811                                 llvm::Value *ptr);
 1884   void EmitMustTailThunk(GlobalDecl GD, llvm::Value *AdjustedThisPtr,
 1927   llvm::Value *GetVTablePtr(Address This, llvm::Type *VTableTy,
 1943   void EmitVTablePtrCheckForCast(QualType T, llvm::Value *Derived,
 1949   void EmitVTablePtrCheckForCall(const CXXRecordDecl *RD, llvm::Value *VTable,
 1954   void EmitVTablePtrCheck(const CXXRecordDecl *RD, llvm::Value *VTable,
 1961                                     llvm::Value *VTable, SourceLocation Loc);
 1969   llvm::Value *EmitVTableTypeCheckedLoad(const CXXRecordDecl *RD, llvm::Value *VTable,
 1969   llvm::Value *EmitVTableTypeCheckedLoad(const CXXRecordDecl *RD, llvm::Value *VTable,
 2000   llvm::Value *DecodeAddrUsedInPrologue(llvm::Value *F,
 2000   llvm::Value *DecodeAddrUsedInPrologue(llvm::Value *F,
 2001                                         llvm::Value *EncodedAddr);
 2016   void EmitReturnValueCheck(llvm::Value *RV);
 2044   llvm::Value *LoadObjCSelf();
 2134   LValue MakeAddrLValue(llvm::Value *V, QualType T, CharUnits Alignment,
 2140   LValue MakeAddrLValue(llvm::Value *V, QualType T, CharUnits Alignment,
 2146   LValue MakeNaturalAlignPointeeAddrLValue(llvm::Value *V, QualType T);
 2147   LValue MakeNaturalAlignAddrLValue(llvm::Value *V, QualType T);
 2200                                      llvm::Value *ArraySize = nullptr);
 2203                            llvm::Value *ArraySize = nullptr,
 2207                                       llvm::Value *ArraySize = nullptr);
 2229   void InitTempAlloca(Address Alloca, llvm::Value *Value);
 2267   llvm::Value *EmitCastToVoidPtr(llvm::Value *value);
 2267   llvm::Value *EmitCastToVoidPtr(llvm::Value *value);
 2271   llvm::Value *EvaluateExprAsBool(const Expr *E);
 2377   llvm::Value *getArrayInitIndex() { return ArrayInitIndex; }
 2400   llvm::Value *EmitVAStartEnd(llvm::Value *ArgValue, bool IsStart);
 2400   llvm::Value *EmitVAStartEnd(llvm::Value *ArgValue, bool IsStart);
 2414   llvm::Value *emitArrayLength(const ArrayType *arrayType,
 2425     llvm::Value *NumElts;
 2428     VlaSizePair(llvm::Value *NE, QualType T) : NumElts(NE), Type(T) {}
 2445   llvm::Value *LoadCXXThis() {
 2455   llvm::Value *LoadCXXVTT() {
 2488   llvm::Value *GetVTTParameter(GlobalDecl GD, bool ForVirtualBase,
 2549                                   llvm::Value *NumElements,
 2563                                llvm::Value *NumElements,
 2564                                llvm::Value *AllocSizeWithoutCookie);
 2569   llvm::Value *EmitLifetimeStart(uint64_t Size, llvm::Value *Addr);
 2569   llvm::Value *EmitLifetimeStart(uint64_t Size, llvm::Value *Addr);
 2570   void EmitLifetimeEnd(llvm::Value *Size, llvm::Value *Addr);
 2570   void EmitLifetimeEnd(llvm::Value *Size, llvm::Value *Addr);
 2572   llvm::Value *EmitCXXNewExpr(const CXXNewExpr *E);
 2575   void EmitDeleteCall(const FunctionDecl *DeleteFD, llvm::Value *Ptr,
 2576                       QualType DeleteTy, llvm::Value *NumElements = nullptr,
 2582   llvm::Value *EmitCXXTypeidExpr(const CXXTypeidExpr *E);
 2583   llvm::Value *EmitDynamicCast(Address V, const CXXDynamicCastExpr *DCE);
 2637   void EmitTypeCheck(TypeCheckKind TCK, SourceLocation Loc, llvm::Value *V,
 2640                      llvm::Value *ArraySize = nullptr);
 2645   void EmitBoundsCheck(const Expr *E, const Expr *Base, llvm::Value *Index,
 2648   llvm::Value *EmitScalarPrePostIncDec(const UnaryOperator *E, LValue LV,
 2678                              llvm::Value *Address);
 2700     llvm::Value *NRVOFlag;
 2711     llvm::Value *SizeForLifetimeMarkers;
 2735     llvm::Value *getSizeForLifetimeMarkers() const {
 2778     llvm::Value *Value;
 2780     ParamValue(llvm::Value *V, unsigned A) : Value(V), Alignment(A) {}
 2782     static ParamValue forDirect(llvm::Value *value) {
 2791     llvm::Value *getAnyValue() const { return Value; }
 2793     llvm::Value *getDirectValue() const {
 2819   void EmitAlignmentAssumptionCheck(llvm::Value *Ptr, QualType Ty,
 2822                                     llvm::Value *Alignment,
 2823                                     llvm::Value *OffsetValue,
 2824                                     llvm::Value *TheCheck,
 2827   void EmitAlignmentAssumption(llvm::Value *PtrValue, QualType Ty,
 2829                                llvm::Value *Alignment,
 2830                                llvm::Value *OffsetValue = nullptr);
 2832   void EmitAlignmentAssumption(llvm::Value *PtrValue, const Expr *E,
 2833                                SourceLocation AssumptionLoc, llvm::Value *Alignment,
 2834                                llvm::Value *OffsetValue = nullptr);
 2930                                 llvm::Value *ParentFP,
 2931                                 llvm::Value *EntryEBP);
 2932   llvm::Value *EmitSEHExceptionCode();
 2933   llvm::Value *EmitSEHExceptionInfo();
 2934   llvm::Value *EmitSEHAbnormalTermination();
 2952                                     llvm::Value *ParentFP);
 2971   llvm::Value *getTypeSize(QualType Ty);
 2978                                   SmallVectorImpl<llvm::Value *> &CapturedVars);
 3066                                      llvm::Value *IsLastIterCond = nullptr);
 3075       const llvm::function_ref<llvm::Value *(CodeGenFunction &)> CondGen);
 3268       const llvm::function_ref<llvm::Value *(CodeGenFunction &)> CondGen);
 3275   llvm::Value *EmitBlockLiteral(const CGBlockInfo &Info);
 3288     llvm::Value *Chunk = nullptr;
 3303                      llvm::Value *Chunk = nullptr, Expr *EUB = nullptr,
 3391   std::pair<RValue, llvm::Value *> EmitAtomicCompareExchange(
 3405   llvm::Value *EmitToMemory(llvm::Value *Value, QualType Ty);
 3405   llvm::Value *EmitToMemory(llvm::Value *Value, QualType Ty);
 3409   llvm::Value *EmitFromMemory(llvm::Value *Value, QualType Ty);
 3409   llvm::Value *EmitFromMemory(llvm::Value *Value, QualType Ty);
 3415   bool EmitScalarRangeCheck(llvm::Value *Value, QualType Ty,
 3421   llvm::Value *EmitLoadOfScalar(Address Addr, bool Volatile, QualType Ty,
 3429   llvm::Value *EmitLoadOfScalar(Address Addr, bool Volatile, QualType Ty,
 3438   llvm::Value *EmitLoadOfScalar(LValue lvalue, SourceLocation Loc);
 3443   void EmitStoreOfScalar(llvm::Value *Value, Address Addr,
 3451   void EmitStoreOfScalar(llvm::Value *Value, Address Addr,
 3461   void EmitStoreOfScalar(llvm::Value *value, LValue lvalue, bool isInit=false);
 3485                                       llvm::Value **Result=nullptr);
 3491                                              llvm::Value *&Result);
 3559   llvm::Value *emitScalarConstant(const ConstantEmission &Constant, Expr *E);
 3565   llvm::Value *EmitIvarOffset(const ObjCInterfaceDecl *Interface,
 3577                            llvm::Value* Base, const ObjCIvarDecl *Ivar,
 3609                   ReturnValueSlot ReturnValue, llvm::Value *Chain = nullptr);
 3621                                   ArrayRef<llvm::Value *> args,
 3626                                           ArrayRef<llvm::Value *> args,
 3630   getBundlesForFunclet(llvm::Value *Callee);
 3633                                    ArrayRef<llvm::Value *> Args,
 3636                                           ArrayRef<llvm::Value *> args,
 3641                                        ArrayRef<llvm::Value *> args);
 3677                               ReturnValueSlot ReturnValue, llvm::Value *This,
 3678                               llvm::Value *ImplicitParam,
 3682                                llvm::Value *This, QualType ThisTy,
 3683                                llvm::Value *ImplicitParam,
 3695                                           llvm::Value *memberPtr,
 3729   llvm::Value *EmitTargetBuiltinExpr(unsigned BuiltinID, const CallExpr *E,
 3732   llvm::Value *EmitAArch64CompareBuiltinExpr(llvm::Value *Op, llvm::Type *Ty,
 3732   llvm::Value *EmitAArch64CompareBuiltinExpr(llvm::Value *Op, llvm::Type *Ty,
 3736   llvm::Value *EmitARMBuiltinExpr(unsigned BuiltinID, const CallExpr *E,
 3739   llvm::Value *EmitARMMVEBuiltinExpr(unsigned BuiltinID, const CallExpr *E,
 3743   llvm::Value *EmitCommonNeonBuiltinExpr(unsigned BuiltinID,
 3749                                          SmallVectorImpl<llvm::Value *> &Ops,
 3756   llvm::Value *EmitNeonCall(llvm::Function *F,
 3757                             SmallVectorImpl<llvm::Value*> &O,
 3760   llvm::Value *EmitNeonSplat(llvm::Value *V, llvm::Constant *Idx);
 3760   llvm::Value *EmitNeonSplat(llvm::Value *V, llvm::Constant *Idx);
 3761   llvm::Value *EmitNeonShiftVector(llvm::Value *V, llvm::Type *Ty,
 3761   llvm::Value *EmitNeonShiftVector(llvm::Value *V, llvm::Type *Ty,
 3763   llvm::Value *EmitNeonRShiftImm(llvm::Value *Vec, llvm::Value *Amt,
 3763   llvm::Value *EmitNeonRShiftImm(llvm::Value *Vec, llvm::Value *Amt,
 3763   llvm::Value *EmitNeonRShiftImm(llvm::Value *Vec, llvm::Value *Amt,
 3765   llvm::Value *vectorWrapScalar16(llvm::Value *Op);
 3765   llvm::Value *vectorWrapScalar16(llvm::Value *Op);
 3766   llvm::Value *EmitAArch64BuiltinExpr(unsigned BuiltinID, const CallExpr *E,
 3768   llvm::Value *EmitBPFBuiltinExpr(unsigned BuiltinID, const CallExpr *E);
 3770   llvm::Value *BuildVector(ArrayRef<llvm::Value*> Ops);
 3770   llvm::Value *BuildVector(ArrayRef<llvm::Value*> Ops);
 3771   llvm::Value *EmitX86BuiltinExpr(unsigned BuiltinID, const CallExpr *E);
 3772   llvm::Value *EmitPPCBuiltinExpr(unsigned BuiltinID, const CallExpr *E);
 3773   llvm::Value *EmitAMDGPUBuiltinExpr(unsigned BuiltinID, const CallExpr *E);
 3774   llvm::Value *EmitSystemZBuiltinExpr(unsigned BuiltinID, const CallExpr *E);
 3775   llvm::Value *EmitNVPTXBuiltinExpr(unsigned BuiltinID, const CallExpr *E);
 3776   llvm::Value *EmitWebAssemblyBuiltinExpr(unsigned BuiltinID,
 3778   llvm::Value *EmitHexagonBuiltinExpr(unsigned BuiltinID, const CallExpr *E);
 3784   llvm::Value *EmitMSVCBuiltinExpr(MSVCIntrin BuiltinID, const CallExpr *E);
 3786   llvm::Value *EmitBuiltinAvailable(ArrayRef<llvm::Value *> Args);
 3786   llvm::Value *EmitBuiltinAvailable(ArrayRef<llvm::Value *> Args);
 3788   llvm::Value *EmitObjCProtocolExpr(const ObjCProtocolExpr *E);
 3789   llvm::Value *EmitObjCStringLiteral(const ObjCStringLiteral *E);
 3790   llvm::Value *EmitObjCBoxedExpr(const ObjCBoxedExpr *E);
 3791   llvm::Value *EmitObjCArrayLiteral(const ObjCArrayLiteral *E);
 3792   llvm::Value *EmitObjCDictionaryLiteral(const ObjCDictionaryLiteral *E);
 3793   llvm::Value *EmitObjCCollectionLiteral(const Expr *E,
 3795   llvm::Value *EmitObjCSelectorExpr(const ObjCSelectorExpr *E);
 3807   void EmitARCInitWeak(Address addr, llvm::Value *value);
 3809   llvm::Value *EmitARCLoadWeak(Address addr);
 3810   llvm::Value *EmitARCLoadWeakRetained(Address addr);
 3811   llvm::Value *EmitARCStoreWeak(Address addr, llvm::Value *value, bool ignored);
 3811   llvm::Value *EmitARCStoreWeak(Address addr, llvm::Value *value, bool ignored);
 3816   llvm::Value *EmitARCRetainAutorelease(QualType type, llvm::Value *value);
 3816   llvm::Value *EmitARCRetainAutorelease(QualType type, llvm::Value *value);
 3817   llvm::Value *EmitARCRetainAutoreleaseNonBlock(llvm::Value *value);
 3817   llvm::Value *EmitARCRetainAutoreleaseNonBlock(llvm::Value *value);
 3818   llvm::Value *EmitARCStoreStrong(LValue lvalue, llvm::Value *value,
 3818   llvm::Value *EmitARCStoreStrong(LValue lvalue, llvm::Value *value,
 3820   llvm::Value *EmitARCStoreStrongCall(Address addr, llvm::Value *value,
 3820   llvm::Value *EmitARCStoreStrongCall(Address addr, llvm::Value *value,
 3822   llvm::Value *EmitARCRetain(QualType type, llvm::Value *value);
 3822   llvm::Value *EmitARCRetain(QualType type, llvm::Value *value);
 3823   llvm::Value *EmitARCRetainNonBlock(llvm::Value *value);
 3823   llvm::Value *EmitARCRetainNonBlock(llvm::Value *value);
 3824   llvm::Value *EmitARCRetainBlock(llvm::Value *value, bool mandatory);
 3824   llvm::Value *EmitARCRetainBlock(llvm::Value *value, bool mandatory);
 3826   void EmitARCRelease(llvm::Value *value, ARCPreciseLifetime_t precise);
 3827   llvm::Value *EmitARCAutorelease(llvm::Value *value);
 3827   llvm::Value *EmitARCAutorelease(llvm::Value *value);
 3828   llvm::Value *EmitARCAutoreleaseReturnValue(llvm::Value *value);
 3828   llvm::Value *EmitARCAutoreleaseReturnValue(llvm::Value *value);
 3829   llvm::Value *EmitARCRetainAutoreleaseReturnValue(llvm::Value *value);
 3829   llvm::Value *EmitARCRetainAutoreleaseReturnValue(llvm::Value *value);
 3830   llvm::Value *EmitARCRetainAutoreleasedReturnValue(llvm::Value *value);
 3830   llvm::Value *EmitARCRetainAutoreleasedReturnValue(llvm::Value *value);
 3831   llvm::Value *EmitARCUnsafeClaimAutoreleasedReturnValue(llvm::Value *value);
 3831   llvm::Value *EmitARCUnsafeClaimAutoreleasedReturnValue(llvm::Value *value);
 3833   llvm::Value *EmitObjCAutorelease(llvm::Value *value, llvm::Type *returnType);
 3833   llvm::Value *EmitObjCAutorelease(llvm::Value *value, llvm::Type *returnType);
 3834   llvm::Value *EmitObjCRetainNonBlock(llvm::Value *value,
 3834   llvm::Value *EmitObjCRetainNonBlock(llvm::Value *value,
 3836   void EmitObjCRelease(llvm::Value *value, ARCPreciseLifetime_t precise);
 3838   std::pair<LValue,llvm::Value*>
 3840   std::pair<LValue,llvm::Value*>
 3842   std::pair<LValue,llvm::Value*>
 3845   llvm::Value *EmitObjCAlloc(llvm::Value *value,
 3845   llvm::Value *EmitObjCAlloc(llvm::Value *value,
 3847   llvm::Value *EmitObjCAllocWithZone(llvm::Value *value,
 3847   llvm::Value *EmitObjCAllocWithZone(llvm::Value *value,
 3849   llvm::Value *EmitObjCAllocInit(llvm::Value *value, llvm::Type *resultType);
 3849   llvm::Value *EmitObjCAllocInit(llvm::Value *value, llvm::Type *resultType);
 3851   llvm::Value *EmitObjCThrowOperand(const Expr *expr);
 3852   llvm::Value *EmitObjCConsumeObject(QualType T, llvm::Value *Ptr);
 3852   llvm::Value *EmitObjCConsumeObject(QualType T, llvm::Value *Ptr);
 3853   llvm::Value *EmitObjCExtendObjectLifetime(QualType T, llvm::Value *Ptr);
 3853   llvm::Value *EmitObjCExtendObjectLifetime(QualType T, llvm::Value *Ptr);
 3855   llvm::Value *EmitARCExtendBlockObject(const Expr *expr);
 3856   llvm::Value *EmitARCReclaimReturnedObject(const Expr *e,
 3858   llvm::Value *EmitARCRetainScalarExpr(const Expr *expr);
 3859   llvm::Value *EmitARCRetainAutoreleaseScalarExpr(const Expr *expr);
 3860   llvm::Value *EmitARCUnsafeUnretainedScalarExpr(const Expr *expr);
 3862   void EmitARCIntrinsicUse(ArrayRef<llvm::Value*> values);
 3870   void EmitObjCAutoreleasePoolPop(llvm::Value *Ptr);
 3871   llvm::Value *EmitObjCAutoreleasePoolPush();
 3872   llvm::Value *EmitObjCMRRAutoreleasePoolPush();
 3873   void EmitObjCAutoreleasePoolCleanup(llvm::Value *Ptr);
 3874   void EmitObjCMRRAutoreleasePoolPop(llvm::Value *Ptr);
 3887   llvm::Value *EmitScalarExpr(const Expr *E , bool IgnoreResultAssign = false);
 3891   llvm::Value *EmitScalarConversion(llvm::Value *Src, QualType SrcTy,
 3891   llvm::Value *EmitScalarConversion(llvm::Value *Src, QualType SrcTy,
 3896   llvm::Value *EmitComplexToScalarConversion(ComplexPairTy Src, QualType SrcTy,
 3911   void EmitExtendGCLifetime(llvm::Value *object);
 3970   void EmitCXXGuardedInitBranch(llvm::Value *NeedsInit,
 4015   llvm::Value *EmitAnnotationCall(llvm::Function *AnnotationFn,
 4016                                   llvm::Value *AnnotatedVal,
 4021   void EmitVarAnnotations(const VarDecl *D, llvm::Value *V);
 4067   void EmitNullabilityCheck(LValue LHS, llvm::Value *RHS, SourceLocation Loc);
 4078   llvm::Value *EmitCheckedInBoundsGEP(llvm::Value *Ptr,
 4078   llvm::Value *EmitCheckedInBoundsGEP(llvm::Value *Ptr,
 4079                                       ArrayRef<llvm::Value *> IdxList,
 4094   llvm::Value *EmitCheckedArgForBuiltin(const Expr *E, BuiltinCheckKind Kind);
 4102   llvm::Value *EmitCheckValue(llvm::Value *V);
 4102   llvm::Value *EmitCheckValue(llvm::Value *V);
 4111   void EmitCheck(ArrayRef<std::pair<llvm::Value *, SanitizerMask>> Checked,
 4113                  ArrayRef<llvm::Value *> DynamicArgs);
 4117   void EmitCfiSlowPathCheck(SanitizerMask Kind, llvm::Value *Cond,
 4118                             llvm::ConstantInt *TypeId, llvm::Value *Ptr,
 4127   void EmitTrapCheck(llvm::Value *Checked);
 4155   void SetFPAccuracy(llvm::Value *Val, float Accuracy);
 4161   void deferPlaceholderReplacement(llvm::Instruction *Old, llvm::Value *New);
 4163   llvm::SmallVector<std::pair<llvm::Instruction *, llvm::Value *>, 4>
 4177                           SmallVectorImpl<llvm::Value *>::iterator &AI);
 4183                         SmallVectorImpl<llvm::Value *> &IRCallArgs,
 4186   llvm::Value* EmitAsmInput(const TargetInfo::ConstraintInfo &Info,
 4189   llvm::Value* EmitAsmInputLValue(const TargetInfo::ConstraintInfo &Info,
 4199   llvm::Value *evaluateOrEmitBuiltinObjectSize(const Expr *E, unsigned Type,
 4201                                                llvm::Value *EmittedE,
 4207   llvm::Value *emitBuiltinObjectSize(const Expr *E, unsigned Type,
 4209                                      llvm::Value *EmittedE,
 4324   llvm::Value *LoadPassedObjectSize(const Expr *E, QualType EltTy);
 4362   llvm::Value *GetValueForARMHint(unsigned BuiltinID);
 4363   llvm::Value *EmitX86CpuIs(const CallExpr *E);
 4364   llvm::Value *EmitX86CpuIs(StringRef CPUStr);
 4365   llvm::Value *EmitX86CpuSupports(const CallExpr *E);
 4366   llvm::Value *EmitX86CpuSupports(ArrayRef<StringRef> FeatureStrs);
 4367   llvm::Value *EmitX86CpuSupports(uint64_t Mask);
 4368   llvm::Value *EmitX86CpuInit();
 4369   llvm::Value *FormResolverCondition(const MultiVersionResolverOption &RO);
 4373 DominatingLLVMValue::save(CodeGenFunction &CGF, llvm::Value *value) {
 4386 inline llvm::Value *DominatingLLVMValue::restore(CodeGenFunction &CGF,
tools/clang/lib/CodeGen/CodeGenModule.cpp
 4261   SmallVector<llvm::Value*, 4> newArgs;
 4264   for (llvm::Value::use_iterator ui = old->use_begin(), ue = old->use_end();
 4266     llvm::Value::use_iterator use = ui++; // Increment before the use is erased.
 5633     llvm::Value *Addr = I.second.getPointer();
 5635       llvm::Value *DAddr = GetPointerConstant(getLLVMContext(), D);
 5921 llvm::Value *
tools/clang/lib/CodeGen/CodeGenModule.h
 1347   llvm::Value *
tools/clang/lib/CodeGen/CodeGenPGO.cpp
  893                                       llvm::Value *StepV) {
  902   llvm::Value *Args[] = {llvm::ConstantExpr::getBitCast(FuncNameVar, I8PtrTy),
  918     llvm::Instruction *ValueSite, llvm::Value *ValuePtr) {
  933     llvm::Value *Args[5] = {
tools/clang/lib/CodeGen/CodeGenPGO.h
   89                     llvm::Instruction *ValueSite, llvm::Value *ValuePtr);
  104                             llvm::Value *StepV);
tools/clang/lib/CodeGen/EHScopeStack.h
   75 template <class T> struct DominatingValue<T*> : DominatingPointer<T> {};
tools/clang/lib/CodeGen/ItaniumCXXABI.cpp
  123                                     llvm::Value *&ThisPtrForCall,
  124                                     llvm::Value *MemFnPtr,
  127   llvm::Value *
  130                                  llvm::Value *MemPtr,
  133   llvm::Value *EmitMemberPointerConversion(CodeGenFunction &CGF,
  135                                            llvm::Value *Src) override;
  148   llvm::Value *EmitMemberPointerComparison(CodeGenFunction &CGF,
  149                                            llvm::Value *L, llvm::Value *R,
  149                                            llvm::Value *L, llvm::Value *R,
  153   llvm::Value *EmitMemberPointerIsNotNull(CodeGenFunction &CGF,
  154                                          llvm::Value *Addr,
  168                                       llvm::Value *Exn) override;
  180   llvm::Value *EmitTypeid(CodeGenFunction &CGF, QualType SrcRecordTy,
  187   llvm::Value *EmitDynamicCastCall(CodeGenFunction &CGF, Address Value,
  192   llvm::Value *EmitDynamicCastToVoid(CodeGenFunction &CGF, Address Value,
  198   llvm::Value *
  248   llvm::Value *getVTableAddressPointInStructor(
  252   llvm::Value *getVTableAddressPointInStructorWithVTT(
  267   llvm::Value *EmitVirtualDestructorCall(CodeGenFunction &CGF,
  288   llvm::Value *performThisAdjustment(CodeGenFunction &CGF, Address This,
  291   llvm::Value *performReturnAdjustment(CodeGenFunction &CGF, Address Ret,
  307                                 llvm::Value *NumElements,
  310   llvm::Value *readArrayCookieImpl(CodeGenFunction &CGF,
  322                                                 llvm::Value *Val);
  404   std::pair<llvm::Value *, const CXXRecordDecl *>
  473                                 llvm::Value *NumElements,
  476   llvm::Value *readArrayCookieImpl(CodeGenFunction &CGF, Address allocPtr,
  577     llvm::Value *&ThisPtrForCall,
  578     llvm::Value *MemFnPtr, const MemberPointerType *MPT) {
  596   llvm::Value *RawAdj = Builder.CreateExtractValue(MemFnPtr, 1, "memptr.adj");
  599   llvm::Value *Adj = RawAdj;
  605   llvm::Value *This = ThisAddr.getPointer();
  606   llvm::Value *Ptr = Builder.CreateBitCast(This, Builder.getInt8PtrTy());
  612   llvm::Value *FnAsInt = Builder.CreateExtractValue(MemFnPtr, 0, "memptr.ptr");
  616   llvm::Value *IsVirtual;
  634   llvm::Value *VTable =
  640   llvm::Value *VTableOffset = FnAsInt;
  656   llvm::Value *VirtualFn = nullptr;
  660     llvm::Value *TypeId = nullptr;
  661     llvm::Value *CheckResult = nullptr;
  670     llvm::Value *VFPAddr = Builder.CreateGEP(VTable, VTableOffset);
  678       llvm::Value *CheckedLoad = Builder.CreateCall(
  715         llvm::Value *AllVtables = llvm::MetadataAsValue::get(
  718         llvm::Value *ValidVtable = Builder.CreateCall(
  734   llvm::Value *NonVirtualFn =
  749       llvm::Value *Bit = Builder.getFalse();
  750       llvm::Value *CastedNonVirtualFn =
  757         llvm::Value *TypeId =
  760         llvm::Value *TypeTest =
  786 llvm::Value *ItaniumCXXABI::EmitMemberDataPointerAddress(
  787     CodeGenFunction &CGF, const Expr *E, Address Base, llvm::Value *MemPtr,
  797   llvm::Value *Addr =
  830 llvm::Value *
  833                                            llvm::Value *src) {
  857     llvm::Value *dst;
  864     llvm::Value *null = llvm::Constant::getAllOnesValue(src->getType());
  865     llvm::Value *isNull = Builder.CreateICmpEQ(src, null, "memptr.isnull");
  876   llvm::Value *srcAdj = Builder.CreateExtractValue(src, 1, "src.adj");
  877   llvm::Value *dstAdj;
 1039 llvm::Value *
 1041                                            llvm::Value *L,
 1042                                            llvm::Value *R,
 1074   llvm::Value *LPtr = Builder.CreateExtractValue(L, 0, "lhs.memptr.ptr");
 1075   llvm::Value *RPtr = Builder.CreateExtractValue(R, 0, "rhs.memptr.ptr");
 1079   llvm::Value *PtrEq = Builder.CreateICmp(Eq, LPtr, RPtr, "cmp.ptr");
 1084   llvm::Value *Zero = llvm::Constant::getNullValue(LPtr->getType());
 1085   llvm::Value *EqZero = Builder.CreateICmp(Eq, LPtr, Zero, "cmp.ptr.null");
 1089   llvm::Value *LAdj = Builder.CreateExtractValue(L, 1, "lhs.memptr.adj");
 1090   llvm::Value *RAdj = Builder.CreateExtractValue(R, 1, "rhs.memptr.adj");
 1091   llvm::Value *AdjEq = Builder.CreateICmp(Eq, LAdj, RAdj, "cmp.adj");
 1096     llvm::Value *One = llvm::ConstantInt::get(LPtr->getType(), 1);
 1099     llvm::Value *OrAdj = Builder.CreateOr(LAdj, RAdj, "or.adj");
 1100     llvm::Value *OrAdjAnd1 = Builder.CreateAnd(OrAdj, One);
 1101     llvm::Value *OrAdjAnd1EqZero = Builder.CreateICmp(Eq, OrAdjAnd1, Zero,
 1107   llvm::Value *Result = Builder.CreateBinOp(Or, EqZero, AdjEq);
 1113 llvm::Value *
 1115                                           llvm::Value *MemPtr,
 1122     llvm::Value *NegativeOne =
 1128   llvm::Value *Ptr = Builder.CreateExtractValue(MemPtr, 0, "memptr.ptr");
 1131   llvm::Value *Result = Builder.CreateICmpNE(Ptr, Zero, "memptr.tobool");
 1137     llvm::Value *Adj = Builder.CreateExtractValue(MemPtr, 1, "memptr.adj");
 1138     llvm::Value *VirtualBit = Builder.CreateAnd(Adj, One, "memptr.virtualbit");
 1139     llvm::Value *IsVirtual = Builder.CreateICmpNE(VirtualBit, Zero,
 1182     llvm::Value *VTable =
 1186     llvm::Value *OffsetPtr = CGF.Builder.CreateConstInBoundsGEP1_64(
 1188     llvm::Value *Offset =
 1192     llvm::Value *CompletePtr =
 1275   llvm::Value *args[] = { ExceptionPtr, TypeInfo, Dtor };
 1379 llvm::Value *ItaniumCXXABI::EmitTypeid(CodeGenFunction &CGF,
 1385   llvm::Value *Value =
 1398 llvm::Value *ItaniumCXXABI::EmitDynamicCastCall(
 1405   llvm::Value *SrcRTTI =
 1407   llvm::Value *DestRTTI =
 1413   llvm::Value *OffsetHint = llvm::ConstantInt::get(
 1418   llvm::Value *Value = ThisAddr.getPointer();
 1421   llvm::Value *args[] = {Value, SrcRTTI, DestRTTI, OffsetHint};
 1431     llvm::Value *IsNull = CGF.Builder.CreateIsNull(Value);
 1441 llvm::Value *ItaniumCXXABI::EmitDynamicCastToVoid(CodeGenFunction &CGF,
 1452   llvm::Value *VTable = CGF.GetVTablePtr(ThisAddr, PtrDiffLTy->getPointerTo(),
 1456   llvm::Value *OffsetToTop =
 1463   llvm::Value *Value = ThisAddr.getPointer();
 1478 llvm::Value *
 1483   llvm::Value *VTablePtr = CGF.GetVTablePtr(This, CGM.Int8PtrTy, ClassDecl);
 1488   llvm::Value *VBaseOffsetPtr =
 1494   llvm::Value *VBaseOffset =
 1606   llvm::Value *VTT =
 1619   llvm::Value *VTT = CGF.GetVTTParameter(GD, ForVirtualBase, Delegating);
 1682 llvm::Value *ItaniumCXXABI::getVTableAddressPointInStructor(
 1705   llvm::Value *Indices[] = {
 1716 llvm::Value *ItaniumCXXABI::getVTableAddressPointInStructorWithVTT(
 1727   llvm::Value *VTT = CGF.LoadCXXVTT();
 1781   llvm::Value *VTable = CGF.GetVTablePtr(This, Ty, MethodDecl->getParent());
 1784   llvm::Value *VFunc;
 1792     llvm::Value *VFuncPtr =
 1816 llvm::Value *ItaniumCXXABI::EmitVirtualDestructorCall(
 1906 static llvm::Value *performTypeAdjustment(CodeGenFunction &CGF,
 1923   llvm::Value *ResultPtr;
 1929     llvm::Value *VTablePtr = CGF.Builder.CreateLoad(VTablePtrPtr);
 1931     llvm::Value *OffsetPtr =
 1937     llvm::Value *Offset =
 1957 llvm::Value *ItaniumCXXABI::performThisAdjustment(CodeGenFunction &CGF,
 1965 llvm::Value *
 1995                                              llvm::Value *NumElements,
 2039 llvm::Value *ItaniumCXXABI::readArrayCookieImpl(CodeGenFunction &CGF,
 2080                                          llvm::Value *numElements,
 2090   llvm::Value *elementSize = llvm::ConstantInt::get(CGF.SizeTy,
 2104 llvm::Value *ARMCXXABI::readArrayCookieImpl(CodeGenFunction &CGF,
 2306   llvm::Value *V =
 2310   llvm::Value *NeedsInit = Builder.CreateIsNull(V, "guard.uninitialized");
 2324     llvm::Value *V
 2401   llvm::Value *args[] = {llvm::ConstantExpr::getBitCast(
 2507                                              llvm::Value *Val) {
 2517   if (llvm::Value *V = CGM.getModule().getNamedValue(WrapperName))
 2690       llvm::Value *Have = Builder.CreateIsNotNull(Init);
 2704     llvm::Value *Val = Var;
 2719   llvm::Value *Val = CGF.CGM.GetAddrOfGlobalVar(VD);
 4075 static llvm::Value *CallBeginCatch(CodeGenFunction &CGF,
 4076                                    llvm::Value *Exn,
 4093   llvm::Value *Exn = CGF.getExceptionFromSlot();
 4106     llvm::Value *AdjustedExn = CallBeginCatch(CGF, Exn, EndCatchMightThrow);
 4146         llvm::Value *Casted = CGF.Builder.CreateBitCast(AdjustedExn, PtrTy);
 4154     llvm::Value *ExnCast =
 4163     llvm::Value *AdjustedExn = CallBeginCatch(CGF, Exn, false);
 4168       llvm::Value *CastExn =
 4192     llvm::Value *Cast = CGF.Builder.CreateBitCast(AdjustedExn, PtrTy);
 4202       llvm::Value *ExnLoad = CGF.EmitLoadOfScalar(srcLV, Loc);
 4222     llvm::Value *rawAdjustedExn = CallBeginCatch(CGF, Exn, true);
 4296     llvm::Value *Exn = CGF.getExceptionFromSlot();
 4339     llvm::Value *exn = &*fn->arg_begin();
 4360                                                    llvm::Value *Exn) {
 4369 std::pair<llvm::Value *, const CXXRecordDecl *>
tools/clang/lib/CodeGen/MicrosoftCXXABI.cpp
  137   llvm::Value *EmitTypeid(CodeGenFunction &CGF, QualType SrcRecordTy,
  144   llvm::Value *EmitDynamicCastCall(CodeGenFunction &CGF, Address Value,
  149   llvm::Value *EmitDynamicCastToVoid(CodeGenFunction &CGF, Address Value,
  158   llvm::Value *
  283   llvm::Value *getVTableAddressPointInStructor(
  298   llvm::Value *EmitVirtualDestructorCall(CodeGenFunction &CGF,
  378   llvm::Value *performThisAdjustment(CodeGenFunction &CGF, Address This,
  381   llvm::Value *performReturnAdjustment(CodeGenFunction &CGF, Address Ret,
  431                                 llvm::Value *NumElements,
  434   llvm::Value *readArrayCookieImpl(CodeGenFunction &CGF,
  573   llvm::Value *GetVBaseOffsetFromVBPtr(CodeGenFunction &CGF,
  575                                        llvm::Value *VBPtrOffset,
  576                                        llvm::Value *VBTableOffset,
  577                                        llvm::Value **VBPtr = nullptr);
  579   llvm::Value *GetVBaseOffsetFromVBPtr(CodeGenFunction &CGF,
  583                                        llvm::Value **VBPtr = nullptr) {
  585     llvm::Value *VBPOffset = llvm::ConstantInt::get(CGM.IntTy, VBPtrOffset),
  590   std::tuple<Address, llvm::Value *, const CXXRecordDecl *>
  596   llvm::Value *AdjustVirtualBase(CodeGenFunction &CGF, const Expr *E,
  598                                  llvm::Value *VirtualBaseAdjustmentOffset,
  599                                  llvm::Value *VBPtrOffset /* optional */);
  639   llvm::Value *EmitMemberPointerComparison(CodeGenFunction &CGF,
  640                                            llvm::Value *L,
  641                                            llvm::Value *R,
  645   llvm::Value *EmitMemberPointerIsNotNull(CodeGenFunction &CGF,
  646                                           llvm::Value *MemPtr,
  649   llvm::Value *
  651                                Address Base, llvm::Value *MemPtr,
  654   llvm::Value *EmitNonNullMemberPointerConversion(
  657       CastExpr::path_const_iterator PathEnd, llvm::Value *Src,
  660   llvm::Value *EmitMemberPointerConversion(CodeGenFunction &CGF,
  662                                            llvm::Value *Src) override;
  674                                   Address This, llvm::Value *&ThisPtrForCall,
  675                                   llvm::Value *MemPtr,
  758   std::pair<llvm::Value *, const CXXRecordDecl *>
  849   llvm::Value *MDThis = EmitVirtualDestructorCall(CGF, Dtor, DtorType, Ptr, DE);
  855   llvm::Value *Args[] = {
  891 std::tuple<Address, llvm::Value *, const CXXRecordDecl *>
  917   llvm::Value *Offset =
  919   llvm::Value *Ptr = CGF.Builder.CreateInBoundsGEP(Value.getPointer(), Offset);
  933                                         llvm::Value *Argument) {
  937   llvm::Value *Args[] = {Argument};
  949 llvm::Value *MicrosoftCXXABI::EmitTypeid(CodeGenFunction &CGF,
  966 llvm::Value *MicrosoftCXXABI::EmitDynamicCastCall(
  971   llvm::Value *SrcRTTI =
  973   llvm::Value *DestRTTI =
  976   llvm::Value *Offset;
  979   llvm::Value *ThisPtr = This.getPointer();
  993   llvm::Value *Args[] = {
 1000 llvm::Value *
 1013   llvm::Value *Args[] = {Value.getPointer()};
 1021 llvm::Value *MicrosoftCXXABI::GetVirtualBaseClassOffset(
 1027   llvm::Value *VBPtrOffset = llvm::ConstantInt::get(CGM.PtrDiffTy, VBPtrChars);
 1032   llvm::Value *VBTableOffset =
 1035   llvm::Value *VBPtrToNewBase =
 1114   llvm::Value *IsMostDerivedClass = getStructorImplicitParamValue(CGF);
 1117   llvm::Value *IsCompleteObject =
 1137   llvm::Value *IsMostDerivedClass = getStructorImplicitParamValue(CGF);
 1140   llvm::Value *IsCompleteObject =
 1175   llvm::Value *Int8This = nullptr;  // Initialize lazily.
 1184     llvm::Value *VBaseOffset =
 1189     llvm::Value *VtorDispValue = Builder.CreateSub(
 1197     llvm::Value *VtorDispPtr = Builder.CreateInBoundsGEP(Int8This, VBaseOffset);
 1251     llvm::Value *GVPtr =
 1424     llvm::Value *VBaseOffset =
 1426     llvm::Value *VBasePtr =
 1494   llvm::Value *This = loadIncomingCXXThis(CGF);
 1555   llvm::Value *MostDerivedArg;
 1686 llvm::Value *MicrosoftCXXABI::getVTableAddressPointInStructor(
 1822     llvm::Value *GEPIndices[] = {llvm::ConstantInt::get(CGM.Int32Ty, 0),
 1868   llvm::Value *VTable = CGF.GetVTablePtr(VPtr, Ty, MethodDecl->getParent());
 1885   llvm::Value *VFunc;
 1894     llvm::Value *VFuncPtr =
 1903 llvm::Value *MicrosoftCXXABI::EmitVirtualDestructorCall(
 1921   llvm::Value *ImplicitParam = llvm::ConstantInt::get(
 2024   llvm::Value *VTable = CGF.GetVTablePtr(
 2027   llvm::Value *VFuncPtr =
 2029   llvm::Value *Callee =
 2126 llvm::Value *MicrosoftCXXABI::performThisAdjustment(CodeGenFunction &CGF,
 2134   llvm::Value *V;
 2144     llvm::Value *VtorDisp = CGF.Builder.CreateLoad(VtorDispPtr, "vtordisp");
 2158       llvm::Value *VBPtr;
 2159       llvm::Value *VBaseOffset =
 2178 llvm::Value *
 2187   llvm::Value *V = Ret.getPointer();
 2191     llvm::Value *VBPtr;
 2192     llvm::Value *VBaseOffset =
 2226 llvm::Value *MicrosoftCXXABI::readArrayCookieImpl(CodeGenFunction &CGF,
 2236                                                llvm::Value *numElements,
 2417   llvm::Value *Guard;
 2526     llvm::Value *NeedsInit =
 2562     llvm::Value *IsUninitialized =
 2576     llvm::Value *ShouldDoInit =
 2816 llvm::Value *
 2818                                              llvm::Value *L,
 2819                                              llvm::Value *R,
 2846   llvm::Value *L0 = Builder.CreateExtractValue(L, 0, "lhs.0");
 2847   llvm::Value *R0 = Builder.CreateExtractValue(R, 0, "rhs.0");
 2848   llvm::Value *Cmp0 = Builder.CreateICmp(Eq, L0, R0, "memptr.cmp.first");
 2851   llvm::Value *Res = nullptr;
 2854     llvm::Value *LF = Builder.CreateExtractValue(L, I);
 2855     llvm::Value *RF = Builder.CreateExtractValue(R, I);
 2856     llvm::Value *Cmp = Builder.CreateICmp(Eq, LF, RF, "memptr.cmp.rest");
 2866     llvm::Value *Zero = llvm::Constant::getNullValue(L0->getType());
 2867     llvm::Value *IsZero = Builder.CreateICmp(Eq, L0, Zero, "memptr.cmp.iszero");
 2876 llvm::Value *
 2878                                             llvm::Value *MemPtr,
 2888   llvm::Value *FirstField = MemPtr;
 2891   llvm::Value *Res = Builder.CreateICmpNE(FirstField, fields[0], "memptr.cmp0");
 2900     llvm::Value *Field = Builder.CreateExtractValue(MemPtr, I);
 2901     llvm::Value *Next = Builder.CreateICmpNE(Field, fields[I], "memptr.cmp");
 2938 llvm::Value *
 2941                                          llvm::Value *VBPtrOffset,
 2942                                          llvm::Value *VBTableOffset,
 2943                                          llvm::Value **VBPtrOut) {
 2947   llvm::Value *VBPtr =
 2961   llvm::Value *VBTable = Builder.CreateAlignedLoad(VBPtr, VBPtrAlign, "vbtable");
 2964   llvm::Value *VBTableIndex = Builder.CreateAShr(
 2969   llvm::Value *VBaseOffs = Builder.CreateInBoundsGEP(VBTable, VBTableIndex);
 2977 llvm::Value *MicrosoftCXXABI::AdjustVirtualBase(
 2979     Address Base, llvm::Value *VBTableOffset, llvm::Value *VBPtrOffset) {
 2979     Address Base, llvm::Value *VBTableOffset, llvm::Value *VBPtrOffset) {
 2994     llvm::Value *IsVirtual =
 3016   llvm::Value *VBPtr = nullptr;
 3017   llvm::Value *VBaseOffs =
 3019   llvm::Value *AdjustedBase = Builder.CreateInBoundsGEP(VBPtr, VBaseOffs);
 3033 llvm::Value *MicrosoftCXXABI::EmitMemberDataPointerAddress(
 3034     CodeGenFunction &CGF, const Expr *E, Address Base, llvm::Value *MemPtr,
 3046   llvm::Value *FieldOffset = MemPtr;
 3047   llvm::Value *VirtualBaseAdjustmentOffset = nullptr;
 3048   llvm::Value *VBPtrOffset = nullptr;
 3059   llvm::Value *Addr;
 3078 llvm::Value *
 3081                                              llvm::Value *Src) {
 3111   llvm::Value *IsNotNull = EmitMemberPointerIsNotNull(CGF, Src, SrcTy);
 3129   llvm::Value *Dst = EmitNonNullMemberPointerConversion(
 3143 llvm::Value *MicrosoftCXXABI::EmitNonNullMemberPointerConversion(
 3146     CastExpr::path_const_iterator PathEnd, llvm::Value *Src,
 3156   llvm::Value *FirstField = Src;
 3157   llvm::Value *NonVirtualBaseAdjustment = getZeroInt();
 3158   llvm::Value *VirtualBaseAdjustmentOffset = getZeroInt();
 3159   llvm::Value *VBPtrOffset = getZeroInt();
 3178   llvm::Value *&NVAdjustField = IsFunc ? NonVirtualBaseAdjustment : FirstField;
 3185   llvm::Value *SrcVBIndexEqZero =
 3190       llvm::Value *UndoSrcAdjustment = Builder.CreateSelect(
 3210   llvm::Value *NVDisp;
 3220   llvm::Value *DstVBIndexEqZero = SrcVBIndexEqZero;
 3225       llvm::Value *VBIndex = Builder.CreateExactUDiv(
 3232         llvm::Value *Idxs[] = {getZeroInt(), VBIndex};
 3246     llvm::Value *DstVBPtrOffset = llvm::ConstantInt::get(
 3259       llvm::Value *DoDstAdjustment = Builder.CreateSelect(
 3268   llvm::Value *Dst;
 3325     llvm::Value *&ThisPtrForCall, llvm::Value *MemPtr,
 3325     llvm::Value *&ThisPtrForCall, llvm::Value *MemPtr,
 3339   llvm::Value *FunctionPointer = MemPtr;
 3340   llvm::Value *NonVirtualBaseAdjustment = nullptr;
 3341   llvm::Value *VirtualBaseAdjustmentOffset = nullptr;
 3342   llvm::Value *VBPtrOffset = nullptr;
 3364     llvm::Value *Ptr = Builder.CreateBitCast(ThisPtrForCall, CGF.Int8PtrTy);
 3590   llvm::Value *GEPIndices[] = {llvm::ConstantInt::get(CGM.IntTy, 0),
 3949   llvm::Value *This = getThisValue(CGF);
 3951   llvm::Value *SrcVal =
 4286   llvm::Value *Args[] = {
 4293 std::pair<llvm::Value *, const CXXRecordDecl *>
tools/clang/lib/CodeGen/TargetInfo.cpp
   62                                llvm::Value *Array,
   63                                llvm::Value *Value,
   68     llvm::Value *Cell =
  257 static llvm::Value *emitRoundPointerUpToAlignment(CodeGenFunction &CGF,
  258                                                   llvm::Value *Ptr,
  260   llvm::Value *PtrAsInt = Ptr;
  299   llvm::Value *Ptr = CGF.Builder.CreateLoad(VAListAddr, "argp.cur");
  445 llvm::Value *TargetCodeGenInfo::performAddrSpaceCast(
  446     CodeGen::CodeGenFunction &CGF, llvm::Value *Src, LangAS SrcAddr,
  618   llvm::Value *Val;
  632     llvm::Value *Addr =
 1123                                llvm::Value *Address) const override;
 1998                                                llvm::Value *Address) const {
 2001   llvm::Value *Four8 = llvm::ConstantInt::get(CGF.Int8Ty, 4);
 2012     llvm::Value *Sixteen8 = llvm::ConstantInt::get(CGF.Int8Ty, 16);
 2025     llvm::Value *Twelve8 = llvm::ConstantInt::get(CGF.Int8Ty, 12);
 2303                                llvm::Value *Address) const override {
 2304     llvm::Value *Eight8 = llvm::ConstantInt::get(CGF.Int8Ty, 8);
 2440                                llvm::Value *Address) const override {
 2441     llvm::Value *Eight8 = llvm::ConstantInt::get(CGF.Int8Ty, 8);
 3684   llvm::Value *overflow_arg_area =
 3699   llvm::Value *Res =
 3709   llvm::Value *Offset =
 3750   llvm::Value *InRegs = nullptr;
 3752   llvm::Value *gp_offset = nullptr, *fp_offset = nullptr;
 3763     llvm::Value *FitsInFP =
 3789   llvm::Value *RegSaveArea = CGF.Builder.CreateLoad(
 3806     llvm::Value *GPAddr = CGF.Builder.CreateGEP(RegSaveArea, gp_offset);
 3807     llvm::Value *FPAddr = CGF.Builder.CreateGEP(RegSaveArea, fp_offset);
 3808     llvm::Value *RegLoAddr = TyLo->isFPOrFPVectorTy() ? FPAddr : GPAddr;
 3809     llvm::Value *RegHiAddr = TyLo->isFPOrFPVectorTy() ? GPAddr : FPAddr;
 3813     llvm::Value *V = CGF.Builder.CreateAlignedLoad(
 3864     llvm::Value *V;
 3881     llvm::Value *Offset = llvm::ConstantInt::get(CGF.Int32Ty, neededInt * 8);
 3886     llvm::Value *Offset = llvm::ConstantInt::get(CGF.Int32Ty, neededSSE * 16);
 4151                                llvm::Value *Address) const override;
 4227   llvm::Value *NumRegs = Builder.CreateLoad(NumRegsAddr, "numUsedRegs");
 4235   llvm::Value *CC =
 4266     llvm::Value *RegOffset =
 4306       llvm::Value *Ptr = OverflowArea.getPointer();
 4336                                                 llvm::Value *Address) const {
 4343   llvm::Value *Four8 = llvm::ConstantInt::get(i8, 4);
 4344   llvm::Value *Eight8 = llvm::ConstantInt::get(i8, 8);
 4345   llvm::Value *Sixteen8 = llvm::ConstantInt::get(i8, 16);
 4492                                llvm::Value *Address) const override;
 4505                                llvm::Value *Address) const override;
 4892       llvm::Value *Real = CGF.Builder.CreateLoad(RealAddr, ".vareal");
 4893       llvm::Value *Imag = CGF.Builder.CreateLoad(ImagAddr, ".vaimag");
 4909                               llvm::Value *Address) {
 4916   llvm::Value *Four8 = llvm::ConstantInt::get(i8, 4);
 4917   llvm::Value *Eight8 = llvm::ConstantInt::get(i8, 8);
 4918   llvm::Value *Sixteen8 = llvm::ConstantInt::get(i8, 16);
 4957   llvm::Value *Address) const {
 4964                                                 llvm::Value *Address) const {
 5338   llvm::Value *reg_offs = nullptr;
 5363   llvm::Value *UsingStack = nullptr;
 5391   llvm::Value *NewOffset = nullptr;
 5398   llvm::Value *InRegs = nullptr;
 5412   llvm::Value *reg_top = nullptr;
 5456       llvm::Value *Elem = CGF.Builder.CreateLoad(LoadAddr);
 5484   llvm::Value *OnStackPtr = CGF.Builder.CreateLoad(stack_p, "stack");
 5513   llvm::Value *StackSizeC = CGF.Builder.getSize(StackSize);
 5514   llvm::Value *NewStack =
 5694                                llvm::Value *Address) const override {
 5695     llvm::Value *Four8 = llvm::ConstantInt::get(CGF.Int8Ty, 4);
 6716   llvm::Value *PaddedSizeV =
 6732     llvm::Value *NewOverflowArgArea =
 6758   llvm::Value *RegCount = CGF.Builder.CreateLoad(RegCountPtr, "reg_count");
 6759   llvm::Value *MaxRegsV = llvm::ConstantInt::get(IndexTy, MaxRegs);
 6760   llvm::Value *InRegs = CGF.Builder.CreateICmpULT(RegCount, MaxRegsV,
 6772   llvm::Value *ScaledRegCount =
 6774   llvm::Value *RegBase =
 6777   llvm::Value *RegOffset =
 6781   llvm::Value *RegSaveArea =
 6790   llvm::Value *One = llvm::ConstantInt::get(IndexTy, 1);
 6791   llvm::Value *NewRegCount =
 6811   llvm::Value *NewOverflowArgArea =
 7014                                llvm::Value *Address) const override;
 7282     llvm::Value *Promoted = CGF.Builder.CreateLoad(Addr);
 7287     llvm::Value *V = CGF.Builder.CreateTrunc(Promoted, IntTy);
 7310                                                llvm::Value *Address) const {
 7316   llvm::Value *Four8 = llvm::ConstantInt::get(CGF.Int8Ty, 4);
 7913                             llvm::Value *BlockLiteral) const override;
 8423                                llvm::Value *Address) const override;
 8429                                                 llvm::Value *Address) const {
 8436   llvm::Value *Four8 = llvm::ConstantInt::get(i8, 4);
 8437   llvm::Value *Eight8 = llvm::ConstantInt::get(i8, 8);
 9890                                              llvm::Value *BlockLiteral) const {
 9904   llvm::SmallVector<llvm::Value *, 2> Args;
 9923     llvm::Value *BlockLiteral) const {
 9966   auto *Cast = Builder.CreatePointerCast(BlockPtr, InvokeFT->getParamType(0));
 9967   llvm::SmallVector<llvm::Value *, 2> Args;
tools/clang/lib/CodeGen/TargetInfo.h
   98                                        llvm::Value *Address) const {
  107   virtual llvm::Value *decodeReturnAddress(CodeGen::CodeGenFunction &CGF,
  108                                            llvm::Value *Address) const {
  117   virtual llvm::Value *encodeReturnAddress(CodeGen::CodeGenFunction &CGF,
  118                                            llvm::Value *Address) const {
  255   virtual llvm::Value *performAddrSpaceCast(CodeGen::CodeGenFunction &CGF,
  256                                             llvm::Value *V, LangAS SrcAddr,
  284     typedef std::pair<llvm::Value *, StringRef> ValueTy;
  310                             llvm::Value *BlockLiteral) const;
tools/clang/unittests/CodeGen/IRMatchers.h
   61     PointerUnion3<const Value *, const Metadata *, const Type *> Entity;
   65     Query(const Value *V, unsigned N) : Entity(V), OperandNo(N) {}
   70     const T *get() const {
   71       return Entity.dyn_cast<const T *>();
   78   void push(const T *V, unsigned N = ~0) {
   85   const T *top() const { return MatchStack.back().get<T>(); }
   85   const T *top() const { return MatchStack.back().get<T>(); }
  124     if (auto V = MC.top<T>())
  128   virtual bool matchEntity(const T &M, MatcherContext &C) = 0;
  192       if (const Value *VR = StackRec.get<Value>()) {
  192       if (const Value *VR = StackRec.get<Value>()) {
  195             return C.top<Value>() == Insn->getOperand(OpNo);
  215     if (const Value *V = Ctx.top<Value>()) {
  215     if (const Value *V = Ctx.top<Value>()) {
  233 class InstructionMatcher : public EntityMatcher<Value> {
  255   bool matchEntity(const Value &V, MatcherContext &C) override {
  294 class ValueTypeMatcher : public EntityMatcher<Value> {
  302   bool matchEntity(const Value &V, MatcherContext &Ctx) override {
  374 inline std::shared_ptr<EntityMatcher<Value>>
  379 inline std::shared_ptr<EntityMatcher<Value>> MValType(const Type *T) {
tools/lldb/source/Expression/IRInterpreter.cpp
   45 static std::string PrintValue(const Value *value, bool truncate = false) {
   93   typedef std::map<const Value *, lldb::addr_t> ValueMap;
  134   std::string SummarizeValue(const Value *value) {
  164   bool EvaluateValue(lldb_private::Scalar &scalar, const Value *value,
  199   bool AssignValue(const Value *value, lldb_private::Scalar &scalar,
  233     case Value::FunctionVal:
  244     case Value::ConstantIntVal:
  250     case Value::ConstantFPVal:
  256     case Value::ConstantExprVal:
  283           SmallVector<Value *, 8> indices(op_cursor, op_end);
  298     case Value::ConstantPointerNullVal:
  409   lldb::addr_t ResolveValue(const Value *value, Module &module) {
  456   case Value::ConstantIntVal:
  457   case Value::ConstantFPVal:
  458   case Value::FunctionVal:
  460   case Value::ConstantExprVal:
  481   case Value::ConstantPointerNullVal:
  598         Value *operand = ii->getOperand(oi);
  722       Value *lhs = inst->getOperand(0);
  723       Value *rhs = inst->getOperand(1);
  889       Value *source = cast_inst->getOperand(0);
  914       Value *source = cast_inst->getOperand(0);
  943         Value *condition = br_inst->getCondition();
  992       Value *value = phi_inst->getIncomingValueForBlock(frame.m_prev_bb);
 1019       const Value *pointer_operand = gep_inst->getPointerOperand();
 1032       typedef SmallVector<Value *, 8> IndexVector;
 1035       SmallVector<Value *, 8> indices(gep_inst->idx_begin(),
 1038       SmallVector<Value *, 8> const_indices;
 1092       Value *lhs = inst->getOperand(0);
 1093       Value *rhs = inst->getOperand(1);
 1186       Value *src_operand = int_to_ptr_inst->getOperand(0);
 1217       Value *src_operand = ptr_to_int_inst->getOperand(0);
 1248       Value *src_operand = trunc_inst->getOperand(0);
 1284       const Value *pointer_operand = load_inst->getPointerOperand();
 1375       const Value *value_operand = store_inst->getValueOperand();
 1376       const Value *pointer_operand = store_inst->getPointerOperand();
 1489       const llvm::Value *val = call_inst->getCalledValue();
 1532         llvm::Value *arg_op = call_inst->getArgOperand(i);
tools/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.h
  151                         llvm::Value *value, size_t size,
  207   bool GetStructElement(const clang::NamedDecl *&decl, llvm::Value *&value,
tools/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionVariable.h
  127     llvm::Value *m_llvm_value; ///< The IR value corresponding to this variable;
tools/lldb/source/Plugins/ExpressionParser/Clang/IRDynamicChecks.cpp
   97 static std::string PrintValue(llvm::Value *V, bool truncate = false) {
  330     llvm::Value *dereferenced_ptr = nullptr;
  346     llvm::Value *arg_array[1];
  350     llvm::ArrayRef<llvm::Value *> args(arg_array, 1);
  401     llvm::Value *target_object;
  402     llvm::Value *selector;
  437     llvm::Value *arg_array[2];
  442     ArrayRef<llvm::Value *> args(arg_array, 2);
  449   static llvm::Function *GetFunction(llvm::Value *value) {
tools/lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp
   53 llvm::Value *
   56     llvm::Value *ret = m_maker(function);
   63 static llvm::Value *FindEntryInstruction(llvm::Function *function) {
   86 static std::string PrintValue(const Value *value, bool truncate = false) {
  181   for (StringMapEntry<llvm::Value *> &value_symbol : value_symbol_table) {
  209   Value *result_value = m_module->getNamedValue(result_name);
  518  Value *argument_array[5];
  526  ArrayRef<Value *> CFSCWB_arguments(argument_array, 5);
  559   for (StringMapEntry<llvm::Value *> &value_symbol : value_symbol_table) {
  563       Value *nsstring_value = value_symbol.second;
  732   for (StringMapEntry<llvm::Value *> &value_symbol : value_symbol_table) {
  758 static bool IsObjCSelectorRef(Value *value) {
  805   Value *osr_initializer_base = osr_initializer_expr->getOperand(0);
  871   Value *argument_array[1];
  878   ArrayRef<Value *> srN_arguments(argument_array, 1);
  919 static bool IsObjCClassReference(Value *value) {
  963   Value *ocr_initializer_base = ocr_initializer_expr->getOperand(0);
 1022   Value *argument_array[1];
 1029   ArrayRef<Value *> ogC_arguments(argument_array, 1);
 1184 bool IRForTarget::MaybeHandleVariable(Value *llvm_value_ptr) {
 1196       Value *s = constant_expr->getOperand(0);
 1279 bool IRForTarget::HandleSymbol(Value *symbol) {
 1300   Value *symbol_addr_ptr =
 1330 bool IRForTarget::HandleObjCClass(Value *classlist_reference) {
 1403     llvm::Value *val = call->getCalledValue();
 1478 static bool isGuardVariableRef(Value *V) {
 1589                 Value *ptr = constant_expr->getOperand(0);
 1594                 std::vector<Value *> index_vector;
 1601                   Value *operand = constant_expr->getOperand(operand_index);
 1609                 ArrayRef<Value *> indices(index_vector);
 1762     Value *value = nullptr;
tools/lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.h
  342   bool MaybeHandleVariable(llvm::Value *value);
  351   bool HandleSymbol(llvm::Value *symbol);
  361   bool HandleObjCClass(llvm::Value *classlist_reference);
  502     typedef std::function<llvm::Value *(llvm::Function *)> Maker;
  506     llvm::Value *GetValue(llvm::Function *function);
  510     typedef std::map<llvm::Function *, llvm::Value *> FunctionValueMap;
tools/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp
  165     std::vector<llvm::Value *> new_call_args(call_site.arg_begin(),
  177                           llvm::cast<llvm::Value>(return_value_alloc));
tools/lli/lli.cpp
  326   Value *ReturnVal = ConstantInt::get(ReturnTy, 0);
tools/llvm-diff/DiffConsumer.cpp
   20 static void ComputeNumbering(Function *F, DenseMap<Value*,unsigned> &Numbering){
   47 void DiffConsumer::printValue(Value *V, bool isL) {
  142 void DiffConsumer::enterContext(Value *L, Value *R) {
  142 void DiffConsumer::enterContext(Value *L, Value *R) {
tools/llvm-diff/DiffConsumer.h
   37     virtual void enterContext(Value *Left, Value *Right) = 0;
   37     virtual void enterContext(Value *Left, Value *Right) = 0;
   58       DiffContext(Value *L, Value *R)
   58       DiffContext(Value *L, Value *R)
   60       Value *L;
   61       Value *R;
   64       DenseMap<Value*,unsigned> LNumbering;
   65       DenseMap<Value*,unsigned> RNumbering;
   73     void printValue(Value *V, bool isL);
   82     void enterContext(Value *L, Value *R) override;
   82     void enterContext(Value *L, Value *R) override;
tools/llvm-diff/DiffLog.cpp
   27 Value *LogBuilder::getArgument(unsigned I) const { return Arguments[I]; }
tools/llvm-diff/DiffLog.h
   37     SmallVector<Value*, 4> Arguments;
   47     LogBuilder &operator<<(Value *V) {
   56     Value *getArgument(unsigned I) const;
tools/llvm-diff/DifferenceEngine.cpp
  117   DenseMap<Value*, Value*> Values;
  117   DenseMap<Value*, Value*> Values;
  122   DenseSet<std::pair<Value*, Value*> > TentativeValues;
  122   DenseSet<std::pair<Value*, Value*> > TentativeValues;
  371       Value *LO = L->getOperand(I), *RO = R->getOperand(I);
  457   bool equivalentAsOperands(Value *L, Value *R) {
  457   bool equivalentAsOperands(Value *L, Value *R) {
tools/llvm-diff/DifferenceEngine.h
   36       Context(DifferenceEngine &Engine, Value *L, Value *R) : Engine(Engine) {
   36       Context(DifferenceEngine &Engine, Value *L, Value *R) : Engine(Engine) {
   53       virtual bool operator()(Value *L, Value *R) = 0;
   53       virtual bool operator()(Value *L, Value *R) = 0;
tools/llvm-dis/llvm-dis.cpp
   86   void printInfoComment(const Value &V, formatted_raw_ostream &OS) override {
tools/llvm-reduce/deltas/ReduceArguments.cpp
   28       SmallVector<Value *, 8> Args;
tools/llvm-reduce/deltas/ReduceBasicBlocks.cpp
   40   Value *Address = nullptr;
tools/llvm-stress/llvm-stress.cpp
  178   using PieceTable = std::vector<Value *>;
  204   Value *getRandomVal() {
  223   Value *getRandomValue(Type *Tp) {
  226       Value *V = PT->at((index + i) % PT->size());
  256   Value *getRandomPointerValue() {
  259       Value *V = PT->at((index + i) % PT->size());
  267   Value *getRandomVectorValue() {
  270       Value *V = PT->at((index + i) % PT->size());
  345     Value *Ptr = getRandomPointerValue();
  346     Value *V = new LoadInst(Ptr, "L", BB->getTerminator());
  357     Value *Ptr = getRandomPointerValue();
  359     Value *Val = getRandomValue(Tp->getElementType());
  376     Value *Val0 = getRandomVal();
  377     Value *Val1 = getRandomValue(Val0->getType());
  483     Value *Val0 = getRandomVectorValue();
  484     Value *V = ExtractElementInst::Create(Val0,
  497     Value *Val0 = getRandomVectorValue();
  498     Value *Val1 = getRandomValue(Val0->getType());
  514     Value *V = new ShuffleVectorInst(Val0, Val1, Mask, "Shuff",
  525     Value *Val0 = getRandomVectorValue();
  526     Value *Val1 = getRandomValue(Val0->getType()->getScalarType());
  528     Value *V = InsertElementInst::Create(Val0, Val1,
  541     Value *V = getRandomVal();
  622     Value *Val0 = getRandomVal();
  623     Value *Val1 = getRandomValue(Val0->getType());
  634     Value *Cond = getRandomValue(CondTy);
  635     Value *V = SelectInst::Create(Cond, Val0, Val1, "Sl", BB->getTerminator());
  645     Value *Val0 = getRandomVal();
  646     Value *Val1 = getRandomValue(Val0->getType());
  662     Value *V = CmpInst::Create(fp ? Instruction::FCmp : Instruction::ICmp,
tools/opt/AnalysisWrappers.cpp
   43           CallSite CS(cast<Value>(UI));
tools/opt/Debugify.cpp
  176   Value *V = DVI->getValue();
tools/polly/include/polly/CodeGen/BlockGenerators.h
   47                 std::pair<AssertingVH<Value>, EscapeUserVectorTy>>;
  105   Value *getOrCreateAlloca(const MemoryAccess &Access);
  115   Value *getOrCreateAlloca(const ScopArrayInfo *Array);
  348   Value *buildContainsCondition(ScopStmt &Stmt, const isl::set &Subdomain);
  447   Value *trySynthesizeNewValue(ScopStmt &Stmt, Value *Old, ValueMapT &BBMap,
  447   Value *trySynthesizeNewValue(ScopStmt &Stmt, Value *Old, ValueMapT &BBMap,
  474   Value *getNewValue(ScopStmt &Stmt, Value *Old, ValueMapT &BBMap,
  474   Value *getNewValue(ScopStmt &Stmt, Value *Old, ValueMapT &BBMap,
  487   Value *generateLocationAccessed(ScopStmt &Stmt, MemAccInst Inst,
  506   Value *generateLocationAccessed(ScopStmt &Stmt, Loop *L, Value *Pointer,
  506   Value *generateLocationAccessed(ScopStmt &Stmt, Loop *L, Value *Pointer,
  529   Value *getImplicitAddress(MemoryAccess &Access, Loop *L, LoopToScevMapT &LTS,
  536   Value *generateArrayLoad(ScopStmt &Stmt, LoadInst *load, ValueMapT &BBMap,
  662   Value *getVectorValue(ScopStmt &Stmt, Value *Old, ValueMapT &VectorMap,
  662   Value *getVectorValue(ScopStmt &Stmt, Value *Old, ValueMapT &VectorMap,
  665   Type *getVectorPtrTy(const Value *V, int Width);
  685   Value *generateStrideOneLoad(ScopStmt &Stmt, LoadInst *Load,
  703   Value *generateStrideZeroLoad(ScopStmt &Stmt, LoadInst *Load,
  721   Value *generateUnknownStrideLoad(ScopStmt &Stmt, LoadInst *Load,
  939   Value *getExitScalar(MemoryAccess *MA, LoopToScevMapT &LTS, ValueMapT &BBMap);
tools/polly/include/polly/CodeGen/IRBuilder.h
   75       llvm::DenseMap<llvm::AssertingVH<llvm::Value>,
   76                      llvm::AssertingVH<llvm::Value>> &NewMap) {
   84   void addInterIterationAliasFreeBasePtr(llvm::Value *BasePtr);
   95   void annotateSecondLevel(llvm::Instruction *I, llvm::Value *BasePtr);
  110   llvm::MapVector<llvm::AssertingVH<llvm::Value>, llvm::MDNode *> AliasScopeMap;
  113   llvm::DenseMap<llvm::AssertingVH<llvm::Value>, llvm::MDNode *>
  124   llvm::SmallPtrSet<llvm::Value *, 4> InterIterationAliasFreeBasePtrs;
  126   llvm::DenseMap<llvm::AssertingVH<llvm::Value>, llvm::AssertingVH<llvm::Value>>
  126   llvm::DenseMap<llvm::AssertingVH<llvm::Value>, llvm::AssertingVH<llvm::Value>>
tools/polly/include/polly/CodeGen/IslExprBuilder.h
   84   typedef llvm::MapVector<isl_id *, llvm::AssertingVH<llvm::Value>> IDToValueTy;
  132   llvm::Value *create(__isl_take isl_ast_expr *Expr);
  164   llvm::Value *getOverflowState() const;
  175   llvm::Value *createAccessAddress(__isl_take isl_ast_expr *Expr);
  198   llvm::Value *OverflowState;
  210   llvm::Value *createOp(__isl_take isl_ast_expr *Expr);
  211   llvm::Value *createOpUnary(__isl_take isl_ast_expr *Expr);
  212   llvm::Value *createOpAccess(__isl_take isl_ast_expr *Expr);
  213   llvm::Value *createOpBin(__isl_take isl_ast_expr *Expr);
  214   llvm::Value *createOpNAry(__isl_take isl_ast_expr *Expr);
  215   llvm::Value *createOpSelect(__isl_take isl_ast_expr *Expr);
  216   llvm::Value *createOpICmp(__isl_take isl_ast_expr *Expr);
  217   llvm::Value *createOpBoolean(__isl_take isl_ast_expr *Expr);
  218   llvm::Value *createOpBooleanConditional(__isl_take isl_ast_expr *Expr);
  219   llvm::Value *createId(__isl_take isl_ast_expr *Expr);
  220   llvm::Value *createInt(__isl_take isl_ast_expr *Expr);
  221   llvm::Value *createOpAddressOf(__isl_take isl_ast_expr *Expr);
  231   llvm::Value *createBinOp(llvm::BinaryOperator::BinaryOps Opc,
  232                            llvm::Value *LHS, llvm::Value *RHS,
  232                            llvm::Value *LHS, llvm::Value *RHS,
  242   llvm::Value *createAdd(llvm::Value *LHS, llvm::Value *RHS,
  242   llvm::Value *createAdd(llvm::Value *LHS, llvm::Value *RHS,
  242   llvm::Value *createAdd(llvm::Value *LHS, llvm::Value *RHS,
  252   llvm::Value *createSub(llvm::Value *LHS, llvm::Value *RHS,
  252   llvm::Value *createSub(llvm::Value *LHS, llvm::Value *RHS,
  252   llvm::Value *createSub(llvm::Value *LHS, llvm::Value *RHS,
  262   llvm::Value *createMul(llvm::Value *LHS, llvm::Value *RHS,
  262   llvm::Value *createMul(llvm::Value *LHS, llvm::Value *RHS,
  262   llvm::Value *createMul(llvm::Value *LHS, llvm::Value *RHS,
tools/polly/include/polly/CodeGen/IslNodeBuilder.h
   39   SetVector<Value *> &Values;
  101   Value *createRTC(isl_ast_expr *Condition);
  180   Value *generateSCEV(const SCEV *Expr);
  254                               SetVector<Value *> &Values,
  275   Value *getLatestValue(Value *Original) const;
  275   Value *getLatestValue(Value *Original) const;
  296   Value *preloadUnconditionally(__isl_take isl_set *AccessRange,
  309   Value *preloadInvariantLoad(const MemoryAccess &MA,
  383                                  std::vector<Value *> &IVS,
  387                         std::vector<Value *> &IVS,
  429   Value *materializeNonScopLoopInductionVariable(const Loop *L);
tools/polly/include/polly/CodeGen/LoopGenerators.h
   65 Value *createLoop(Value *LowerBound, Value *UpperBound, Value *Stride,
   65 Value *createLoop(Value *LowerBound, Value *UpperBound, Value *Stride,
   65 Value *createLoop(Value *LowerBound, Value *UpperBound, Value *Stride,
   65 Value *createLoop(Value *LowerBound, Value *UpperBound, Value *Stride,
  140   Value *createParallelLoop(Value *LB, Value *UB, Value *Stride,
  140   Value *createParallelLoop(Value *LB, Value *UB, Value *Stride,
  140   Value *createParallelLoop(Value *LB, Value *UB, Value *Stride,
  140   Value *createParallelLoop(Value *LB, Value *UB, Value *Stride,
  141                             SetVector<Value *> &Values, ValueMapT &VMap,
  166   AllocaInst *storeValuesIntoStruct(SetVector<Value *> &Values);
  174   void extractValuesFromStruct(SetVector<Value *> Values, Type *Ty,
  175                                Value *Struct, ValueMapT &VMap);
  191   virtual void deployParallelExecution(Value *SubFn, Value *SubFnParam,
  191   virtual void deployParallelExecution(Value *SubFn, Value *SubFnParam,
  192                                        Value *LB, Value *UB, Value *Stride) = 0;
  192                                        Value *LB, Value *UB, Value *Stride) = 0;
  192                                        Value *LB, Value *UB, Value *Stride) = 0;
  213   virtual std::tuple<Value *, Function *>
  214   createSubFn(Value *Stride, AllocaInst *Struct, SetVector<Value *> UsedValues,
  214   createSubFn(Value *Stride, AllocaInst *Struct, SetVector<Value *> UsedValues,
tools/polly/include/polly/CodeGen/LoopGeneratorsGOMP.h
   45   void createCallSpawnThreads(Value *SubFn, Value *SubFnParam, Value *LB,
   45   void createCallSpawnThreads(Value *SubFn, Value *SubFnParam, Value *LB,
   45   void createCallSpawnThreads(Value *SubFn, Value *SubFnParam, Value *LB,
   46                               Value *UB, Value *Stride);
   46                               Value *UB, Value *Stride);
   48   void deployParallelExecution(Value *SubFn, Value *SubFnParam, Value *LB,
   48   void deployParallelExecution(Value *SubFn, Value *SubFnParam, Value *LB,
   48   void deployParallelExecution(Value *SubFn, Value *SubFnParam, Value *LB,
   49                                Value *UB, Value *Stride) override;
   49                                Value *UB, Value *Stride) override;
   53   std::tuple<Value *, Function *> createSubFn(Value *Stride, AllocaInst *Struct,
   53   std::tuple<Value *, Function *> createSubFn(Value *Stride, AllocaInst *Struct,
   54                                               SetVector<Value *> UsedValues,
   66   Value *createCallGetWorkItem(Value *LBPtr, Value *UBPtr);
   66   Value *createCallGetWorkItem(Value *LBPtr, Value *UBPtr);
   66   Value *createCallGetWorkItem(Value *LBPtr, Value *UBPtr);
tools/polly/include/polly/CodeGen/LoopGeneratorsKMP.h
   69   void createCallSpawnThreads(Value *SubFn, Value *SubFnParam, Value *LB,
   69   void createCallSpawnThreads(Value *SubFn, Value *SubFnParam, Value *LB,
   69   void createCallSpawnThreads(Value *SubFn, Value *SubFnParam, Value *LB,
   70                               Value *UB, Value *Stride);
   70                               Value *UB, Value *Stride);
   72   void deployParallelExecution(Value *SubFn, Value *SubFnParam, Value *LB,
   72   void deployParallelExecution(Value *SubFn, Value *SubFnParam, Value *LB,
   72   void deployParallelExecution(Value *SubFn, Value *SubFnParam, Value *LB,
   73                                Value *UB, Value *Stride) override;
   73                                Value *UB, Value *Stride) override;
   77   std::tuple<Value *, Function *> createSubFn(Value *Stride, AllocaInst *Struct,
   77   std::tuple<Value *, Function *> createSubFn(Value *Stride, AllocaInst *Struct,
   78                                               SetVector<Value *> UsedValues,
   84   Value *createCallGlobalThreadNum();
   91   void createCallPushNumThreads(Value *GlobalThreadID, Value *NumThreads);
   91   void createCallPushNumThreads(Value *GlobalThreadID, Value *NumThreads);
  101   void createCallDispatchInit(Value *GlobalThreadID, Value *LB, Value *UB,
  101   void createCallDispatchInit(Value *GlobalThreadID, Value *LB, Value *UB,
  101   void createCallDispatchInit(Value *GlobalThreadID, Value *LB, Value *UB,
  102                               Value *Inc, Value *ChunkSize);
  102                               Value *Inc, Value *ChunkSize);
  115   Value *createCallDispatchNext(Value *GlobalThreadID, Value *IsLastPtr,
  115   Value *createCallDispatchNext(Value *GlobalThreadID, Value *IsLastPtr,
  115   Value *createCallDispatchNext(Value *GlobalThreadID, Value *IsLastPtr,
  116                                 Value *LBPtr, Value *UBPtr, Value *StridePtr);
  116                                 Value *LBPtr, Value *UBPtr, Value *StridePtr);
  116                                 Value *LBPtr, Value *UBPtr, Value *StridePtr);
  128   void createCallStaticInit(Value *GlobalThreadID, Value *IsLastPtr,
  128   void createCallStaticInit(Value *GlobalThreadID, Value *IsLastPtr,
  129                             Value *LBPtr, Value *UBPtr, Value *StridePtr,
  129                             Value *LBPtr, Value *UBPtr, Value *StridePtr,
  129                             Value *LBPtr, Value *UBPtr, Value *StridePtr,
  130                             Value *ChunkSize);
  136   void createCallStaticFini(Value *GlobalThreadID);
tools/polly/include/polly/CodeGen/PerfMonitor.h
   52   llvm::Value *CyclesTotalStartPtr;
   55   llvm::Value *CyclesInCurrentScopPtr;
   58   llvm::Value *TripCountForCurrentScopPtr;
   61   llvm::Value *CyclesInScopsPtr;
   64   llvm::Value *CyclesInScopStartPtr;
   68   llvm::Value *AlreadyInitializedPtr;
tools/polly/include/polly/CodeGen/RuntimeDebugBuilder.h
   39   static llvm::Value *getPrintableString(PollyIRBuilder &Builder,
   66     std::vector<llvm::Value *> Vector;
   83     std::vector<llvm::Value *> Vector;
   91                             std::vector<llvm::Value *> &Values,
   92                             llvm::Value *Value, Args... args) {
  100                             std::vector<llvm::Value *> &Values,
  109                             std::vector<llvm::Value *> &Values,
  110                             llvm::ArrayRef<llvm::Value *> Array, Args... args) {
  117                             llvm::ArrayRef<llvm::Value *> Values);
  121                                 llvm::ArrayRef<llvm::Value *> Values);
  125                                 llvm::ArrayRef<llvm::Value *> Values);
  139                            llvm::ArrayRef<llvm::Value *> Values);
  162   static std::vector<llvm::Value *>
tools/polly/include/polly/CodeGen/Utils.h
   69 executeScopConditionally(Scop &S, llvm::Value *RTC, llvm::DominatorTree &DT,
tools/polly/include/polly/ScopBuilder.h
   59   SmallSetVector<Value *, 16> ArrayBasePointers;
   93   Value *findFADAllocationInvisible(MemAccInst Inst);
  119   Value *findFADAllocationVisible(MemAccInst Inst);
  172   bool buildConditionSets(BasicBlock *BB, Value *Condition, Instruction *TI,
  196       BasicBlock *BB, Value *Condition, __isl_keep isl_set *Domain,
  545                                 Value *BaseAddress, Type *ElemType, bool Affine,
  546                                 Value *AccessValue,
  565                       MemoryAccess::AccessType AccType, Value *BaseAddress,
  568                       ArrayRef<const SCEV *> Sizes, Value *AccessValue);
  588   void ensureValueRead(Value *V, ScopStmt *UserStmt);
  605                       BasicBlock *IncomingBlock, Value *IncomingValue,
tools/polly/include/polly/ScopDetection.h
  373   bool isInvariant(Value &Val, const Region &Reg, DetectionContext &Ctx) const;
  419   bool isValidSwitch(BasicBlock &BB, SwitchInst *SI, Value *Condition,
  431   bool isValidBranch(BasicBlock &BB, BranchInst *BI, Value *Condition,
tools/polly/include/polly/ScopDetectionDiagnostic.h
  131   virtual const Value *getRemarkBB() const = 0;
  213   const Value *getRemarkBB() const override;
  237   const Value *getRemarkBB() const override;
  263   const Value *getRemarkBB() const override;
  312   const Value *getRemarkBB() const override;
  337   const Value *getRemarkBB() const override;
  360   const Value *getRemarkBB() const override;
  394   const Value *getRemarkBB() const override;
  414   const Value *getRemarkBB() const override;
  434   const Value *getRemarkBB() const override;
  443   Value *BaseValue;
  446   ReportVariantBasePtr(Value *BaseValue, const Instruction *Inst)
  458   const Value *getRemarkBB() const override;
  471   const Value *BaseValue;
  475                         const Value *V)
  489   const Value *getRemarkBB() const override;
  499   const Value *BaseValue;
  502   ReportDifferentArrayElementSize(const Instruction *Inst, const Value *V)
  514   const Value *getRemarkBB() const override;
  545   const Value *getRemarkBB() const override;
  573   const Value *getRemarkBB() const override;
  601   const Value *getRemarkBB() const override;
  629   const Value *getRemarkBB() const override;
  653   const Value *getRemarkBB() const override;
  664   using PointerSnapshotTy = std::vector<const Value *>;
  692   const Value *getRemarkBB() const override;
  734   const Value *getRemarkBB() const override;
  756   const Value *getRemarkBB() const override;
  778   const Value *getRemarkBB() const override;
  800   const Value *getRemarkBB() const override;
  823   const Value *getRemarkBB() const override;
  847   const Value *getRemarkBB() const override;
tools/polly/include/polly/ScopInfo.h
  224   ScopArrayInfo(Value *BasePtr, Type *ElementType, isl::ctx IslCtx,
  259   void applyAndSetFAD(Value *FAD);
  263   Value *getFortranArrayDescriptor() const { return this->FAD; }
  266   void setBasePtr(Value *BP) { BasePtr = BP; }
  269   Value *getBasePtr() const { return BasePtr; }
  398   AssertingVH<Value> BasePtr;
  434   Value *FAD = nullptr;
  545   AssertingVH<Value> BaseAddr;
  575   SmallVector<std::pair<BasicBlock *, Value *>, 4> Incoming;
  587   AssertingVH<Value> AccessValue;
  631   AssertingVH<Value> FAD;
  721                Value *BaseAddress, Type *ElemType, bool Affine,
  723                Value *AccessValue, MemoryKind Kind);
  746   void addIncoming(BasicBlock *IncomingBlock, Value *IncomingValue) {
  758   ArrayRef<std::pair<BasicBlock *, Value *>> getIncoming() const {
  843   Value *getOriginalBaseAddr() const { return BaseAddr; }
  877   Value *getAccessValue() const { return AccessValue; }
  884   Value *tryGetValueStored() {
  921   Value *getFortranArrayDescriptor() const { return this->FAD; }
 1047   void setFortranArrayDescriptor(Value *FAD);
 1232   DenseMap<Value *, MemoryAccess *> ValueReads;
 1466   MemoryAccess *lookupValueReadOf(Value *Inst) const {
 1491   MemoryAccess *lookupInputAccessOf(Value *Val) const {
 1616   MemoryAccess *ensureValueRead(Value *V);
 1653 bool buildConditionSets(Scop &S, BasicBlock *BB, Value *Condition,
 1667 buildUnsignedConditionSets(Scop &S, BasicBlock *BB, Value *Condition,
 1802       std::map<std::pair<AssertingVH<const Value>, MemoryKind>,
 1928   DenseMap<Value *, MemoryAccess *> ValueDefAccs;
 2094   void addInvariantLoadMapping(const Value *LoadInst, Value *ClassRep) {
 2094   void addInvariantLoadMapping(const Value *LoadInst, Value *ClassRep) {
 2231   InvariantEquivClassTy *lookupInvariantEquivClass(Value *Val);
 2486   ScopArrayInfo *getOrCreateScopArrayInfo(Value *BasePtr, Type *ElementType,
 2507   const ScopArrayInfo *getScopArrayInfoOrNull(Value *BasePtr, MemoryKind Kind);
 2516   const ScopArrayInfo *getScopArrayInfo(Value *BasePtr, MemoryKind Kind);
 2522   void invalidateScopArrayInfo(Value *BasePtr, MemoryKind Kind) {
tools/polly/include/polly/Support/GICHelper.h
  236                                  const llvm::Value *Val, long Number,
tools/polly/include/polly/Support/SCEVValidator.h
   54                 llvm::SetVector<llvm::Value *> &Values);
   72 bool isAffineConstraint(llvm::Value *V, const llvm::Region *R,
  105 llvm::Value *getUniqueNonErrorValue(llvm::PHINode *PHI, llvm::Region *R,
tools/polly/include/polly/Support/ScopHelper.h
   38 using ValueMapT = llvm::DenseMap<llvm::AssertingVH<llvm::Value>,
   39                                  llvm::AssertingVH<llvm::Value>>;
   89   static bool isa(const llvm::Value &V) {
   93   static bool isa(const llvm::Value *V) {
   97   static MemAccInst cast(llvm::Value &V) {
  100   static MemAccInst cast(llvm::Value *V) {
  103   static MemAccInst cast_or_null(llvm::Value &V) {
  106   static MemAccInst cast_or_null(llvm::Value *V) {
  111   static MemAccInst dyn_cast(llvm::Value &V) {
  116   static MemAccInst dyn_cast(llvm::Value *V) {
  170   llvm::Value *getValueOperand() const {
  181   llvm::Value *getPointerOperand() const {
  347 llvm::Value *expandCodeFor(Scop &S, llvm::ScalarEvolution &SE,
  381 llvm::Value *getConditionFromTerminator(llvm::Instruction *TI);
  420 bool isIgnoredIntrinsic(const llvm::Value *V);
  435 bool canSynthesize(const llvm::Value *V, const Scop &S,
tools/polly/include/polly/Support/VirtualInstruction.h
   70   Value *Val;
   84   VirtualUse(ScopStmt *User, Value *Val, UseKind Kind, const SCEV *ScevExpr,
  121                            Value *Val, bool Virtual);
  123   static VirtualUse create(ScopStmt *UserStmt, Loop *UserScope, Value *Val,
  140   llvm::Value *getValue() const { return Val; }
tools/polly/include/polly/ZoneAlgo.h
  109   llvm::DenseMap<llvm::Value *, isl::id> ValueIds;
  298   isl::id makeValueId(llvm::Value *V);
  301   isl::space makeValueSpace(llvm::Value *V);
  304   isl::set makeValueSet(llvm::Value *V);
  334   isl::map makeValInst(llvm::Value *Val, ScopStmt *UserStmt, llvm::Loop *Scope,
  342   isl::union_map makeNormalizedValInst(llvm::Value *Val, ScopStmt *UserStmt,
tools/polly/lib/Analysis/ScopBuilder.cpp
  361     BasicBlock *BB, Value *Condition, __isl_keep isl_set *Domain,
  394   Value *Condition = getConditionFromTerminator(SI);
  428     BasicBlock *BB, Value *Condition, Instruction *TI, Loop *L,
  576   Value *Condition = getConditionFromTerminator(TI);
 1095     Value *Op = PHI->getIncomingValue(u);
 1328 bool isFortranArrayDescriptor(Value *V) {
 1385 Value *ScopBuilder::findFADAllocationVisible(MemAccInst Inst) {
 1394   Value *Address = Inst.getPointerOperand();
 1399     Value *TypedMem = Slot->getPointerOperand();
 1410   auto *MallocMem = Bitcast->getOperand(0);
 1441     Value *Descriptor = dyn_cast<Value>(DescriptorGEP->getPointerOperand());
 1441     Value *Descriptor = dyn_cast<Value>(DescriptorGEP->getPointerOperand());
 1455 Value *ScopBuilder::findFADAllocationInvisible(MemAccInst Inst) {
 1460   Value *Slot = Inst.getPointerOperand();
 1480   Value *Descriptor = dyn_cast<Value>(BitcastOperator->getOperand(0));
 1480   Value *Descriptor = dyn_cast<Value>(BitcastOperator->getOperand(0));
 1536     auto *Val = CI->getArgOperand(0);
 1601   Value *Val = Inst.getValueOperand();
 1603   Value *Address = Inst.getPointerOperand();
 1612     auto *Src = BitCast->getOperand(0);
 1633   auto *BasePtr = GEP->getOperand(0);
 1677   Value *Address = Inst.getPointerOperand();
 1678   Value *Val = Inst.getValueOperand();
 1747   auto *DestPtrVal = MemIntr->getDest();
 1772   auto *SrcPtrVal = MemTrans->getSource();
 1843   Value *Address = Inst.getPointerOperand();
 1844   Value *Val = Inst.getValueOperand();
 2264     Value *BaseAddress, Type *ElementType, bool Affine, Value *AccessValue,
 2264     Value *BaseAddress, Type *ElementType, bool Affine, Value *AccessValue,
 2302                                  Value *BaseAddress, Type *ElementType,
 2306                                  Value *AccessValue) {
 2315   if (Value *FAD = findFADAllocationInvisible(MemAccInst))
 2317   else if (Value *FAD = findFADAllocationVisible(MemAccInst))
 2451       Value *FAD = MemAcc->getFortranArrayDescriptor();
 2536 void ScopBuilder::ensureValueRead(Value *V, ScopStmt *UserStmt) {
 2583                                  Value *IncomingValue, bool IsExitBlock) {
 2807   Value *BaseAddr = MA->getOriginalBaseAddr();
 2923 static bool isAParameter(llvm::Value *maybeParam, const Function &F) {
 2996       SetVector<Value *> Values;
 3354   DenseMap<Value *, MemoryAccess *> PtrToAcc;
 3654     for (auto *BP : ArrayBasePointers)
tools/polly/lib/Analysis/ScopDetection.cpp
  488   SetVector<Value *> Values;
  493   SmallPtrSet<Value *, 8> PtrVals;
  494   for (auto *V : Values) {
  509     auto *BasePtrVal = BasePtr->getValue();
  511       for (auto *PtrVal : PtrVals)
  533                                   Value *Condition, bool IsLoopBranch,
  557                                   Value *Condition, bool IsLoopBranch,
  566       Value *Op0 = BinOp->getOperand(0);
  567       Value *Op1 = BinOp->getOperand(1);
  650   Value *Condition = getConditionFromTerminator(TI);
  786 bool ScopDetection::isInvariant(Value &Val, const Region &Reg,
  914   Value *BaseValue = BasePointer->getValue();
  924       auto *V = dyn_cast<Value>(Unknown->getValue());
  924       auto *V = dyn_cast<Value>(Unknown->getValue());
  969   Value *BaseValue = BasePointer->getValue();
 1061   auto *BV = BP->getValue();
 1182   Value *Ptr = Inst.getPointerOperand();
tools/polly/lib/Analysis/ScopDetectionDiagnostic.cpp
   87 template <typename T> std::string operator+(Twine LHS, const T &RHS) {
  204 const Value *ReportInvalidTerminator::getRemarkBB() const { return BB; }
  225 const Value *ReportUnreachableInExit::getRemarkBB() const { return BB; }
  249 const Value *ReportIrreducibleRegion::getRemarkBB() const {
  283 const Value *ReportUndefCond::getRemarkBB() const { return BB; }
  298 const Value *ReportInvalidCond::getRemarkBB() const { return BB; }
  314 const Value *ReportUndefOperand::getRemarkBB() const { return BB; }
  329 const Value *ReportNonAffBranch::getRemarkBB() const { return BB; }
  345 const Value *ReportNoBasePtr::getRemarkBB() const { return Inst->getParent(); }
  358 const Value *ReportUndefBasePtr::getRemarkBB() const {
  377 const Value *ReportVariantBasePtr::getRemarkBB() const {
  400 const Value *ReportDifferentArrayElementSize::getRemarkBB() const {
  427 const Value *ReportNonAffineAccess::getRemarkBB() const {
  454 const Value *ReportLoopBound::getRemarkBB() const { return L->getHeader(); }
  478 const Value *ReportLoopHasNoExit::getRemarkBB() const { return L->getHeader(); }
  501 const Value *ReportLoopHasMultipleExits::getRemarkBB() const {
  526 const Value *ReportLoopOnlySomeLatches::getRemarkBB() const {
  554 const Value *ReportFuncCall::getRemarkBB() const { return Inst->getParent(); }
  583 const Value *ReportNonSimpleMemoryAccess::getRemarkBB() const {
  623     const Value *V = *PI;
  646 const Value *ReportAlias::getRemarkBB() const { return Inst->getParent(); }
  684 const Value *ReportIntToPtr::getRemarkBB() const {
  708 const Value *ReportAlloca::getRemarkBB() const { return Inst->getParent(); }
  730 const Value *ReportUnknownInst::getRemarkBB() const {
  754 const Value *ReportEntry::getRemarkBB() const { return BB; }
  780 const Value *ReportUnprofitable::getRemarkBB() const { return R->getEntry(); }
tools/polly/lib/Analysis/ScopInfo.cpp
  200 static const ScopArrayInfo *identifyBasePtrOriginSAI(Scop *S, Value *BasePtr) {
  223 ScopArrayInfo::ScopArrayInfo(Value *BasePtr, Type *ElementType, isl::ctx Ctx,
  296 void ScopArrayInfo::applyAndSetFAD(Value *FAD) {
  734   Value *Ptr = MAI.getPointerOperand();
  886                            AccessType AccType, Value *BaseAddress,
  889                            ArrayRef<const SCEV *> Sizes, Value *AccessValue,
  945 void MemoryAccess::setFortranArrayDescriptor(Value *FAD) { this->FAD = FAD; }
 1156     Value *AccessVal = Access->getAccessValue();
 1356 MemoryAccess *ScopStmt::ensureValueRead(Value *V) {
 1411     if (auto *NewValue = VMap.lookup(E->getValue()))
 1498     Value *Val = ValueParameter->getValue();
 1510         auto *LoadOrigin = LI->getPointerOperand()->stripInBoundsOffsets();
 1794 InvariantEquivClassTy *Scop::lookupInvariantEquivClass(Value *Val) {
 1799   if (Value *Rep = InvEquivClassVMap.lookup(LInst))
 1817 ScopArrayInfo *Scop::getOrCreateScopArrayInfo(Value *BasePtr, Type *ElementType,
 1858 const ScopArrayInfo *Scop::getScopArrayInfoOrNull(Value *BasePtr,
 1864 const ScopArrayInfo *Scop::getScopArrayInfo(Value *BasePtr, MemoryKind Kind) {
 1986   Value *PointerBase = MA->getOriginalBaseAddr();
tools/polly/lib/CodeGen/BlockGenerators.cpp
   64 Value *BlockGenerator::trySynthesizeNewValue(ScopStmt &Stmt, Value *Old,
   64 Value *BlockGenerator::trySynthesizeNewValue(ScopStmt &Stmt, Value *Old,
   89   Value *Expanded =
   97 Value *BlockGenerator::getNewValue(ScopStmt &Stmt, Value *Old, ValueMapT &BBMap,
   97 Value *BlockGenerator::getNewValue(ScopStmt &Stmt, Value *Old, ValueMapT &BBMap,
  101     Value *New = GlobalMap.lookup(Old);
  115     if (Value *NewRemapped = GlobalMap.lookup(New))
  126   Value *New = nullptr;
  225   for (Value *OldOperand : Inst->operands()) {
  226     Value *NewOperand =
  255 Value *
  266 Value *BlockGenerator::generateLocationAccessed(
  267     ScopStmt &Stmt, Loop *L, Value *Pointer, ValueMapT &BBMap,
  294 Value *
  311 Value *BlockGenerator::generateArrayLoad(ScopStmt &Stmt, LoadInst *Load,
  314   if (Value *PreloadLoad = GlobalMap.lookup(Load))
  317   Value *NewPointer =
  319   Value *ScalarLoad = Builder.CreateAlignedLoad(
  337     Value *NewPointer =
  339     Value *ValueOperand = getNewValue(Stmt, Store->getValueOperand(), BBMap,
  369     Value *NewLoad = generateArrayLoad(Stmt, Load, BBMap, LTS, NewAccesses);
  469 Value *BlockGenerator::getOrCreateAlloca(const MemoryAccess &Access) {
  475 Value *BlockGenerator::getOrCreateAlloca(const ScopArrayInfo *Array) {
  499     if (Value *NewAddr = GlobalMap.lookup(&*Addr))
  505   Value *ScalarBase = Array->getBasePtr();
  550   auto *ScalarAddr = getOrCreateAlloca(Array);
  571     auto *Address =
  582 Value *BlockGenerator::buildContainsCondition(ScopStmt &Stmt,
  599   Value *IsInSetExpr = ExprBuilder->create(IsInSet.copy());
  622   Value *Cond = buildContainsCondition(Stmt, Subdomain);
  653 static std::string getInstName(Value *Val) {
  681   SmallVector<llvm::Value *, 8> Values;
  718         for (Value *Op : Inst->operand_values()) {
  773           Value *Val = MA->getAccessValue();
  836       Value *ScalarValue = PHI->getIncomingValue(Idx);
  877     Value *ScalarAddr = EscapeMappingValue.first;
  880     Value *EscapeInstReload =
  943     auto *Val = SAI->getBasePtr();
  960     Value *ScalarAddr = getOrCreateAlloca(SAI);
  961     Value *Reload = Builder.CreateLoad(ScalarAddr, Name + ".ph.final_reload");
  963     Value *OriginalValue = PHI->getIncomingValueForBlock(MergeBB);
 1018 Value *VectorBlockGenerator::getVectorValue(ScopStmt &Stmt, Value *Old,
 1018 Value *VectorBlockGenerator::getVectorValue(ScopStmt &Stmt, Value *Old,
 1022   if (Value *NewValue = VectorMap.lookup(Old))
 1027   Value *Vector = UndefValue::get(VectorType::get(Old->getType(), Width));
 1039 Type *VectorBlockGenerator::getVectorPtrTy(const Value *Val, int Width) {
 1049 Value *VectorBlockGenerator::generateStrideOneLoad(
 1053   auto *Pointer = Load->getPointerOperand();
 1057   Value *NewPointer = generateLocationAccessed(Stmt, Load, ScalarMaps[Offset],
 1059   Value *VectorPtr =
 1071     Value *RevVecLoad = Builder.CreateShuffleVector(
 1079 Value *VectorBlockGenerator::generateStrideZeroLoad(
 1082   auto *Pointer = Load->getPointerOperand();
 1084   Value *NewPointer =
 1086   Value *VectorPtr = Builder.CreateBitCast(NewPointer, VectorPtrType,
 1097   Value *VectorLoad = Builder.CreateShuffleVector(
 1102 Value *VectorBlockGenerator::generateUnknownStrideLoad(
 1106   auto *Pointer = Load->getPointerOperand();
 1110   Value *Vector = UndefValue::get(VectorType);
 1113     Value *NewPointer = generateLocationAccessed(Stmt, Load, ScalarMaps[i],
 1115     Value *ScalarLoad =
 1127   if (Value *PreloadLoad = GlobalMap.lookup(Load)) {
 1146   Value *NewLoad;
 1163   Value *NewOperand = getVectorValue(Stmt, Inst->getOperand(0), VectorMap,
 1177   Value *OpZero = Inst->getOperand(0);
 1178   Value *OpOne = Inst->getOperand(1);
 1180   Value *NewOpZero, *NewOpOne;
 1184   Value *NewInst = Builder.CreateBinOp(Inst->getOpcode(), NewOpZero, NewOpOne,
 1194   auto *Pointer = Store->getPointerOperand();
 1195   Value *Vector = getVectorValue(Stmt, Store->getValueOperand(), VectorMap,
 1204     Value *NewPointer = generateLocationAccessed(Stmt, Store, ScalarMaps[0],
 1207     Value *VectorPtr =
 1215       Value *Scalar = Builder.CreateExtractElement(Vector, Builder.getInt32(i));
 1216       Value *NewPointer = generateLocationAccessed(Stmt, Store, ScalarMaps[i],
 1225   for (Value *Operand : Inst->operands())
 1237   for (Value *Operand : Inst->operands()) {
 1244     Value *NewVector = VecOp->second;
 1280   Value *Vector = UndefValue::get(VectorType);
 1340     auto *Address = getOrCreateAlloca(*MA);
 1342     Value *VectorPtr = Builder.CreateBitCast(Address, VectorPtrType,
 1348     Value *VectorVal = Builder.CreateShuffleVector(
 1586     Value *NullVal = Builder.getInt32(0);
 1653     Value *OrigIncomingValue = Pair.second;
 1654     Value *NewIncomingValue =
 1662 Value *RegionGenerator::getExitScalar(MemoryAccess *MA, LoopToScevMapT &LTS,
 1676       Value *OldVal = Incoming[0].second;
 1685   Value *OldVal = MA->getAccessValue();
 1703   SmallDenseMap<MemoryAccess *, Value *> NewExitScalars;
 1708     Value *NewVal = getExitScalar(MA, LTS, BBMap);
 1720           Value *NewVal = NewExitScalars.lookup(MA);
 1722           Value *Address = getImplicitAddress(*MA, getLoopForStmt(Stmt), LTS,
 1756   Value *OpCopy = nullptr;
 1759     Value *Op = PHI->getIncomingValueForBlock(IncomingBB);
tools/polly/lib/CodeGen/CodeGeneration.cpp
  270     Value *RTC = NodeBuilder.createRTC(AI.getRunCondition());
tools/polly/lib/CodeGen/IRBuilder.cpp
  151 static llvm::Value *getMemAccInstPointerOperand(Instruction *Inst) {
  160                                         llvm::Value *BasePtr) {
  161   Value *Ptr = getMemAccInstPointerOperand(Inst);
  210   auto *Ptr = getMemAccInstPointerOperand(Inst);
  221   auto *BasePtr = SU->getValue();
  251 void ScopAnnotator::addInterIterationAliasFreeBasePtr(llvm::Value *BasePtr) {
tools/polly/lib/CodeGen/IslExprBuilder.cpp
   64 Value *IslExprBuilder::getOverflowState() const {
   99 Value *IslExprBuilder::createBinOp(BinaryOperator::BinaryOps Opc, Value *LHS,
   99 Value *IslExprBuilder::createBinOp(BinaryOperator::BinaryOps Opc, Value *LHS,
  100                                    Value *RHS, const Twine &Name) {
  137   auto *OverflowFlag =
  152 Value *IslExprBuilder::createAdd(Value *LHS, Value *RHS, const Twine &Name) {
  152 Value *IslExprBuilder::createAdd(Value *LHS, Value *RHS, const Twine &Name) {
  152 Value *IslExprBuilder::createAdd(Value *LHS, Value *RHS, const Twine &Name) {
  156 Value *IslExprBuilder::createSub(Value *LHS, Value *RHS, const Twine &Name) {
  156 Value *IslExprBuilder::createSub(Value *LHS, Value *RHS, const Twine &Name) {
  156 Value *IslExprBuilder::createSub(Value *LHS, Value *RHS, const Twine &Name) {
  160 Value *IslExprBuilder::createMul(Value *LHS, Value *RHS, const Twine &Name) {
  160 Value *IslExprBuilder::createMul(Value *LHS, Value *RHS, const Twine &Name) {
  160 Value *IslExprBuilder::createMul(Value *LHS, Value *RHS, const Twine &Name) {
  173 Value *IslExprBuilder::createOpUnary(__isl_take isl_ast_expr *Expr) {
  177   Value *V;
  192 Value *IslExprBuilder::createOpNAry(__isl_take isl_ast_expr *Expr) {
  210   Value *V = create(isl_ast_expr_get_op_arg(Expr, 0));
  213     Value *OpV = create(isl_ast_expr_get_op_arg(Expr, i));
  222     Value *Cmp = Builder.CreateICmp(Pred, V, OpV);
  234 Value *IslExprBuilder::createAccessAddress(isl_ast_expr *Expr) {
  242   Value *Base, *IndexOp, *Access;
  289     Value *NextIndex = create(isl_ast_expr_get_op_arg(Expr, u));
  318     Value *DimSize =
  342 Value *IslExprBuilder::createOpAccess(isl_ast_expr *Expr) {
  343   Value *Addr = createAccessAddress(Expr);
  348 Value *IslExprBuilder::createOpBin(__isl_take isl_ast_expr *Expr) {
  349   Value *LHS, *RHS, *Res;
  428     Value *One = ConstantInt::get(MaxType, 1);
  429     Value *Zero = ConstantInt::get(MaxType, 0);
  430     Value *Sum1 = createSub(LHS, RHS, "pexp.fdiv_q.0");
  431     Value *Sum2 = createAdd(Sum1, One, "pexp.fdiv_q.1");
  432     Value *isNegative = Builder.CreateICmpSLT(LHS, Zero, "pexp.fdiv_q.2");
  433     Value *Dividend =
  455 Value *IslExprBuilder::createOpSelect(__isl_take isl_ast_expr *Expr) {
  458   Value *LHS, *RHS, *Cond;
  482 Value *IslExprBuilder::createOpICmp(__isl_take isl_ast_expr *Expr) {
  486   Value *LHS, *RHS, *Res;
  542 Value *IslExprBuilder::createOpBoolean(__isl_take isl_ast_expr *Expr) {
  546   Value *LHS, *RHS, *Res;
  589 Value *
  594   Value *LHS, *RHS;
  648 Value *IslExprBuilder::createOp(__isl_take isl_ast_expr *Expr) {
  694 Value *IslExprBuilder::createOpAddressOf(__isl_take isl_ast_expr *Expr) {
  705   Value *V = createAccessAddress(Op);
  712 Value *IslExprBuilder::createId(__isl_take isl_ast_expr *Expr) {
  717   Value *V;
  746 Value *IslExprBuilder::createInt(__isl_take isl_ast_expr *Expr) {
  750   Value *V;
  770 Value *IslExprBuilder::create(__isl_take isl_ast_expr *Expr) {
tools/polly/lib/CodeGen/IslNodeBuilder.cpp
  213       if (Value *InvariantLoad = References.GlobalMap.lookup(&Inst))
  216     for (Value *SrcVal : Inst.operands()) {
  221       } else if (Value *NewVal = References.GlobalMap.lookup(SrcVal))
  250       auto *BasePtr = Access->getLatestScopArrayInfo()->getBasePtr();
  309                                             SetVector<Value *> &Values,
  354   SetVector<Value *> ReplacedValues;
  355   for (Value *V : Values) {
  362   SmallPtrSet<Value *, 5> Inserted;
  377 Value *IslNodeBuilder::getLatestValue(Value *Original) const {
  377 Value *IslNodeBuilder::getLatestValue(Value *Original) const {
  385                                       std::vector<Value *> &IVS,
  426     auto *BasePtr = static_cast<Value *>(isl_id_get_user(Id));
  441   Value *ValueLB = ExprBuilder.create(Init);
  442   Value *ValueInc = ExprBuilder.create(Inc);
  453   std::vector<Value *> IVS(VectorWidth);
  515   Value *ValueLB, *ValueUB, *ValueInc;
  518   Value *IV;
  621   Value *ValueLB, *ValueUB, *ValueInc;
  623   Value *IV;
  665   SetVector<Value *> SubtreeValues;
  675     Value *LoopInductionVar = materializeNonScopLoopInductionVariable(L);
  810   Value *Predicate = ExprBuilder.create(Cond);
  912     Value *V;
  925     std::vector<LoopToScevMapT> &VLTS, std::vector<Value *> &IVS,
  929   Value *OldValue = IDToValue[IteratorID];
  930   for (Value *IV : IVS) {
  952   auto *LoadValue = ExprBuilder.create(AccessExpr);
  955   auto *StoreAddr = ExprBuilder.createAccessAddress(AccessExpr);
  959 Value *IslNodeBuilder::materializeNonScopLoopInductionVariable(const Loop *L) {
  965   Value *V = generateSCEV(OuterLIV);
 1039     Value *V = nullptr;
 1045     SetVector<Value *> Values;
 1047     for (auto *Val : Values) {
 1133 static Value *buildFADOutermostDimensionLoad(Value *GlobalDescriptor,
 1133 static Value *buildFADOutermostDimensionLoad(Value *GlobalDescriptor,
 1138   Value *endIdx[4] = {Builder.getInt64(0), Builder.getInt32(3),
 1140   Value *endPtr = Builder.CreateInBoundsGEP(GlobalDescriptor, endIdx,
 1142   Value *end = Builder.CreateLoad(endPtr, ArrayName + "_end");
 1144   Value *beginIdx[4] = {Builder.getInt64(0), Builder.getInt32(3),
 1146   Value *beginPtr = Builder.CreateInBoundsGEP(GlobalDescriptor, beginIdx,
 1148   Value *begin = Builder.CreateLoad(beginPtr, ArrayName + "_begin");
 1150   Value *size =
 1167     Value *FAD = Array->getFortranArrayDescriptor();
 1186     Value *FinalValue =
 1196 Value *IslNodeBuilder::preloadUnconditionally(isl_set *AccessRange,
 1203   auto *AddressValue = ExprBuilder.create(Address);
 1204   Value *PreloadVal;
 1210   auto *Ptr = AddressValue;
 1227 Value *IslNodeBuilder::preloadInvariantLoad(const MemoryAccess &MA,
 1247   Value *PreloadVal = nullptr;
 1266   Value *Cond = ExprBuilder.create(DomainCond);
 1267   Value *OverflowHappened = Builder.CreateNot(ExprBuilder.getOverflowState(),
 1299   Value *PreAccInst = preloadUnconditionally(AccessRange, Build, AccInst);
 1362     SetVector<Value *> Values;
 1364     for (auto *Val : Values) {
 1380   Value *PreloadVal = preloadInvariantLoad(*MA, ExecutionCtx.copy());
 1407     Value *BasePtr = DerivedSAI->getBasePtr();
 1553 Value *IslNodeBuilder::generateSCEV(const SCEV *Expr) {
 1577 Value *IslNodeBuilder::createRTC(isl_ast_expr *Condition) {
 1591   Value *RTC = ExprBuilder.create(Condition);
 1594   Value *OverflowHappened =
tools/polly/lib/CodeGen/LoopGenerators.cpp
   82 Value *polly::createLoop(Value *LB, Value *UB, Value *Stride,
   82 Value *polly::createLoop(Value *LB, Value *UB, Value *Stride,
   82 Value *polly::createLoop(Value *LB, Value *UB, Value *Stride,
   82 Value *polly::createLoop(Value *LB, Value *UB, Value *Stride,
  135     Value *LoopGuard;
  155   Value *IncrementedIV = Builder.CreateNSWAdd(IV, Stride, "polly.indvar_next");
  156   Value *LoopCondition =
  175 Value *ParallelLoopGenerator::createParallelLoop(
  176     Value *LB, Value *UB, Value *Stride, SetVector<Value *> &UsedValues,
  176     Value *LB, Value *UB, Value *Stride, SetVector<Value *> &UsedValues,
  176     Value *LB, Value *UB, Value *Stride, SetVector<Value *> &UsedValues,
  176     Value *LB, Value *UB, Value *Stride, SetVector<Value *> &UsedValues,
  182   Value *IV;
  188   Value *SubFnParam = Builder.CreateBitCast(Struct, Builder.getInt8PtrTy(),
  218 ParallelLoopGenerator::storeValuesIntoStruct(SetVector<Value *> &Values) {
  221   for (Value *V : Values)
  236     Value *Address = Builder.CreateStructGEP(Ty, Struct, i);
  245     SetVector<Value *> OldValues, Type *Ty, Value *Struct, ValueMapT &Map) {
  245     SetVector<Value *> OldValues, Type *Ty, Value *Struct, ValueMapT &Map) {
  247     Value *Address = Builder.CreateStructGEP(Ty, Struct, i);
  248     Value *NewValue = Builder.CreateLoad(Address);
tools/polly/lib/CodeGen/LoopGeneratorsGOMP.cpp
   20 void ParallelLoopGeneratorGOMP::createCallSpawnThreads(Value *SubFn,
   21                                                        Value *SubFnParam,
   22                                                        Value *LB, Value *UB,
   22                                                        Value *LB, Value *UB,
   23                                                        Value *Stride) {
   44   Value *Args[] = {SubFn, SubFnParam, Builder.getInt32(PollyNumThreads),
   50 void ParallelLoopGeneratorGOMP::deployParallelExecution(Value *SubFn,
   51                                                         Value *SubFnParam,
   52                                                         Value *LB, Value *UB,
   52                                                         Value *LB, Value *UB,
   53                                                         Value *Stride) {
   90 std::tuple<Value *, Function *>
   91 ParallelLoopGeneratorGOMP::createSubFn(Value *Stride, AllocaInst *StructData,
   92                                        SetVector<Value *> Data,
  127   Value *LBPtr = Builder.CreateAlloca(LongType, nullptr, "polly.par.LBPtr");
  128   Value *UBPtr = Builder.CreateAlloca(LongType, nullptr, "polly.par.UBPtr");
  129   Value *UserContext = Builder.CreateBitCast(
  138   Value *Next = createCallGetWorkItem(LBPtr, UBPtr);
  139   Value *HasNextSchedule = Builder.CreateTrunc(
  145   Value *LB = Builder.CreateLoad(LBPtr, "polly.par.LB");
  146   Value *UB = Builder.CreateLoad(UBPtr, "polly.par.UB");
  156   Value *IV =
  172 Value *ParallelLoopGeneratorGOMP::createCallGetWorkItem(Value *LBPtr,
  172 Value *ParallelLoopGeneratorGOMP::createCallGetWorkItem(Value *LBPtr,
  173                                                         Value *UBPtr) {
  186   Value *Args[] = {LBPtr, UBPtr};
  187   Value *Return = Builder.CreateCall(F, Args);
tools/polly/lib/CodeGen/LoopGeneratorsKMP.cpp
   20 void ParallelLoopGeneratorKMP::createCallSpawnThreads(Value *SubFn,
   21                                                       Value *SubFnParam,
   22                                                       Value *LB, Value *UB,
   22                                                       Value *LB, Value *UB,
   23                                                       Value *Stride) {
   48   Value *Task = Builder.CreatePointerBitCastOrAddrSpaceCast(
   51   Value *Args[] = {SourceLocationInfo,
   62 void ParallelLoopGeneratorKMP::deployParallelExecution(Value *SubFn,
   63                                                        Value *SubFnParam,
   64                                                        Value *LB, Value *UB,
   64                                                        Value *LB, Value *UB,
   65                                                        Value *Stride) {
   68     Value *GlobalThreadID = createCallGlobalThreadNum();
  126 std::tuple<Value *, Function *>
  127 ParallelLoopGeneratorKMP::createSubFn(Value *StrideNotUsed,
  129                                       SetVector<Value *> Data, ValueMapT &Map) {
  151   Value *LBPtr = Builder.CreateAlloca(LongType, nullptr, "polly.par.LBPtr");
  152   Value *UBPtr = Builder.CreateAlloca(LongType, nullptr, "polly.par.UBPtr");
  153   Value *IsLastPtr = Builder.CreateAlloca(Builder.getInt32Ty(), nullptr,
  155   Value *StridePtr =
  161   Value *IDPtr = &*AI;
  165   Value *LB = &*AI;
  167   Value *UB = &*AI;
  169   Value *Stride = &*AI;
  171   Value *Shared = &*AI;
  173   Value *UserContext = Builder.CreateBitCast(Shared, StructData->getType(),
  180   Value *ID =
  190   Value *AdjustedUB = Builder.CreateAdd(UB, ConstantInt::get(LongType, -1),
  193   Value *ChunkSize =
  204       Value *HasWork =
  206       Value *HasIteration =
  232       Value *AdjUBOutOfBounds =
  239       Value *HasIteration = Builder.CreateICmp(
  254   Value *IV = createLoop(LB, UB, Stride, Builder, LI, DT, AfterBB,
  272 Value *ParallelLoopGeneratorKMP::createCallGlobalThreadNum() {
  290 void ParallelLoopGeneratorKMP::createCallPushNumThreads(Value *GlobalThreadID,
  291                                                         Value *NumThreads) {
  307   Value *Args[] = {SourceLocationInfo, GlobalThreadID, NumThreads};
  312 void ParallelLoopGeneratorKMP::createCallStaticInit(Value *GlobalThreadID,
  313                                                     Value *IsLastPtr,
  314                                                     Value *LBPtr, Value *UBPtr,
  314                                                     Value *LBPtr, Value *UBPtr,
  315                                                     Value *StridePtr,
  316                                                     Value *ChunkSize) {
  342   Value *Args[] = {
  356 void ParallelLoopGeneratorKMP::createCallStaticFini(Value *GlobalThreadID) {
  369   Value *Args[] = {SourceLocationInfo, GlobalThreadID};
  374 void ParallelLoopGeneratorKMP::createCallDispatchInit(Value *GlobalThreadID,
  375                                                       Value *LB, Value *UB,
  375                                                       Value *LB, Value *UB,
  376                                                       Value *Inc,
  377                                                       Value *ChunkSize) {
  401   Value *Args[] = {
  413 Value *ParallelLoopGeneratorKMP::createCallDispatchNext(Value *GlobalThreadID,
  413 Value *ParallelLoopGeneratorKMP::createCallDispatchNext(Value *GlobalThreadID,
  414                                                         Value *IsLastPtr,
  415                                                         Value *LBPtr,
  416                                                         Value *UBPtr,
  417                                                         Value *StridePtr) {
  438   Value *Args[] = {SourceLocationInfo, GlobalThreadID, IsLastPtr, LBPtr, UBPtr,
tools/polly/lib/CodeGen/PerfMonitor.cpp
   42     for (Value *X : Array->operand_values())
   73                               Constant *InitialValue, Value **Location) {
  142   Value *CurrentCycles =
  144   Value *CyclesStart = Builder.CreateLoad(CyclesTotalStartPtr, true);
  145   Value *CyclesTotal = Builder.CreateSub(CurrentCycles, CyclesStart);
  146   Value *CyclesInScops = Builder.CreateLoad(CyclesInScopsPtr, true);
  179   Value *CyclesInCurrentScop =
  182   Value *TripCountForCurrentScop =
  235   Value *HasRunBefore = Builder.CreateLoad(AlreadyInitializedPtr);
  242   Value *True = Builder.getInt1(true);
  246   Value *FinalReportingPtr =
  254     Value *CurrentCycles =
  269   Value *CurrentCycles =
  281   Value *CurrentCycles =
  283   Value *CyclesInScop = Builder.CreateSub(CurrentCycles, CyclesStart);
  284   Value *CyclesInScops = Builder.CreateLoad(CyclesInScopsPtr, true);
  288   Value *CyclesInCurrentScop = Builder.CreateLoad(CyclesInCurrentScopPtr, true);
  292   Value *TripCountForCurrentScop =
tools/polly/lib/CodeGen/RuntimeDebugBuilder.cpp
   57 std::vector<Value *>
   59   std::vector<Value *> Identifiers;
   71     Value *Id = Builder.CreateCall(GetID, {});
   87     Value *Id = Builder.CreateCall(GetId, {});
   97                                         ArrayRef<Value *> Values) {
  117 static std::tuple<std::string, std::vector<Value *>>
  118 prepareValuesForPrinting(PollyIRBuilder &Builder, ArrayRef<Value *> Values) {
  120   std::vector<Value *> ValuesToPrint;
  161                                             ArrayRef<Value *> Values) {
  164   std::vector<Value *> ValuesToPrint;
  174                                             ArrayRef<Value *> Values) {
  188   Value *Data = new AllocaInst(
  191   auto *DataPtr = Builder.CreateGEP(Data, {Zero, Zero});
  236   Value *Format = Builder.CreateGlobalStringPtr(str, "polly.vprintf.buffer", 4);
  260                                        ArrayRef<Value *> Values) {
  261   Value *FormatString = Builder.CreateGlobalStringPtr(Format);
  262   std::vector<Value *> Arguments;
tools/polly/lib/CodeGen/Utils.cpp
   78 polly::executeScopConditionally(Scop &S, Value *RTC, DominatorTree &DT,
tools/polly/lib/Support/GICHelper.cpp
  205                                         const Value *Val, long Number,
tools/polly/lib/Support/SCEVAffinator.cpp
  500   auto *Divisor = SDiv->getOperand(1);
  506   auto *Dividend = SDiv->getOperand(0);
  517   auto *Divisor = SRem->getOperand(1);
  523   auto *Dividend = SRem->getOperand(0);
tools/polly/lib/Support/SCEVValidator.cpp
  420     auto *Divisor = SRem->getOperand(1);
  425     auto *Dividend = SRem->getOperand(0);
  431     Value *V = Expr->getValue();
  580   SetVector<Value *> &Values;
  583   SCEVFindValues(ScalarEvolution &SE, SetVector<Value *> &Values)
  613                 SetVector<Value *> &Values) {
  659 static bool isAffineExpr(Value *V, const Region *R, Loop *Scope,
  676 bool isAffineConstraint(Value *V, const Region *R, llvm::Loop *Scope,
  776     Value *V = Unknown->getValue();
  781     Value *Final = nullptr;
  798 Value *getUniqueNonErrorValue(PHINode *PHI, Region *R, LoopInfo &LI,
  800   Value *V = nullptr;
tools/polly/lib/Support/ScopHelper.cpp
  239   Value *expandCodeFor(const SCEV *E, Type *Ty, Instruction *I) {
  280       auto *OpClone = expandCodeFor(OpSCEV, Op->getType(), IP);
  292     Value *NewVal = VMap ? VMap->lookup(E->getValue()) : nullptr;
  321     Value *LHS = expandCodeFor(LHSScev, E->getType(), IP);
  322     Value *RHS = expandCodeFor(RHSScev, E->getType(), IP);
  394 Value *polly::expandCodeFor(Scop &S, ScalarEvolution &SE, const DataLayout &DL,
  450 Value *polly::getConditionFromTerminator(Instruction *TI) {
  553   auto *Ptr = LInst->getPointerOperand();
  610 bool polly::isIgnoredIntrinsic(const Value *V) {
  636 bool polly::canSynthesize(const Value *V, const Scop &S, ScalarEvolution *SE,
tools/polly/lib/Support/VirtualInstruction.cpp
   53                               Value *Val, bool Virtual) {
tools/polly/lib/Transform/DeLICM.cpp
  670     auto *V = DefMA->getAccessValue();
  788   isl::map makeValInst(Value *Val, ScopStmt *UserStmt, Loop *Scope,
 1043     auto *WrittenVal = TargetStoreMA->getAccessInstruction()->getOperand(0);
tools/polly/lib/Transform/ForwardOpTree.cpp
  647     for (Value *OpVal : UseInst->operand_values()) {
  690   ForwardingDecision forwardTree(ScopStmt *TargetStmt, Value *UseVal,
tools/polly/lib/Transform/ScheduleOptimizer.cpp
 1228                                                       Value *BasePtr) {
tools/polly/lib/Transform/Simplify.cpp
  229       SmallDenseMap<Value *, isl::set> ValueSets;
  278           Value *StoredVal = MA->tryGetValueStored();
  396       SmallDenseMap<Value *, isl::set> ValueSets;
  441           Value *StoredVal = MA->tryGetValueStored();
  466           Value *LoadedVal = MA->getAccessValue();
tools/polly/lib/Transform/ZoneAlgo.cpp
  296   Value *V = nullptr;
  419   Value *AccVal = MA->getAccessValue();
  522       Value *IncomingVal = Incoming.get();
  724 isl::id ZoneAlgorithm::makeValueId(Value *V) {
  737 isl::space ZoneAlgorithm::makeValueSpace(Value *V) {
  742 isl::set ZoneAlgorithm::makeValueSet(Value *V) {
  747 isl::map ZoneAlgorithm::makeValInst(Value *Val, ScopStmt *UserStmt, Loop *Scope,
  872 isl::union_map ZoneAlgorithm::makeNormalizedValInst(llvm::Value *Val,
 1042         Value *IncomingVal = Incoming[0].second;
tools/verify-uselistorder/verify-uselistorder.cpp
   82   DenseMap<const Value *, unsigned> IDs;
   83   std::vector<const Value *> Values;
  101   void map(const Value *V);
  102   unsigned lookup(const Value *V) const { return IDs.lookup(V); }
  227         for (const Value *Op : I.operands())
  234 void ValueMapping::map(const Value *V) {
  240       for (const Value *Op : C->operands())
  257   const Value *V = M.Values[I];
  310     const Value *L = LM.Values[I];
  311     const Value *R = RM.Values[I];
  383 static void shuffleValueUseLists(Value *V, std::minstd_rand0 &Gen,
  384                                  DenseSet<Value *> &Seen) {
  390       for (Value *Op : C->operands())
  426 static void reverseValueUseLists(Value *V, DenseSet<Value *> &Seen) {
  426 static void reverseValueUseLists(Value *V, DenseSet<Value *> &Seen) {
  432       for (Value *Op : C->operands())
  503         for (Value *Op : I.operands())
  515   DenseSet<Value *> Seen;
  521   DenseSet<Value *> Seen;
unittests/Analysis/AliasAnalysisTest.cpp
   47     SetVector<Value *> Pointers;
   55     for (Value *P1 : Pointers)
   56       for (Value *P2 : Pointers)
unittests/Analysis/BasicAliasAnalysisTest.cpp
   78   Value *IncomingI32Ptr = F->arg_begin();
  112   Value *ArbitraryI32 = F->arg_begin();
unittests/Analysis/CaptureTrackingTest.cpp
   58     Value *Arg = &*F->arg_begin();
unittests/Analysis/DivergenceAnalysisTest.cpp
  285   using InducedDivJoinMap = std::map<const Value *, SmallBlockVec>;
unittests/Analysis/MemorySSATest.cpp
  601   Value *Alloca = B.CreateAlloca(Int8, ConstantInt::get(Int8, 1), "A");
  632   Value *Alloca = B.CreateAlloca(Int8, ConstantInt::get(Int8, 1), "A");
  662   Value *Alloca = B.CreateAlloca(Int8, ConstantInt::get(Int8, 1), "A");
  708   Value *AllocA = B.CreateAlloca(Int8, One, "a");
  709   Value *AllocB = B.CreateAlloca(Int8, One, "b");
  771   Value *AllocA = B.CreateAlloca(Int8, One, "");
  799   Value *AllocaA = B.CreateAlloca(Int8, ConstantInt::get(Int8, 1), "A");
  801   Value *AllocaB = B.CreateAlloca(Int8, ConstantInt::get(Int8, 1), "B");
  831   Value *A = B.CreateAlloca(Int8, ConstantInt::get(Int8, 1), "A");
  832   Value *B_ = B.CreateAlloca(Int8, ConstantInt::get(Int8, 1), "B");
  833   Value *C = B.CreateAlloca(Int8, ConstantInt::get(Int8, 1), "C");
  930   Value *A = B.CreateAlloca(B.getInt8Ty());
  975   Value *X = B.CreateAlloca(B.getInt8Ty());
  976   Value *Y = B.CreateAlloca(B.getInt8Ty());
 1008   Value *AllocaA = B.CreateAlloca(Int8, ConstantInt::get(Int8, 1), "A");
 1009   Value *AllocaB = B.CreateAlloca(Int8, ConstantInt::get(Int8, 1), "B");
 1051   Value *AllocaA = B.CreateAlloca(Int8, ConstantInt::get(Int8, 1), "A");
 1052   Value *AllocaB = B.CreateAlloca(Int8, ConstantInt::get(Int8, 1), "B");
 1147   Value *AllocaC = B.CreateAlloca(Int8, ConstantInt::get(Int8, 1), "C");
 1228   Value *Foo = &*F->arg_begin();
 1230   Value *Bar = B.CreateGEP(B.getInt8Ty(), Foo, B.getInt64(1), "bar");
 1289   Value *Alloca = B.CreateAlloca(Int8, ConstantInt::get(Int8, 1), "alloc");
 1339   Value *AllocA = B.CreateAlloca(Int8, ConstantInt::get(Int8, 1), "A");
 1340   Value *AllocB = B.CreateAlloca(Int8, ConstantInt::get(Int8, 1), "B");
 1478   Value *Alloca = B.CreateAlloca(Int8, ConstantInt::get(Int8, 1), "A");
unittests/Analysis/PhiValuesTest.cpp
   40   Value *Val1 = new LoadInst(I32Ty, UndefValue::get(I32PtrTy), "val1", Entry);
   41   Value *Val2 = new LoadInst(I32Ty, UndefValue::get(I32PtrTy), "val2", Entry);
   42   Value *Val3 = new LoadInst(I32Ty, UndefValue::get(I32PtrTy), "val3", Entry);
   43   Value *Val4 = new LoadInst(I32Ty, UndefValue::get(I32PtrTy), "val4", Entry);
  113   Value *Val1 = new LoadInst(I32Ty, UndefValue::get(I32PtrTy), "val1", Entry);
  114   Value *Val2 = new LoadInst(I32Ty, UndefValue::get(I32PtrTy), "val2", Entry);
  115   Value *Val3 = new LoadInst(I32Ty, UndefValue::get(I32PtrTy), "val3", Entry);
  116   Value *Val4 = new LoadInst(I32Ty, UndefValue::get(I32PtrTy), "val4", Entry);
unittests/Analysis/ScalarEvolutionTest.cpp
   77   Value *V0 = new GlobalVariable(M, Ty, false, GlobalValue::ExternalLinkage, Init, "V0");
   78   Value *V1 = new GlobalVariable(M, Ty, false, GlobalValue::ExternalLinkage, Init, "V1");
   79   Value *V2 = new GlobalVariable(M, Ty, false, GlobalValue::ExternalLinkage, Init, "V2");
  195   Value *V =
  410   Value *X = &*F->arg_begin();
  411   Value *Y = &*std::next(F->arg_begin());
  690   Value *Accum = Constant::getNullValue(I8PtrTy);
  775   Value *Add = Builder.CreateAdd(Phi, ConstantInt::get(T_int64, 1), "add");
  781   Value *GepBase =
  882   auto *NewCond = Builder.CreateICmp(
  971   auto *NewCond = Builder.CreateICmp(
 1554       auto *Start = NewCanonicalIV->getIncomingValueForBlock(Incoming);
 1557       auto *Next = NewCanonicalIV->getIncomingValueForBlock(Backedge);
 1562       auto *Step = NextBinOp->getOperand(1);
 1786       Value *V = Exp.expandCodeFor(AR, nullptr, InsertAt);
 1835       Value *V = Exp.expandCodeFor(AR, nullptr, InsertAt);
 1887       Value *V = Exp.expandCodeFor(AR, nullptr, InsertAt);
unittests/Analysis/SparsePropagation.cpp
   28 using TestLatticeKey = PointerIntPair<Value *, 2, IPOGrouping>;
   36   static inline Value *getValueFromLatticeKey(TestLatticeKey Key) {
unittests/Analysis/UnrollAnalyzerTest.cpp
   20 static SmallVector<DenseMap<Value *, Constant *>, 16> SimplifiedValuesVector;
   39       DenseMap<Value *, Constant *> SimplifiedValues;
unittests/Analysis/ValueTrackingTest.cpp
   65     Value *LHS, *RHS;
  942   Value *Actual = isBytewiseValue(GV->getInitializer(), M->getDataLayout());
unittests/Analysis/VectorUtilsTest.cpp
   80   Value *UndefVec = UndefValue::get(VectorType::get(IRB.getInt8Ty(), 4));
   93   Value *SplatC = IRB.CreateVectorSplat(5, ScalarC);
unittests/AsmParser/AsmParserTest.cpp
   75   const Value *V;
  140   const Value *V;
unittests/ExecutionEngine/MCJIT/MCJITTest.cpp
  104   Value *ReadGlobal = Builder.CreateLoad(Builder.getInt32Ty(), GV);
  178     Value *innerResult = Builder.CreateCall(Inner, {});
  262   Value *Result = Builder.CreateAdd(Call1, Call2);
unittests/ExecutionEngine/MCJIT/MCJITTestBase.h
   57   void endFunctionWithRet(Function *Func, Value *RetValue) {
   66     SmallVector<Value*, 1> CallArgs;
   71     Value *ReturnCode = Builder.CreateCall(Callee, CallArgs);
   83     Value *ReturnVal = ConstantInt::get(Context, APInt(32, returnCode));
  101     Value *Arg1 = &*args;
  102     Value *Arg2 = &*++args;
  103     Value *AddResult = Builder.CreateAdd(Arg1, Arg2);
  167     Value *Param = &*Result->arg_begin();
  168     Value *Zero = ConstantInt::get(Context, APInt(32, 0));
  179     Value *One = ConstantInt::get(Context, APInt(32, 1));
  180     Value *RecursiveParam = Builder.CreateSub(Param, One);
  181     Value *RecursiveReturn = Builder.CreateCall(Helper, RecursiveParam);
  182     Value *Accumulator = Builder.CreateAdd(Param, RecursiveReturn);
unittests/ExecutionEngine/Orc/LegacyRTDyldObjectLinkingLayerTest.cpp
  164     Value *FourtyTwo = ConstantInt::getSigned(Int32Ty, 42);
  250     Value *FourtyTwo = ConstantInt::getSigned(Int32Ty, 42);
  264     Value *Seven = ConstantInt::getSigned(Int32Ty, 7);
unittests/ExecutionEngine/Orc/OrcCAPITest.cpp
   41     Value* Result = B.CreateCall(TestFunc);
unittests/FuzzMutate/OperationsTest.cpp
   33 void PrintTo(Value *V, ::std::ostream *OS) {
   39 void PrintTo(Constant *C, ::std::ostream *OS) { PrintTo(cast<Value>(C), OS); }
  197   Value *Cond = ConstantInt::getFalse(Ctx);
  270   Value *Cond = ConstantInt::getFalse(Ctx);
unittests/FuzzMutate/RandomIRBuilderTest.cpp
   72   SmallVector<Value *, 2> Srcs;
   81     Value *LastSrc = IB.newSource(BB, Insts, Srcs, Descr.SourcePreds[2]);
  112   SmallVector<Value *, 2> Srcs(2);
  125       Value *Src = IB.findOrCreateSource(
  192   SmallVector<Value *, 2> Srcs(2);
  263     Value *V = IB.findOrCreateSource(BB, {FuncPtr, OpaquePtr});
  293     Value *V = IB.findOrCreateSource(BB, {Alloca}, {}, Descr.SourcePreds[0]);
unittests/IR/BasicBlockTest.cpp
  106   Value *DIV = MetadataAsValue::get(Ctx, (Metadata *)nullptr);
  107   SmallVector<Value *, 3> Args = {DIV, DIV, DIV};
unittests/IR/IRBuilderTest.cpp
   52   Value *V;
  136   SmallVector<Value*, 3> ArgTys;
  172   Value *V;
  173   Value *VDouble;
  174   Value *VInt;
  315   Value *End1 = Builder.CreateLifetimeEnd(Var1);
  378   Value *V = Builder.CreateLoad(GV->getValueType(), GV);
  381   Value *U = Builder.CreateUnOp(Instruction::FNeg, V);
  391   Value *VFMF = Builder.CreateFNegFMF(V, I);
  400   Value *F, *FC;
  590   Value *V = Builder.CreateLoad(G->getValueType(), G);
  657   Value *F = Builder.CreateLoad(GV->getValueType(), GV);
  774   Value *Vec = UndefValue::get(VecTy);
unittests/IR/InstructionsTest.cpp
   84   Value *Args[] = {ConstantInt::get(Type::getInt8Ty(Ctx), 20),
   91   for (Value *Arg : Call->arg_operands()) {
  102   Value *Args[] = {ConstantInt::get(Type::getInt8Ty(Ctx), 20),
  109   for (Value *Arg : Invoke->arg_operands()) {
  348   Value *S0 = BTC0->stripPointerCasts();
  349   Value *S1 = BTC1->stripPointerCasts();
  350   Value *S2 = BTC2->stripPointerCasts();
  351   Value *S3 = BTC3->stripPointerCasts();
  414   Value *V1 = Builder.CreateFAdd(I, I, "", MD1);
  508   Value *Callee = Constant::getNullValue(FnTy->getPointerTo());
  509   Value *Args[] = {
  542   Value *Callee = Constant::getNullValue(FnTy->getPointerTo());
  543   Value *Args[] = {ConstantInt::get(Int32Ty, 42)};
  569   Value *Callee = Constant::getNullValue(FnTy->getPointerTo());
  570   Value *Args[] = {ConstantInt::get(Int32Ty, 42)};
  649     Value *GEPBase = Constant::getNullValue(B.getInt8PtrTy());
  663   Value *Indices[] = {
  668   Value *V = Builder.CreateGEP(ArrTy, UndefValue::get(PointerType::getUnqual(ArrTy)),
 1122   Value *F = Builder.CreateFNeg(I);
unittests/IR/LegacyPassManagerTest.cpp
  581         Value *int1_f = &*args++;
unittests/IR/PatternMatch.cpp
   54   Value *One = IRB.CreateAdd(IRB.CreateAdd(IRB.getInt32(1), IRB.getInt32(2)),
   56   Value *Two = IRB.CreateAdd(One, IRB.getInt32(42));
   57   Value *Leaf = IRB.CreateAdd(IRB.CreateAdd(Two, IRB.getInt32(8)),
   59   Value *V;
   72   Value *Zero = ConstantInt::get(IntTy, 0);
   73   Value *One = ConstantInt::get(IntTy, 1);
   74   Value *NegOne = ConstantInt::get(IntTy, -1);
  111   Value *Zero = ConstantInt::get(IntTy, 0);
  112   Value *One = ConstantInt::get(IntTy, 1);
  113   Value *NegOne = ConstantInt::get(IntTy, -1);
  150   Value *Zero = ConstantInt::get(IntTy, 0);
  151   Value *One = ConstantInt::get(IntTy, 1);
  152   Value *NegOne = ConstantInt::get(IntTy, -1);
  189   Value *Zero = ConstantInt::get(IntTy, 0);
  190   Value *One = ConstantInt::get(IntTy, 1);
  191   Value *NegOne = ConstantInt::get(IntTy, -1);
  228   Value *Zero = ConstantInt::get(IntTy, 0);
  229   Value *One = ConstantInt::get(IntTy, 1);
  230   Value *NegOne = ConstantInt::get(IntTy, -1);
  267   Value *Zero = ConstantInt::get(IntTy, 0);
  268   Value *One = ConstantInt::get(IntTy, 1);
  269   Value *NegOne = ConstantInt::get(IntTy, -1);
  306   Value *Zero = ConstantInt::get(IntTy, 0);
  307   Value *One = ConstantInt::get(IntTy, 1);
  308   Value *NegOne = ConstantInt::get(IntTy, -1);
  345   Value *Zero = ConstantInt::get(IntTy, 0);
  346   Value *One = ConstantInt::get(IntTy, 1);
  347   Value *NegOne = ConstantInt::get(IntTy, -1);
  384   Value *Zero = ConstantInt::get(IntTy, 0);
  385   Value *One = ConstantInt::get(IntTy, 1);
  386   Value *NegOne = ConstantInt::get(IntTy, -1);
  423   Value *Zero = ConstantInt::get(IntTy, 0);
  424   Value *One = ConstantInt::get(IntTy, 1);
  425   Value *NegOne = ConstantInt::get(IntTy, -1);
  459   Value *X = IRB.CreateAdd(IRB.getInt32(1), IRB.getInt32(0));
  477   Value *One32 = IRB.getInt32(1);
  478   Value *One64Z = IRB.CreateZExt(One32, IntegerType::getInt64Ty(Ctx));
  479   Value *One64S = IRB.CreateSExt(One32, IntegerType::getInt64Ty(Ctx));
  511   Value *C128 = IRB.getInt32(128);
  512   Value *CNeg128 = ConstantExpr::getNeg(cast<Constant>(C128));
  520   Value *CIntMin = IRB.getInt64(APSInt::getSignedMinValue(64).getSExtValue());
  521   Value *CNegIntMin = ConstantExpr::getNeg(cast<Constant>(CIntMin));
  531   Value *X = IRB.getInt32(1);
  532   Value *Y = IRB.getInt32(2);
  535     Value *tX = X;
  540     const Value *tX = X;
  545     Value *const tX = X;
  550     const Value *const tX = X;
  556     Value *tX = nullptr;
  561     Value *tX = nullptr;
  567     Value *tX = nullptr, *tY = nullptr;
  582   Value *L = ConstantFP::get(FltTy, 1.0);
  583   Value *R = ConstantFP::get(FltTy, 2.0);
  584   Value *MatchL, *MatchR;
  632   Value *L = ConstantFP::get(FltTy, 1.0);
  633   Value *R = ConstantFP::get(FltTy, 2.0);
  634   Value *MatchL, *MatchR;
  683   Value *L = ConstantFP::get(FltTy, 1.0);
  684   Value *R = ConstantFP::get(FltTy, 2.0);
  685   Value *MatchL, *MatchR;
  733   Value *L = ConstantFP::get(FltTy, 1.0);
  734   Value *R = ConstantFP::get(FltTy, 2.0);
  735   Value *MatchL, *MatchR;
  782   Value *L = IRB.getInt32(1);
  783   Value *R = IRB.getInt32(2);
  784   Value *MatchL, *MatchR;
  862   Value *Alloca = IRB.CreateAlloca(IRB.getInt32Ty());
  863   Value *LoadInst = IRB.CreateLoad(IRB.getInt32Ty(), Alloca);
  864   Value *FourtyTwo = IRB.getInt32(42);
  865   Value *StoreInst = IRB.CreateStore(FourtyTwo, Alloca);
  866   Value *MatchLoad, *MatchStoreVal, *MatchStorePointer;
  912   Value *Val = IRB.CreateAdd(IRB.getInt8(0), IRB.getInt8(1));
  913   Value *Val2 = IRB.CreateAdd(Val, IRB.getInt8(3));
  920   Value *UndefVec = UndefValue::get(VecTy);
  921   Value *VI1 = IRB.CreateInsertElement(UndefVec, IRB.getInt8(1), (uint64_t)0);
  922   Value *VI2 = IRB.CreateInsertElement(VI1, Val2, Val);
  923   Value *VI3 = IRB.CreateInsertElement(VI1, Val2, (uint64_t)1);
  924   Value *VI4 = IRB.CreateInsertElement(VI1, IRB.getInt8(2), Val);
  926   Value *EX1 = IRB.CreateExtractElement(VI4, Val);
  927   Value *EX2 = IRB.CreateExtractElement(VI4, (uint64_t)0);
  928   Value *EX3 = IRB.CreateExtractElement(IdxVec, (uint64_t)1);
  930   Value *Zero = ConstantAggregateZero::get(i32VecTy);
  931   Value *SI1 = IRB.CreateShuffleVector(VI1, UndefVec, Zero);
  932   Value *SI2 = IRB.CreateShuffleVector(VI3, VI4, IdxVec);
  933   Value *SI3 = IRB.CreateShuffleVector(VI3, UndefVec, Zero);
  934   Value *SI4 = IRB.CreateShuffleVector(VI4, UndefVec, Zero);
  936   Value *SP1 = IRB.CreateVectorSplat(2, IRB.getInt8(2));
  937   Value *SP2 = IRB.CreateVectorSplat(2, Val);
  939   Value *A = nullptr, *B = nullptr, *C = nullptr;
 1057   Value *One = ConstantFP::get(FltTy, 1.0);
 1058   Value *Z = ConstantFP::get(FltTy, 0.0);
 1059   Value *NZ = ConstantFP::get(FltTy, -0.0);
 1060   Value *V = IRB.CreateFNeg(One);
 1061   Value *V1 = IRB.CreateFSub(NZ, One);
 1062   Value *V2 = IRB.CreateFSub(Z, One);
 1063   Value *V3 = IRB.CreateFAdd(NZ, One);
 1064   Value *Match;
 1087   Value *Br1 = IRB.CreateCondBr(IRB.getTrue(), TrueBB, FalseBB);
 1107   Value *Br2 = IRB.CreateCondBr(IRB.getTrue(), TrueBB, TrueBB);
 1114 typedef ::testing::Types<std::tuple<Value*, Instruction*>,
 1115                          std::tuple<const Value*, const Instruction *>>
 1125   Value *L = IRB.getInt32(1);
 1126   Value *R = IRB.getInt32(2);
unittests/IR/ValueHandleTest.cpp
   33   ConcreteCallbackVH(Value *V) : CallbackVH(V) {}
   81   Value *BV = BitcastV.get();
   82   Value *CV = ConstantV;
  114   Value *null_value = nullptr;
  126   AssertingVH<Value> GenericAVH(BitcastV.get());
  145   AssertingVH<Value> BitcastAVH(BitcastV.get());
  146   AssertingVH<Value> ConstantAVH(ConstantV);
  159   Value *BV = BitcastV.get();
  160   Value *CV = ConstantV;
  178   AssertingVH<Value> AVH(BitcastV.get());
  194   AssertingVH<Value> AVH(BitcastV.get());
  197   AssertingVH<Value> Copy(AVH);
  236   Value *BV = BitcastV.get();
  237   Value *CV = ConstantV;
  261     RecordingVH(Value *V) : CallbackVH(V), DeletedCalls(0), AURWCalls(0) {}
  268     void allUsesReplacedWith(Value *) override { AURWCalls++; }
  284     Value *AURWArgument;
  287     RecordingVH(Value *V)
  295     void allUsesReplacedWith(Value *new_value) override {
  314     Value *AURWArgument;
  320     RecoveringVH(LLVMContext &TheContext, Value *V)
  330     void allUsesReplacedWith(Value *new_value) override {
  364     DestroyingVH(Value *V) {
  374     void allUsesReplacedWith(Value *) override {
  408     AssertingVH<Value> *ToClear[2];
  409     ClearingVH(Value *V,
  410                AssertingVH<Value> &A0, AssertingVH<Value> &A1)
  410                AssertingVH<Value> &A0, AssertingVH<Value> &A1)
  423   AssertingVH<Value> A1, A2;
  437   PoisoningVH<Value> GenericVH(BitcastV.get());
  456   PoisoningVH<Value> BitcastVH(BitcastV.get());
  457   PoisoningVH<Value> ConstantVH(ConstantV);
  470   Value *BV = BitcastV.get();
  471   Value *CV = ConstantV;
  489   PoisoningVH<Value> VH(BitcastV.get());
  503   TrackingVH<Value> VH(BitcastV.get());
  511   PoisoningVH<Value> VH(BitcastV.get());
  530     TrackingVH<Value> VH(BitcastV.get());
unittests/IR/ValueMapTest.cpp
   37 typedef ::testing::Types<Value, Instruction, const Instruction> KeyTypes;
unittests/IR/WaymarkTest.cpp
   24   Value * values[22];
unittests/Linker/LinkModulesTest.cpp
   81   std::vector<Value *> GEPIndices;
   85   Value *GEP = Builder.CreateGEP(AT, GV, GEPIndices, "switch.gep");
   86   Value *Load = Builder.CreateLoad(AT->getElementType(), GEP, "switch.load");
  115   Value *Elem = Init->getOperand(0);
unittests/Support/Casting.cpp
   91 static_assert(std::is_same<simplify_type<Use>::SimpleType, Value *>::value,
   93 static_assert(std::is_same<simplify_type<Use *>::SimpleType, Value *>::value,
unittests/Transforms/Utils/CloningTest.cpp
   39     Value *V2 = V1->clone();
   46     for (Value *V : Clones)
   53     for (Value *V : Orig)
   60   SmallPtrSet<Value *, 4> Orig;   // Erase on exit
   61   SmallPtrSet<Value *, 4> Clones; // Erase in eraseClones
   64   Value *V;
  141   std::vector<Value *> ops;
  492     Value* AllocaContent = IBuilder.getInt32(1);
unittests/Transforms/Utils/FunctionComparatorTest.cpp
   81   int testCmpValues(const Value *L, const Value *R) {
   81   int testCmpValues(const Value *L, const Value *R) {
unittests/Transforms/Utils/IntegerDivisionTest.cpp
   37   Value *A = &*AI++;
   38   Value *B = &*AI++;
   40   Value *Div = Builder.CreateSDiv(A, B);
   43   Value *Ret = Builder.CreateRet(Div);
   67   Value *A = &*AI++;
   68   Value *B = &*AI++;
   70   Value *Div = Builder.CreateUDiv(A, B);
   73   Value *Ret = Builder.CreateRet(Div);
   97   Value *A = &*AI++;
   98   Value *B = &*AI++;
  100   Value *Rem = Builder.CreateSRem(A, B);
  103   Value *Ret = Builder.CreateRet(Rem);
  127   Value *A = &*AI++;
  128   Value *B = &*AI++;
  130   Value *Rem = Builder.CreateURem(A, B);
  133   Value *Ret = Builder.CreateRet(Rem);
  158   Value *A = &*AI++;
  159   Value *B = &*AI++;
  161   Value *Div = Builder.CreateSDiv(A, B);
  164   Value *Ret = Builder.CreateRet(Div);
  188   Value *A = &*AI++;
  189   Value *B = &*AI++;
  191   Value *Div = Builder.CreateUDiv(A, B);
  194   Value *Ret = Builder.CreateRet(Div);
  218   Value *A = &*AI++;
  219   Value *B = &*AI++;
  221   Value *Rem = Builder.CreateSRem(A, B);
  224   Value *Ret = Builder.CreateRet(Rem);
  248   Value *A = &*AI++;
  249   Value *B = &*AI++;
  251   Value *Rem = Builder.CreateURem(A, B);
  254   Value *Ret = Builder.CreateRet(Rem);
unittests/Transforms/Utils/LocalTest.cpp
  154   Value *NewBase = Constant::getNullValue(Type::getInt32PtrTy(C));
unittests/Transforms/Utils/SSAUpdaterBulkTest.cpp
   56   Value *AddOp1 = B.CreateAdd(FirstArg, ConstantInt::get(I32Ty, 1));
   57   Value *SubOp1 = B.CreateSub(FirstArg, ConstantInt::get(I32Ty, 2));
   61   Value *AddOp2 = B.CreateAdd(FirstArg, ConstantInt::get(I32Ty, 3));
   62   Value *SubOp2 = B.CreateSub(FirstArg, ConstantInt::get(I32Ty, 4));
  140   Value *AddOp1 = B.CreateAdd(FirstArg, ConstantInt::get(I32Ty, 1));
  144   Value *AddOp2 = B.CreateAdd(FirstArg, ConstantInt::get(I32Ty, 2));
usr/include/c++/7.4.0/bits/move.h
   72     constexpr _Tp&&
   83     constexpr _Tp&&
usr/include/c++/7.4.0/type_traits
  381     : public __is_pointer_helper<typename remove_cv<_Tp>::type>::type
 1554     { typedef _Tp     type; };
 1558     { typedef _Tp     type; };
 1563     { typedef _Tp     type; };
 1574       remove_const<typename remove_volatile<_Tp>::type>::type     type;
 1633     { typedef _Tp   type; };
 1983     { typedef _Up     type; };
utils/unittest/googletest/include/gtest/gtest-printers.h
  407                     T* p, ::std::ostream* os) {
  416     if (IsTrue(ImplicitlyConvertible<T*, const void*>::value)) {
utils/unittest/googletest/include/gtest/gtest.h
 1475       T* rhs) {
utils/unittest/googletest/include/gtest/internal/gtest-type-util.h
  135   typedef T1 Head;
  821   typedef internal::Types3<T1, T2, T3> type;
 3320   typedef typename Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,