Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing Functionality in LLVM C #53

Open
CodaFi opened this issue Jan 26, 2017 · 15 comments
Open

Missing Functionality in LLVM C #53

CodaFi opened this issue Jan 26, 2017 · 15 comments

Comments

@CodaFi
Copy link
Member

CodaFi commented Jan 26, 2017

This is a formatted list of APIs that cannot be wrapped or have been wrapped incorrectly in LLVM-C.
There is necessarily overlap between this and #51.

API

  • Everything in the C API that takes/returns raw C strings without taking/returning a length is wrong.
  • LLVMCallFrameAlignmentOfType is redundant.
  • LLVMThreadLocalMode should be called LLVMThreadLocalModel to match its cases (and the general usage of the term).
  • LLVMGetRelocationValueString should do... something. Returning the empty string is probably not the right behavior.
  • LLVMSetParamAlignment needs a getter
  • LLVMSetInstrParamAlignment needs a getter
  • (LLVMGetCurrentFunction?): A way to query the IRBuilder about the function it is currently building.
  • Support for the sanitizers needs to be moved out of the Go bindings and into the general bindings
  • LLVMAddAlias has a bizarre user model that requires the user pass a PointerType to the type they want just so the C bindings can strip off the pointer and the C++ API can put it back.
  • A wrapper type for defining an optimizer pass entirely in C is sorely needed.

Proposed API

Passes

There are ~140 passes defined by LLVM 4.0. Of those, we and LLVM-C wrap about 50.

  • AggressiveDCE
  • BitTrackingDCE
  • ArgumentPromotion
  • AlignmentFromAssumptions
  • BasicAAWrapper
  • SCEVAAWrapper
  • TypeBasedAAWrapper
  • ScopedNoAliasAAWrapper
  • BreakCriticalEdges
  • CFGSimplification
  • CFLAndersAAWrapper
  • CFLSteensAAWrapper
  • StructurizeCFG
  • ConstantMerge
  • ConstantPropagation
  • DeadArgElimination
  • DeadInstElimination
  • DeadStoreElimination
  • FunctionInlining
  • GlobalDCE
  • GlobalOptimizer
  • GlobalsAAWrapper
  • IPConstantPropagation
  • IPSCCP
  • IndVarSimplify
  • InstructionCombining
  • Internalize
  • LCSSA
  • LICM
  • LoopExtractor
  • LoopInterchange
  • LoopStrengthReduce
  • LoopReroll
  • LoopUnroll
  • LoopUnrollAndJam
  • LoopUnswitch
  • LoopVersioningLICM
  • LoopIdiom
  • LoopRotate
  • LowerExpectIntrinsic
  • LowerSwitch
  • PromoteMemoryToRegister
  • DemoteRegisterToMemory
  • PruneEH
  • Reassociate
  • SROA
  • StripSymbols
  • StripNonDebugSymbols
  • StripDeadDebugInfo
  • StripDeadPrototypes
  • TailCallElimination
  • JumpThreading
  • EarlyCSE
  • GVN
  • NewGVN
  • LoopDeletion
  • InstructionNamer
  • MetaRenamer
  • MergeFunctions
  • CorrelatedValuePropagation
  • LoopVectorize
  • SLPVectorizer
  • BBVectorize
  • PartiallyInlineLibCalls
  • Scalarizer
  • SeparateConstOffsetFromGEP
  • StraightLineStrengthReduce

Function Passes

  • ObjCARCAAWrapper
  • ObjCARCAPElim
  • ObjCARCExpand
  • ObjCARCContract
  • ObjCARCOpt

Legacy Passes

  • BoundsChecking
  • LibCallsShrinkWrap
  • PGOInstrumentationGenLegacy
  • PGOInstrumentationUseLegacy
  • PGOIndirectCallPromotionLegacy
  • InstructionSimplifier
  • NaryReassociate
  • EliminateAvailableExternally
  • LoadStoreVectorizer
  • SpeculativeExecution
  • SpeculativeExecutionIfHasBranchDivergence
  • GVNHoist
  • SCCP
  • Sinking
  • LowerInvoke
  • InductiveRangeCheckElimination
  • MergedLoadStoreMotion
  • LoopSink
  • GuardWidening
  • DeadCodeElimination
  • LoopPredication
  • AlwaysInlinerLegacy
  • InstrProfilingLegacy
  • FunctionImport
  • DivergenceAnalysis
  • ConstantHoisting
  • PostOrderFunctionAttrsLegacy
  • ReversePostOrderFunctionAttrs
  • CostModelAnalysis
  • DependenceAnalysisWrapper
  • Float2Int
  • RewriteSymbols
  • PartialInlining
  • MemCpyOpt
  • CodeGenPrepare

Future Passes

  • UnifyFunctionExitNodes
  • SafeStack
  • LowerAtomic
  • LoopSimplify
  • LoopSimplifyCFG
  • AAEval

Printers/Informative Passes

  • DomOnlyPrinter
  • DomPrinter
  • DomOnlyViewer
  • DomViewer
  • MemDerefPrinter
  • MemDepPrinter
  • PostDomOnlyPrinter
  • PostDomPrinter
  • PostDomOnlyViewer
  • PostDomViewer
  • RegionOnlyPrinter
  • RegionOnlyViewer
  • RegionPrinter
  • RegionViewer
  • Lint
  • ModuleDebugInfoPrinter
  • CallGraphDOTPrinter
  • CallGraphViewer
  • PrintModulePass(os)
  • PrintFunctionPass(os)
  • PrintBasicBlockPass(os)
  • GCOVProfiler
  • RegionInfo
  • SingleLoopExtractor
  • PostDomTree
  • InstCount
  • LazyValueInfo
  • PAEval
@CodaFi
Copy link
Member Author

CodaFi commented Mar 14, 2018

@CodaFi
Copy link
Member Author

CodaFi commented Mar 14, 2018

@CodaFi
Copy link
Member Author

CodaFi commented Mar 14, 2018

@CodaFi
Copy link
Member Author

CodaFi commented Mar 14, 2018

@CodaFi
Copy link
Member Author

CodaFi commented Apr 6, 2018

@CodaFi
Copy link
Member Author

CodaFi commented Apr 6, 2018

@CodaFi
Copy link
Member Author

CodaFi commented May 13, 2018

@CodaFi
Copy link
Member Author

CodaFi commented May 15, 2018

@CodaFi
Copy link
Member Author

CodaFi commented Sep 28, 2018

@CodaFi
Copy link
Member Author

CodaFi commented Oct 23, 2018

@CodaFi
Copy link
Member Author

CodaFi commented Dec 31, 2018

@CodaFi
Copy link
Member Author

CodaFi commented Dec 31, 2018

@CodaFi
Copy link
Member Author

CodaFi commented Jan 3, 2019

@CodaFi
Copy link
Member Author

CodaFi commented Jan 3, 2019

@CodaFi
Copy link
Member Author

CodaFi commented Mar 21, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant