Home
last modified time | relevance | path

Searched full:llvm (Results 1 – 25 of 320) sorted by relevance

12345678910>>...13

/arkcompiler/runtime_core/static_core/libllvmbackend/transforms/passes/
Dgc_intrusion.h19 #include <llvm/ADT/SetVector.h>
20 #include <llvm/IR/IRBuilder.h>
21 #include <llvm/IR/PassManager.h>
31 class GcIntrusion : public llvm::PassInfoMixin<GcIntrusion> {
39llvm::PreservedAnalyses run(llvm::Function &function, llvm::FunctionAnalysisManager &analysisManag…
42 …using SSAVarRelocs = llvm::DenseMap<llvm::Value *, llvm::DenseMap<llvm::BasicBlock *, llvm::Value …
43 using InstructionOrderMap = llvm::DenseMap<llvm::Value *, uint64_t>;
44 using SortedUses = llvm::DenseMap<llvm::Value *, std::list<llvm::Use *>>;
45 using RPOMap = llvm::DenseMap<llvm::BasicBlock *, uint32_t>;
53 …void RewriteWithGcInBlock(llvm::BasicBlock *block, GcRefLiveness *liveness, llvm::SetVector<llvm::…
[all …]
Dgep_propagation.h19 #include <llvm/IR/IRBuilder.h>
20 #include <llvm/IR/PassManager.h>
26 namespace llvm {
28 } // namespace llvm
32 class GepPropagation : public llvm::PassInfoMixin<GepPropagation> {
40llvm::PreservedAnalyses run(llvm::Function &function, llvm::FunctionAnalysisManager &analysisManag…
43 …using SelectorSplitMap = llvm::DenseMap<llvm::Instruction *, std::pair<llvm::Instruction *, llvm::…
45 void AddToVector(llvm::Instruction *inst, llvm::SmallVector<llvm::Instruction *> *toExpand,
46 llvm::SmallVector<llvm::Instruction *> *selectors);
48 void Propagate(llvm::Function *function);
[all …]
Dmem_barriers.cpp20 #include <llvm/IR/IRBuilder.h>
21 #include <llvm/IR/IntrinsicsAArch64.h>
22 #include <llvm/Transforms/Utils/BasicBlockUtils.h>
24 using llvm::BasicBlock;
25 using llvm::CallInst;
26 using llvm::Function;
27 using llvm::FunctionAnalysisManager;
28 using llvm::Instruction;
43 llvm::PreservedAnalyses MemBarriers::run(Function &function, FunctionAnalysisManager & /*analysisMa… in run()
47 llvm::SmallVector<llvm::Instruction *> needsBarrier; in run()
[all …]
Dintrinsics_lowering.cpp24 #include <llvm/Pass.h>
25 #include <llvm/IR/IntrinsicInst.h>
26 #include <llvm/IR/Intrinsics.h>
27 #include <llvm/IR/Module.h>
28 #include <llvm/IR/Verifier.h>
29 #include <llvm/Transforms/Utils/BasicBlockUtils.h>
32 using llvm::Function;
33 using llvm::FunctionAnalysisManager;
45 llvm::PreservedAnalyses IntrinsicsLowering::run(Function &function, FunctionAnalysisManager & /*ana… in run()
49 return llvm::PreservedAnalyses::all(); in run()
[all …]
Dgc_intrusion_check.h19 #include <llvm/IR/PassManager.h>
25 namespace llvm {
28 } // namespace llvm
32 class GcIntrusionCheck : public llvm::PassInfoMixin<GcIntrusionCheck> {
34 static constexpr llvm::StringRef ARG_NAME = "gc-intrusion-check";
39llvm::PreservedAnalyses run(llvm::Function &function, llvm::FunctionAnalysisManager &analysisManag…
42 void CheckStatepoint(const llvm::Function &func, const llvm::GCStatepointInst &statepoint);
44 void CheckRelocate(const llvm::Function &func, const llvm::GCRelocateInst &relocate);
46 void CheckInstruction(const llvm::Function &func, const llvm::Instruction &inst);
48 …const llvm::Instruction *FindDefOrStatepoint(const llvm::Instruction *start, const llvm::Instructi…
[all …]
Dgc_intrusion_check.cpp22 #include <llvm/ADT/PostOrderIterator.h>
23 #include <llvm/IR/Statepoint.h>
24 #include <llvm/Pass.h>
25 #include <llvm/Support/Error.h>
30 using llvm::ArrayRef;
31 using llvm::BasicBlock;
32 using llvm::DenseSet;
33 using llvm::Function;
34 using llvm::FunctionAnalysisManager;
35 using llvm::Use;
[all …]
Dinfer_flags.cpp18 #include <llvm/Analysis/LoopInfo.h>
19 #include <llvm/Analysis/ScalarEvolution.h>
20 #include <llvm/Analysis/ScalarEvolutionExpressions.h>
21 #include <llvm/Analysis/MemoryBuiltins.h>
22 #include <llvm/Analysis/ValueTracking.h>
23 #include <llvm/IR/Dominators.h>
24 #include <llvm/IR/Instructions.h>
25 #include <llvm/IR/InstIterator.h>
26 #include <llvm/IR/Operator.h>
27 #include <llvm/Support/KnownBits.h>
[all …]
Dpropagate_lenarray.cpp18 #include <llvm/Analysis/LoopInfo.h>
19 #include <llvm/Analysis/ScalarEvolution.h>
20 #include <llvm/Analysis/ScalarEvolutionExpressions.h>
21 #include <llvm/Analysis/MemoryBuiltins.h>
22 #include <llvm/Analysis/ValueTracking.h>
23 #include <llvm/IR/Dominators.h>
24 #include <llvm/IR/Instructions.h>
25 #include <llvm/IR/InstIterator.h>
26 #include <llvm/IR/Operator.h>
27 #include <llvm/Support/KnownBits.h>
[all …]
Dprune_deopt.h19 #include <llvm/IR/PassManager.h>
25 namespace llvm {
27 } // namespace llvm
31 class PruneDeopt : public llvm::PassInfoMixin<PruneDeopt> {
39llvm::PreservedAnalyses run(llvm::Function &function, llvm::FunctionAnalysisManager &analysisManag…
42 llvm::CallInst *GetUpdatedCallInst(llvm::CallInst *call, const llvm::OperandBundleUse &bundle);
44 using EncodedDeoptBundle = llvm::SmallVector<llvm::Value *, 0>;
46 bool IsCaughtDeoptimization(llvm::ArrayRef<llvm::Use> inputs) const;
48 bool IsNoReturn(llvm::ArrayRef<llvm::Use> inputs) const;
50 …EncodedDeoptBundle EncodeDeoptBundle(llvm::CallInst *call, const llvm::OperandBundleUse &bundle) c…
[all …]
Dark_inlining.cpp19 #include <llvm/Analysis/InlineAdvisor.h>
20 #include <llvm/Analysis/ReplayInlineAdvisor.h>
22 #include <llvm/IR/InstIterator.h>
23 #include <llvm/IR/Instructions.h>
24 #include <llvm/IR/IntrinsicInst.h>
25 #include <llvm/Demangle/Demangle.h>
40 auto inlineParams = llvm::getInlineParams(INLINING_THRESHOLD); in Create()
45 llvm::PreservedAnalyses InlinePrepare::run(llvm::Module &module, llvm::ModuleAnalysisManager &modul… in run()
47 auto &advisorResult = moduleAm.getResult<llvm::InlineAdvisorAnalysis>(module); in run()
49 … inlineParams_, llvm::InliningAdvisorMode::Default, {}, // CC-OFF(G.FMT.06-CPP) project code style in run()
[all …]
Dexpand_atomics.cpp20 #include <llvm/ADT/STLExtras.h>
21 #include <llvm/IR/Instructions.h>
29 llvm::PreservedAnalyses ExpandAtomics::run(llvm::Function &function, in run()
30 … [[maybe_unused]] llvm::FunctionAnalysisManager &analysisManager) in run()
34 if (llvm::Triple {function.getParent()->getTargetTriple()}.getArch() != llvm::Triple::x86_64) { in run()
35 return llvm::PreservedAnalyses::all(); in run()
39 llvm::SmallVector<llvm::Instruction *> instructions; in run()
52 return changed ? llvm::PreservedAnalyses::none() : llvm::PreservedAnalyses::all(); in run()
55 bool ExpandAtomics::InsertAddrSpaceCast(llvm::Instruction *atomicInstruction) in InsertAddrSpaceCast()
58 if (llvm::isa<llvm::FenceInst>(atomicInstruction)) { in InsertAddrSpaceCast()
[all …]
Dark_gvn.h19 #include <llvm/IR/PassManager.h>
25 namespace llvm {
27 } // namespace llvm
35 class ArkGVN : public llvm::PassInfoMixin<ArkGVN> {
46llvm::PreservedAnalyses run(llvm::Function &function, llvm::FunctionAnalysisManager &analysisManag…
59 llvm::SmallVector<llvm::Value *, 2U> args;
60 // To store as a key in llvm::SmallDenseMap
82 return static_cast<unsigned>(llvm::hash_combine( in getHashValue()
83llvm::hash_value(key.builtinTy), llvm::hash_combine_range(key.args.begin(), key.args.end()))); in getHashValue()
93 using LocalTable = llvm::SmallDenseMap<BuiltinKey, llvm::Value *, 4U, MapInfo>;
[all …]
Dloop_peeling.cpp18 #include <llvm/Analysis/LoopInfo.h>
19 #include <llvm/Analysis/MemoryBuiltins.h>
20 #include <llvm/IR/Dominators.h>
21 #include <llvm/IR/Operator.h>
22 #include <llvm/Support/KnownBits.h>
23 #include <llvm/Transforms/Utils/LoopPeel.h>
30 // Peel only loops with llvm.experimental.deoptimize calls
32 static llvm::cl::opt<bool> g_deoptimizeOnly("ark-loop-peeling-deoptimize-only", llvm::cl::Hidden, l…
36 llvm::PreservedAnalyses ArkLoopPeeling::run(llvm::Loop &loop, in run()
37 … [[maybe_unused]] llvm::LoopAnalysisManager &analysisManager, in run()
[all …]
Dintrinsics_lowering.h23 #include <llvm/IR/Intrinsics.h>
24 #include <llvm/IR/PassManager.h>
30 namespace llvm {
33 } // namespace llvm
37 class IntrinsicsLowering : public llvm::PassInfoMixin<IntrinsicsLowering> {
50llvm::PreservedAnalyses run(llvm::Function &function, llvm::FunctionAnalysisManager &analysisManag…
53 bool ReplaceWithLLVMIntrinsic(llvm::CallInst *call, llvm::Intrinsic::ID intrinsicId);
55 void HandleMemCall(llvm::CallInst *call, llvm::FunctionCallee callee,
56 … std::unordered_map<llvm::Instruction *, llvm::Instruction *> *instToReplaceWithInst);
57 bool HandleCall(llvm::CallInst *call, LLVMArkInterface::IntrinsicId intrinsicId,
[all …]
Dcheck_tail_calls.cpp17 #include <llvm/CodeGen/TargetInstrInfo.h>
18 #include <llvm/CodeGen/MachineFunctionPass.h>
19 #include <llvm/IR/Instructions.h>
35 explicit ScopedSetElement(llvm::SmallPtrSetImpl<T> *set, T value) : set_(set), value_(value) in ScopedSetElement()
53 llvm::SmallPtrSetImpl<T> *set_;
57 using VisitedBasicBlocks = llvm::SmallPtrSet<llvm::MachineBasicBlock *, 4U>;
61 // should be tail calls to avoid miscompilation). `CheckTailCallsPass` checks that llvm was able to…
63 class CheckTailCallsPass : public llvm::MachineFunctionPass {
65 static constexpr llvm::StringRef PASS_NAME = "Check ARK Tail Calls";
66 static constexpr llvm::StringRef ARG_NAME = "check-ark-tail-calls";
[all …]
/arkcompiler/runtime_core/static_core/libllvmbackend/templates/
Dintrinsics_gen.inl.erb17 llvm::FunctionType *GetIntrinsicDeclaration(llvm::LLVMContext &ctx, ark::compiler::RuntimeInterface…
22 …return llvm::FunctionType::get(llvm::Type::getDoubleTy(ctx), {llvm::Type::getDoubleTy(ctx), llvm::…
24 …return llvm::FunctionType::get(llvm::Type::getFloatTy(ctx), {llvm::Type::getFloatTy(ctx), llvm::Ty…
26 …return llvm::FunctionType::get(llvm::Type::getDoubleTy(ctx), {llvm::Type::getDoubleTy(ctx), llvm::…
28 …return llvm::FunctionType::get(llvm::Type::getFloatTy(ctx), {llvm::Type::getFloatTy(ctx), llvm::Ty…
30 …return llvm::FunctionType::get(llvm::Type::getDoubleTy(ctx), {llvm::Type::getDoubleTy(ctx)}, false…
32 … return llvm::FunctionType::get(llvm::Type::getFloatTy(ctx), {llvm::Type::getFloatTy(ctx)}, false);
35 return llvm::FunctionType::get(llvm::Type::getVoidTy(ctx),
36 …{llvm::PointerType::get(ctx, 0), llvm::PointerType::get(ctx, 0), llvm::Type::getInt64Ty(ctx)}, fal…
38 return llvm::FunctionType::get(llvm::Type::getVoidTy(ctx),
[all …]
/arkcompiler/runtime_core/static_core/libllvmbackend/lowering/
Dllvm_ir_constructor.h26 #include <llvm/IR/Function.h>
27 #include <llvm/IR/IRBuilder.h>
83 llvm::Value *GetMappedValue(Inst *inst, DataType::Type type);
84 llvm::Value *GetInputValue(Inst *inst, size_t index, bool skipCoerce = false);
85 llvm::Value *GetInputValueFromConstant(ConstantInst *constant, DataType::Type pandaType);
87 llvm::FunctionType *GetFunctionTypeForCall(T *inst);
94 llvm::Function *GetFunc() in GetFunc()
99 llvm::IRBuilder<> *GetBuilder() in GetBuilder()
117 llvm::CallInst *CreateEntrypointCall(RuntimeInterface::EntrypointId eid, Inst *inst,
118 llvm::ArrayRef<llvm::Value *> args = llvm::None);
[all …]
/arkcompiler/runtime_core/static_core/libllvmbackend/transforms/
Dbuiltins.cpp26 #include <llvm/IR/DebugInfoMetadata.h>
27 #include <llvm/IR/MDBuilder.h>
28 #include <llvm/ADT/SmallVector.h>
29 #include <llvm/Transforms/Utils/BasicBlockUtils.h>
39 llvm::CallInst *CreateEntrypointCallHelper(llvm::IRBuilder<> *builder, ark::compiler::RuntimeInterf… in CreateEntrypointCallHelper()
40llvm::ArrayRef<llvm::Value *> arguments, LLVMArkInterface *arkInterface, in CreateEntrypointCallHelper()
41 llvm::CallInst *inst) in CreateEntrypointCallHelper()
54 llvm::Value *PostWRBHelper(llvm::IRBuilder<> *builder, llvm::CallInst *inst, LLVMArkInterface *arkI… in PostWRBHelper()
65 llvm::Value *FastClassLoadingHelper(llvm::IRBuilder<> *builder, LLVMArkInterface *arkInterface, in FastClassLoadingHelper()
66 llvm::BasicBlock *continuation) in FastClassLoadingHelper()
[all …]
Druntime_calls.h19 #include <llvm/IR/Function.h>
20 #include <llvm/IR/Instructions.h>
21 #include <llvm/IR/IRBuilder.h>
31 llvm::Value *GetAddressToTLS(llvm::IRBuilder<> *builder, LLVMArkInterface *arkInterface, uintptr_t …
32 llvm::Value *LoadTLSValue(llvm::IRBuilder<> *builder, LLVMArkInterface *arkInterface, uintptr_t tls…
33 llvm::Type *type);
35 llvm::FunctionCallee GetPandaRuntimeFunctionCallee(int entrypoint, llvm::FunctionType *functionProt…
36llvm::IRBuilder<> *builder, llvm::StringRef prefix = "");
39 llvm::CallInst *CreateEntrypointCallCommon(llvm::IRBuilder<> *builder, llvm::Value *threadRegValue,
41 llvm::ArrayRef<llvm::Value *> arguments = llvm::None,
[all …]
Dgc_utils.cpp21 constexpr llvm::StringRef MD_NON_MOVABLE = "non-movable";
26 bool IsDerived(llvm::Value *val) in IsDerived()
33 DerivedStatus IsDerivedImpl(llvm::Value *val, llvm::SmallSet<llvm::Value *, 8U> *visited) in IsDerivedImpl()
35 auto phi = llvm::dyn_cast<llvm::PHINode>(val); in IsDerivedImpl()
39 llvm::SmallSet<llvm::Value *, 8U> lvis; in IsDerivedImpl()
44 auto select = llvm::dyn_cast<llvm::SelectInst>(val); in IsDerivedImpl()
57 // NOTE: Workaround for situation when llvm do the following during optimization pipeline: in IsDerivedImpl()
59 if (auto *constantExpr = llvm::dyn_cast<llvm::ConstantExpr>(val)) { in IsDerivedImpl()
60 if (constantExpr->getOpcode() == llvm::Instruction::IntToPtr) { in IsDerivedImpl()
64 if (llvm::isa<llvm::IntToPtrInst>(val)) { in IsDerivedImpl()
[all …]
Dbuiltins.h19 #include <llvm/ADT/Triple.h>
20 #include <llvm/IR/IRBuilder.h>
27 llvm::Function *LenArray(llvm::Module *module);
28 llvm::Function *LoadClass(llvm::Module *module);
29 llvm::Function *LoadInitClass(llvm::Module *module);
30 llvm::Function *PreWRB(llvm::Module *module, unsigned addrSpace);
31 llvm::Function *PostWRB(llvm::Module *module, unsigned addrSpace);
32 llvm::Function *LoadString(llvm::Module *module);
33 llvm::Function *ResolveVirtual(llvm::Module *module);
34 llvm::Function *BarrierReturnVoid(llvm::Module *module);
[all …]
Dgc_utils.h21 #include <llvm/ADT/SmallSet.h>
22 #include <llvm/IR/Function.h>
23 #include <llvm/IR/Type.h>
24 #include <llvm/IR/Instructions.h>
29 bool IsDerived(llvm::Value *val);
30 DerivedStatus IsPHIDerived(llvm::PHINode *phi, llvm::SmallSet<llvm::Value *, 8U> *visited);
31 DerivedStatus IsDerivedImpl(llvm::Value *val, llvm::SmallSet<llvm::Value *, 8U> *visited = nullptr);
32 bool HasBeenGcRef(const llvm::Value *val, bool any = true);
33 void MarkAsNonMovable(llvm::Instruction *instruction);
34 bool IsNonMovable(const llvm::Value *value);
[all …]
Druntime_calls.cpp20 #include <llvm/IR/IRBuilder.h>
24 llvm::Value *GetAddressToTLS(llvm::IRBuilder<> *builder, LLVMArkInterface *arkInterface, uintptr_t … in GetAddressToTLS()
31 llvm::Value *LoadTLSValue(llvm::IRBuilder<> *builder, LLVMArkInterface *arkInterface, uintptr_t tls… in LoadTLSValue()
32 llvm::Type *type) in LoadTLSValue()
38 llvm::FunctionCallee GetPandaRuntimeFunctionCallee(int entrypoint, llvm::FunctionType *functionProt… in GetPandaRuntimeFunctionCallee()
39llvm::IRBuilder<> *builder, llvm::StringRef prefix) in GetPandaRuntimeFunctionCallee()
43 auto arrayType = llvm::ArrayType::get(builder->getInt64Ty(), 0); in GetPandaRuntimeFunctionCallee()
46 …auto calleePointer = builder->CreateIntToPtr(entrypointAddress, llvm::PointerType::get(functionPro… in GetPandaRuntimeFunctionCallee()
47 return llvm::FunctionCallee(functionProto, calleePointer); in GetPandaRuntimeFunctionCallee()
50 llvm::CallInst *CreateEntrypointCallCommon(llvm::IRBuilder<> *builder, llvm::Value *threadRegValue, in CreateEntrypointCallCommon()
[all …]
/arkcompiler/runtime_core/static_core/libllvmbackend/
Dllvm_ark_interface.h22 #include <llvm/ADT/DenseMap.h>
23 #include <llvm/ADT/Triple.h>
24 #include <llvm/ADT/StringMap.h>
25 #include <llvm/IR/IRBuilder.h>
26 #include <llvm/IR/ValueMap.h>
27 #include <llvm/IR/Instructions.h>
28 #include <llvm/IR/Intrinsics.h>
29 #include <llvm/IR/IntrinsicInst.h>
30 #include <llvm/Support/AtomicOrdering.h>
31 #include <llvm/Support/Mutex.h>
[all …]
Dllvmbackend.yaml15 name: llvm
17 description: LLVM AOT compiler for panda
20 - name: llvm-allow-breakage
23 description: Skip errors during LLVM IR generation
24 - name: llvm-fallback
28 - name: llvm-inlining
35 - name: llvm-pre-opt
40 0 means running small number of Ark passes before compiling by LLVM.
43 - name: llvm-recursive-inlining
47 - name: llvm-dump-before
[all …]

12345678910>>...13