diff options
author | Ayke van Laethem <[email protected]> | 2020-03-18 19:35:02 +0100 |
---|---|---|
committer | Ron Evans <[email protected]> | 2020-03-25 20:17:46 +0100 |
commit | 8ef921e028dc84e34e048cbfb3a0d875e369bd4a (patch) | |
tree | 47a011d9564a765130caf810c260f7567146df1c /compiler/llvm.go | |
parent | 315b0283175678621bc41b792cea535a351ee173 (diff) | |
download | tinygo-8ef921e028dc84e34e048cbfb3a0d875e369bd4a.tar.gz tinygo-8ef921e028dc84e34e048cbfb3a0d875e369bd4a.zip |
compiler: remove leftover code after refactor
A few functions were duplicated during the refactor. They can now be
deleted.
Diffstat (limited to 'compiler/llvm.go')
-rw-r--r-- | compiler/llvm.go | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/compiler/llvm.go b/compiler/llvm.go index ed5e00404..e69c62227 100644 --- a/compiler/llvm.go +++ b/compiler/llvm.go @@ -29,16 +29,6 @@ func getUses(value llvm.Value) []llvm.Value { // // This is useful for creating temporary allocas for intrinsics. Don't forget to // end the lifetime using emitLifetimeEnd after you're done with it. -func (c *Compiler) createTemporaryAlloca(t llvm.Type, name string) (alloca, bitcast, size llvm.Value) { - return llvmutil.CreateTemporaryAlloca(c.builder, c.mod, t, name) -} - -// createTemporaryAlloca creates a new alloca in the entry block and adds -// lifetime start infromation in the IR signalling that the alloca won't be used -// before this point. -// -// This is useful for creating temporary allocas for intrinsics. Don't forget to -// end the lifetime using emitLifetimeEnd after you're done with it. func (b *builder) createTemporaryAlloca(t llvm.Type, name string) (alloca, bitcast, size llvm.Value) { return llvmutil.CreateTemporaryAlloca(b.Builder, b.mod, t, name) } @@ -46,13 +36,6 @@ func (b *builder) createTemporaryAlloca(t llvm.Type, name string) (alloca, bitca // emitLifetimeEnd signals the end of an (alloca) lifetime by calling the // llvm.lifetime.end intrinsic. It is commonly used together with // createTemporaryAlloca. -func (c *Compiler) emitLifetimeEnd(ptr, size llvm.Value) { - llvmutil.EmitLifetimeEnd(c.builder, c.mod, ptr, size) -} - -// emitLifetimeEnd signals the end of an (alloca) lifetime by calling the -// llvm.lifetime.end intrinsic. It is commonly used together with -// createTemporaryAlloca. func (b *builder) emitLifetimeEnd(ptr, size llvm.Value) { llvmutil.EmitLifetimeEnd(b.Builder, b.mod, ptr, size) } @@ -60,23 +43,11 @@ func (b *builder) emitLifetimeEnd(ptr, size llvm.Value) { // emitPointerPack packs the list of values into a single pointer value using // bitcasts, or else allocates a value on the heap if it cannot be packed in the // pointer value directly. It returns the pointer with the packed data. -func (c *Compiler) emitPointerPack(values []llvm.Value) llvm.Value { - return llvmutil.EmitPointerPack(c.builder, c.mod, c.Config, values) -} - -// emitPointerPack packs the list of values into a single pointer value using -// bitcasts, or else allocates a value on the heap if it cannot be packed in the -// pointer value directly. It returns the pointer with the packed data. func (b *builder) emitPointerPack(values []llvm.Value) llvm.Value { return llvmutil.EmitPointerPack(b.Builder, b.mod, b.Config, values) } // emitPointerUnpack extracts a list of values packed using emitPointerPack. -func (c *Compiler) emitPointerUnpack(ptr llvm.Value, valueTypes []llvm.Type) []llvm.Value { - return llvmutil.EmitPointerUnpack(c.builder, c.mod, ptr, valueTypes) -} - -// emitPointerUnpack extracts a list of values packed using emitPointerPack. func (b *builder) emitPointerUnpack(ptr llvm.Value, valueTypes []llvm.Type) []llvm.Value { return llvmutil.EmitPointerUnpack(b.Builder, b.mod, ptr, valueTypes) } |