source: icGREP/icgrep-devel/icgrep/u8u16.cpp @ 5267

Last change on this file since 5267 was 5267, checked in by nmedfort, 3 years ago

Code clean-up. Removed Pablo Call, SetIthBit? and Prototype.

File size: 19.2 KB
Line 
1/*
2 *  Copyright (c) 2016 International Characters.
3 *  This software is licensed to the public under the Open Software License 3.0.
4 *  icgrep is a trademark of International Characters.
5 */
6
7#include <IR_Gen/idisa_builder.h>                  // for IDISA_Builder
8#include <IR_Gen/idisa_target.h>                   // for GetIDISA_Builder
9#include <cc/cc_compiler.h>                        // for CC_Compiler
10#include <kernels/deletion.h>                      // for DeletionKernel
11#include <kernels/mmap_kernel.h>                   // for MMapSourceKernel
12#include <kernels/p2s_kernel.h>                    // for P2S16KernelWithCom...
13#include <kernels/s2p_kernel.h>                    // for S2PKernel
14#include <kernels/stdout_kernel.h>                 // for StdOutKernel
15#include <llvm/ExecutionEngine/ExecutionEngine.h>  // for ExecutionEngine
16#include <llvm/IR/Function.h>                      // for Function, Function...
17#include <llvm/IR/Module.h>                        // for Module
18#include <llvm/IR/Verifier.h>                      // for verifyModule
19#include <llvm/Support/CommandLine.h>              // for ParseCommandLineOp...
20#include <llvm/Support/Debug.h>                    // for dbgs
21#include <pablo/pablo_kernel.h>                    // for PabloKernel
22#include <pablo/pablo_toolchain.h>                 // for pablo_function_passes
23#include <pablo/pe_zeroes.h>
24#include <toolchain.h>                             // for JIT_to_ExecutionEn...
25#include <boost/iostreams/device/mapped_file.hpp>  // for mapped_file_source
26#include <boost/filesystem.hpp>
27#include <boost/interprocess/anonymous_shared_memory.hpp>
28#include "kernels/streamset.h"                     // for CircularBuffer
29#include <kernels/pipeline.h>
30#include "llvm/ADT/StringRef.h"                    // for StringRef
31#include "llvm/IR/CallingConv.h"                   // for ::C
32#include "llvm/IR/DerivedTypes.h"                  // for ArrayType, Pointer...
33#include "llvm/IR/LLVMContext.h"                   // for LLVMContext
34#include "llvm/IR/Value.h"                         // for Value
35#include "llvm/Support/Compiler.h"                 // for LLVM_UNLIKELY
36#include <pablo/builder.hpp>                       // for PabloBuilder
37#include <iostream>
38
39using namespace pablo;
40using namespace kernel;
41using namespace parabix;
42using namespace llvm;
43
44static cl::OptionCategory u8u16Options("u8u16 Options", "Transcoding control options.");
45static cl::list<std::string> inputFiles(cl::Positional, cl::desc("<input file ...>"), cl::OneOrMore, cl::cat(u8u16Options));
46static cl::opt<bool> segmentPipelineParallel("enable-segment-pipeline-parallel", cl::desc("Enable multithreading with segment pipeline parallelism."), cl::cat(u8u16Options));
47static cl::opt<bool> mMapBuffering("mmap-buffering", cl::desc("Enable mmap buffering."), cl::cat(u8u16Options));
48static cl::opt<bool> memAlignBuffering("memalign-buffering", cl::desc("Enable posix_memalign buffering."), cl::cat(u8u16Options));
49
50
51void u8u16_pablo(PabloKernel * kernel) {
52    //  input: 8 basis bit streams
53    //  output: 16 u8-indexed streams, + delmask stream + error stream
54
55    cc::CC_Compiler ccc(kernel);
56   
57    PabloBuilder & main = ccc.getBuilder();
58    const auto u8_bits = ccc.getBasisBits();
59
60    Zeroes * zeroes = main.createZeroes();
61
62    // Outputs
63    Var * u16_hi[8];
64    for (int i = 0; i < 8; ++i) {
65        u16_hi[i] = main.createVar("u16_hi" + std::to_string(i), zeroes);
66    }
67    Var * u16_lo[8];
68    for (int i = 0; i < 8; ++i) {
69        u16_lo[i] = main.createVar("u16_lo" + std::to_string(i), zeroes);
70    }
71    Var * delmask = main.createVar("delmask", zeroes);
72    Var * error_mask = main.createVar("error_mask", zeroes);
73
74    // The logic for processing non-ASCII bytes will be embedded within an if-hierarchy.
75    PabloAST * nonASCII = ccc.compileCC(re::makeCC(0x80, 0xFF));
76   
77    // Builder for the if statement handling all non-ASCII logic
78    PabloBuilder nAb = PabloBuilder::Create(main);
79    // Bits 3 through 7 of a 2-byte prefix are data bits, needed to
80    // produce the UTF-16 code unit data ...,
81    PabloAST * bit3a1 = nAb.createAdvance(u8_bits[3], 1);
82    PabloAST * bit4a1 = nAb.createAdvance(u8_bits[4], 1);
83    PabloAST * bit5a1 = nAb.createAdvance(u8_bits[5], 1);
84    PabloAST * bit6a1 = nAb.createAdvance(u8_bits[6], 1);
85    PabloAST * bit7a1 = nAb.createAdvance(u8_bits[7], 1);
86   
87    // Entry condition for 3 or 4 byte sequences: we have a prefix byte in the range 0xE0-0xFF.
88    PabloAST * pfx34 = ccc.compileCC(re::makeCC(0xE0, 0xFF), nAb);
89    // Builder for the if statement handling all logic for 3- and 4-byte sequences.
90    PabloBuilder p34b = PabloBuilder::Create(nAb);
91    // Bits 4 through 7 of a 3-byte prefix are data bits.  They must be moved
92    // to the final position of the 3-byte sequence.
93    PabloAST * bit2a1 = p34b.createAdvance(u8_bits[2], 1);
94    PabloAST * bit4a2 = p34b.createAdvance(bit4a1, 1);
95    PabloAST * bit5a2 = p34b.createAdvance(bit5a1, 1);
96    PabloAST * bit6a2 = p34b.createAdvance(bit6a1, 1);
97    PabloAST * bit7a2 = p34b.createAdvance(bit7a1, 1);
98
99
100    Var * const u8scope32 = nAb.createVar("u8scope32", zeroes);
101    Var * const u8scope33 = nAb.createVar("u8scope33", zeroes);
102    Var * const u8scope44 = nAb.createVar("u8scope44", zeroes);
103
104    //
105    // Logic for 4-byte UTF-8 sequences
106    //
107    // Entry condition  or 4 byte sequences: we have a prefix byte in the range 0xF0-0xFF.
108    PabloAST * pfx4 = ccc.compileCC(re::makeCC(0xF0, 0xFF), p34b);
109    // Builder for the if statement handling all logic for 4-byte sequences only.
110    PabloBuilder p4b = PabloBuilder::Create(p34b);
111    // Illegal 4-byte sequences
112    PabloAST * F0 = ccc.compileCC(re::makeCC(0xF0), p4b);
113    PabloAST * F4 = ccc.compileCC(re::makeCC(0xF4), p4b);
114    PabloAST * F0_err = p4b.createAnd(p4b.createAdvance(F0, 1), ccc.compileCC(re::makeCC(0x80, 0x8F), p4b));
115    PabloAST * F4_err = p4b.createAnd(p4b.createAdvance(F4, 1), ccc.compileCC(re::makeCC(0x90, 0xBF), p4b));
116    PabloAST * F5_FF = ccc.compileCC(re::makeCC(0xF5, 0xFF), p4b);
117
118    Var * FX_err = p34b.createVar("FX_err", zeroes);
119    p4b.createAssign(FX_err, p4b.createOr(F5_FF, p4b.createOr(F0_err, F4_err)));
120    //
121    // 4-byte prefixes have a scope that extends over the next 3 bytes.
122
123    Var * u8scope42 = p34b.createVar("u8scope42", zeroes);
124    Var * u8scope43 = p34b.createVar("u8scope43", zeroes);
125
126    p4b.createAssign(u8scope42, p4b.createAdvance(pfx4, 1));
127    p4b.createAssign(u8scope43, p4b.createAdvance(u8scope42, 1));
128    p4b.createAssign(u8scope44, p4b.createAdvance(u8scope43, 1));
129    //
130   
131    //  From the 4-byte sequence 11110abc 10defghi 10jklmno 10pqrstu,
132    //  we must calculate the value abcde - 1 to produce the bit values
133    //  for u16_hi6, hi7, lo0, lo1 at the scope43 position.
134    Var * s43_lo0 = nAb.createVar("scope43_lo0", zeroes);
135    Var * s43_lo1 = nAb.createVar("scope43_lo1", zeroes);
136    Var * s43_hi6 = nAb.createVar("scope43_hi6", zeroes);
137    Var * s43_hi7 = nAb.createVar("scope43_hi7", zeroes);
138
139    Var * s43_lo2 = main.createVar("scope43_lo2", zeroes);
140    Var * s43_lo3 = main.createVar("scope43_lo3", zeroes);
141    Var * s43_lo4 = main.createVar("scope43_lo4", zeroes);
142    Var * s43_lo5 = main.createVar("scope43_lo5", zeroes);
143    Var * s43_lo6 = main.createVar("scope43_lo6", zeroes);
144    Var * s43_lo7 = main.createVar("scope43_lo7", zeroes);
145
146    p4b.createAssign(s43_lo1, p4b.createAnd(u8scope43, p4b.createNot(bit3a1)));           // e - 1
147    p4b.createAssign(s43_lo0, p4b.createAnd(u8scope43, p4b.createXor(bit2a1, s43_lo1)));  // d - borrow
148    PabloAST * brw1 = p4b.createAnd(s43_lo1, p4b.createNot(bit2a1));
149    p4b.createAssign(s43_hi7, p4b.createAnd(u8scope43, p4b.createXor(bit7a2, brw1)));     // c - borrow
150    PabloAST * brw2 = p4b.createAnd(brw1, p4b.createNot(bit7a2));
151    p4b.createAssign(s43_hi6, p4b.createAnd(u8scope43, p4b.createXor(bit6a2, brw2)));     // b - borrow
152    //
153    p4b.createAssign(s43_lo2, p4b.createAnd(u8scope43, bit4a1));
154    p4b.createAssign(s43_lo3, p4b.createAnd(u8scope43, bit5a1));
155    p4b.createAssign(s43_lo4, p4b.createAnd(u8scope43, bit6a1));
156    p4b.createAssign(s43_lo5, p4b.createAnd(u8scope43, bit7a1));
157    p4b.createAssign(s43_lo6, p4b.createAnd(u8scope43, u8_bits[2]));
158    p4b.createAssign(s43_lo7, p4b.createAnd(u8scope43, u8_bits[3]));
159    //
160    //
161    p34b.createIf(pfx4, p4b);
162    //
163    // Combined logic for 3 and 4 byte sequences
164    //
165    PabloAST * pfx3 = ccc.compileCC(re::makeCC(0xE0, 0xEF), p34b);
166
167    p34b.createAssign(u8scope32, p34b.createAdvance(pfx3, 1));
168    p34b.createAssign(u8scope33, p34b.createAdvance(u8scope32, 1));
169
170    // Illegal 3-byte sequences
171    PabloAST * E0 = ccc.compileCC(re::makeCC(0xE0), p34b);
172    PabloAST * ED = ccc.compileCC(re::makeCC(0xED), p34b);
173    PabloAST * E0_err = p34b.createAnd(p34b.createAdvance(E0, 1), ccc.compileCC(re::makeCC(0x80, 0x9F), p34b));
174    PabloAST * ED_err = p34b.createAnd(p34b.createAdvance(ED, 1), ccc.compileCC(re::makeCC(0xA0, 0xBF), p34b));
175    Var * EX_FX_err = nAb.createVar("EX_FX_err", zeroes);
176
177    p34b.createAssign(EX_FX_err, p34b.createOr(p34b.createOr(E0_err, ED_err), FX_err));
178    // Two surrogate UTF-16 units are computed at the 3rd and 4th positions of 4-byte sequences.
179    PabloAST * surrogate = p34b.createOr(u8scope43, u8scope44);
180   
181    Var * p34del = nAb.createVar("p34del", zeroes);
182    p34b.createAssign(p34del, p34b.createOr(u8scope32, u8scope42));
183
184
185    // The high 5 bits of the UTF-16 code unit are only nonzero for 3 and 4-byte
186    // UTF-8 sequences.
187    p34b.createAssign(u16_hi[0], p34b.createOr(p34b.createAnd(u8scope33, bit4a2), surrogate));
188    p34b.createAssign(u16_hi[1], p34b.createOr(p34b.createAnd(u8scope33, bit5a2), surrogate));
189    p34b.createAssign(u16_hi[2], p34b.createAnd(u8scope33, bit6a2));
190    p34b.createAssign(u16_hi[3], p34b.createOr(p34b.createAnd(u8scope33, bit7a2), surrogate));
191    p34b.createAssign(u16_hi[4], p34b.createOr(p34b.createAnd(u8scope33, bit2a1), surrogate));
192   
193    //
194    nAb.createIf(pfx34, p34b);
195    //
196    // Combined logic for 2, 3 and 4 byte sequences
197    //
198
199    Var * u8lastscope = main.createVar("u8lastscope", zeroes);
200
201    PabloAST * pfx2 = ccc.compileCC(re::makeCC(0xC0, 0xDF), nAb);
202    PabloAST * u8scope22 = nAb.createAdvance(pfx2, 1);
203    nAb.createAssign(u8lastscope, nAb.createOr(u8scope22, nAb.createOr(u8scope33, u8scope44)));
204    PabloAST * u8anyscope = nAb.createOr(u8lastscope, p34del);
205
206    PabloAST * C0_C1_err = ccc.compileCC(re::makeCC(0xC0, 0xC1), nAb);
207    PabloAST * scope_suffix_mismatch = nAb.createXor(u8anyscope, ccc.compileCC(re::makeCC(0x80, 0xBF), nAb));
208    nAb.createAssign(error_mask, nAb.createOr(scope_suffix_mismatch, nAb.createOr(C0_C1_err, EX_FX_err)));
209    nAb.createAssign(delmask, nAb.createOr(p34del, ccc.compileCC(re::makeCC(0xC0, 0xFF), nAb)));
210   
211    // The low 3 bits of the high byte of the UTF-16 code unit as well as the high bit of the
212    // low byte are only nonzero for 2, 3 and 4 byte sequences.
213    nAb.createAssign(u16_hi[5], nAb.createOr(nAb.createAnd(u8lastscope, bit3a1), u8scope44));
214    nAb.createAssign(u16_hi[6], nAb.createOr(nAb.createAnd(u8lastscope, bit4a1), s43_hi6));
215    nAb.createAssign(u16_hi[7], nAb.createOr(nAb.createAnd(u8lastscope, bit5a1), s43_hi7));
216    nAb.createAssign(u16_lo[0], nAb.createOr(nAb.createAnd(u8lastscope, bit6a1), s43_lo0));
217
218    Var * p234_lo1 = main.createVar("p234_lo1", zeroes);
219
220    nAb.createAssign(p234_lo1, nAb.createOr(nAb.createAnd(u8lastscope, bit7a1), s43_lo1));
221
222    main.createIf(nonASCII, nAb);
223    //
224    //
225    PabloAST * ASCII = ccc.compileCC(re::makeCC(0x0, 0x7F));
226    PabloAST * last_byte = main.createOr(ASCII, u8lastscope);
227    main.createAssign(u16_lo[1], main.createOr(main.createAnd(ASCII, u8_bits[1]), p234_lo1));
228    main.createAssign(u16_lo[2], main.createOr(main.createAnd(last_byte, u8_bits[2]), s43_lo2));
229    main.createAssign(u16_lo[3], main.createOr(main.createAnd(last_byte, u8_bits[3]), s43_lo3));
230    main.createAssign(u16_lo[4], main.createOr(main.createAnd(last_byte, u8_bits[4]), s43_lo4));
231    main.createAssign(u16_lo[5], main.createOr(main.createAnd(last_byte, u8_bits[5]), s43_lo5));
232    main.createAssign(u16_lo[6], main.createOr(main.createAnd(last_byte, u8_bits[6]), s43_lo6));
233    main.createAssign(u16_lo[7], main.createOr(main.createAnd(last_byte, u8_bits[7]), s43_lo7));
234   
235    Var * output = kernel->addOutput("output", kernel->getStreamSetTy(16));
236    Var * delmask_out = kernel->addOutput("delmask_out", kernel->getStreamSetTy());
237    Var * error_mask_out = kernel->addOutput("error_mask_out", kernel->getStreamSetTy());
238    for (unsigned i = 0; i < 8; i++) {
239        main.createAssign(main.createExtract(output, i), u16_hi[i]);
240    }
241    for (unsigned i = 0; i < 8; i++) {
242        main.createAssign(main.createExtract(output, i + 8), u16_lo[i]);
243    }
244    main.createAssign(main.createExtract(delmask_out, main.getInteger(0)), delmask);
245    main.createAssign(main.createExtract(error_mask_out,  main.getInteger(0)), error_mask);
246
247    pablo_function_passes(kernel);
248}
249
250Function * u8u16Pipeline(Module * mod, IDISA::IDISA_Builder * iBuilder) {
251
252    const unsigned segmentSize = codegen::SegmentSize;
253    const unsigned bufferSegments = codegen::BufferSegments;
254   
255    assert (iBuilder);
256
257    Type * const size_ty = iBuilder->getSizeTy();
258    Type * const voidTy = iBuilder->getVoidTy();
259    Type * const bitBlockType = iBuilder->getBitBlockType();
260    Type * const inputType = ArrayType::get(ArrayType::get(bitBlockType, 8), 1)->getPointerTo();
261    Type * const outputType = ArrayType::get(ArrayType::get(bitBlockType, 16), 1)->getPointerTo();
262   
263    Function * const main = cast<Function>(mod->getOrInsertFunction("Main", voidTy, inputType, outputType, size_ty, nullptr));
264    main->setCallingConv(CallingConv::C);
265    Function::arg_iterator args = main->arg_begin();
266   
267    Value * const inputStream = &*(args++);
268    inputStream->setName("inputStream");
269    Value * const outputStream = &*(args++);
270    outputStream->setName("outputStream");
271    Value * const fileSize = &*(args++);
272    fileSize->setName("fileSize");
273
274    ExternalFileBuffer ByteStream(iBuilder, iBuilder->getStreamSetTy(1, 8));
275
276    CircularBuffer BasisBits(iBuilder, iBuilder->getStreamSetTy(8), segmentSize * bufferSegments);
277
278    CircularBuffer U8u16Bits(iBuilder, iBuilder->getStreamSetTy(16), segmentSize * bufferSegments);
279    CircularBuffer DelMask(iBuilder, iBuilder->getStreamSetTy(), segmentSize * bufferSegments);
280    CircularBuffer ErrorMask(iBuilder, iBuilder->getStreamSetTy(), segmentSize * bufferSegments);
281
282    CircularBuffer U16Bits(iBuilder, iBuilder->getStreamSetTy(16), segmentSize * bufferSegments);
283   
284    CircularBuffer DeletionCounts(iBuilder, iBuilder->getStreamSetTy(), segmentSize * bufferSegments);
285
286    // Different choices for the output buffer depending on chosen option.
287    ExternalFileBuffer U16external(iBuilder, iBuilder->getStreamSetTy(1, 16));
288    LinearCopybackBuffer U16out(iBuilder, iBuilder->getStreamSetTy(16, 16), segmentSize * bufferSegments + 2);
289
290    MMapSourceKernel mmapK(iBuilder, segmentSize * bufferSegments); 
291    mmapK.generateKernel({}, {&ByteStream});
292    mmapK.setInitialArguments({fileSize});
293   
294    S2PKernel s2pk(iBuilder);
295
296    s2pk.generateKernel({&ByteStream}, {&BasisBits});
297
298    PabloKernel u8u16k(iBuilder, "u8u16");
299
300    u8u16_pablo(&u8u16k);
301
302    u8u16k.generateKernel({&BasisBits}, {&U8u16Bits, &DelMask, &ErrorMask});
303
304    DeletionKernel delK(iBuilder, iBuilder->getBitBlockWidth()/16, 16);
305    delK.generateKernel({&U8u16Bits, &DelMask}, {&U16Bits, &DeletionCounts});
306
307    P2S16KernelWithCompressedOutput p2sk(iBuilder);
308
309    StdOutKernel stdoutK(iBuilder, 16);
310
311    if (mMapBuffering || memAlignBuffering) {
312        p2sk.generateKernel({&U16Bits, &DeletionCounts}, {&U16external});
313        stdoutK.generateKernel({&U16external}, {});
314    } else {
315        p2sk.generateKernel({&U16Bits, &DeletionCounts}, {&U16out});
316        stdoutK.generateKernel({&U16out}, {});
317    }
318
319
320    iBuilder->SetInsertPoint(BasicBlock::Create(mod->getContext(), "entry", main,0));
321
322    ByteStream.setStreamSetBuffer(inputStream, fileSize);
323    BasisBits.allocateBuffer();
324    U8u16Bits.allocateBuffer();
325    DelMask.allocateBuffer();
326    ErrorMask.allocateBuffer();
327    U16Bits.allocateBuffer();
328    DeletionCounts.allocateBuffer();
329    if (mMapBuffering || memAlignBuffering) {
330        U16external.setEmptyBuffer(outputStream);
331    } else {
332        U16out.allocateBuffer();
333    }
334
335    if (segmentPipelineParallel){
336        generateSegmentParallelPipeline(iBuilder, {&mmapK, &s2pk, &u8u16k, &delK, &p2sk, &stdoutK});
337    } else {
338        generatePipelineLoop(iBuilder, {&mmapK, &s2pk, &u8u16k, &delK, &p2sk, &stdoutK});
339    }
340
341    iBuilder->CreateRetVoid();
342    return main;
343}
344
345
346
347
348
349typedef void (*u8u16FunctionType)(char * byte_data, char * output_data, size_t filesize);
350
351static ExecutionEngine * u8u16Engine = nullptr;
352
353u8u16FunctionType u8u16CodeGen(void) {
354    LLVMContext TheContext;                           
355    Module * M = new Module("u8u16", TheContext);
356    IDISA::IDISA_Builder * idb = IDISA::GetIDISA_Builder(M);
357
358    llvm::Function * main_IR = u8u16Pipeline(M, idb);
359   
360    verifyModule(*M, &dbgs());
361    u8u16Engine = JIT_to_ExecutionEngine(M);   
362    u8u16Engine->finalizeObject();
363
364    delete idb;
365    return reinterpret_cast<u8u16FunctionType>(u8u16Engine->getPointerToFunction(main_IR));
366}
367
368void u8u16(u8u16FunctionType fn_ptr, const std::string & fileName) {
369    std::string mFileName = fileName;
370    size_t fileSize;
371    char * fileBuffer;
372   
373    const boost::filesystem::path file(mFileName);
374    if (exists(file)) {
375        if (is_directory(file)) {
376            return;
377        }
378    } else {
379        std::cerr << "Error: cannot open " << mFileName << " for processing. Skipped.\n";
380        return;
381    }
382   
383    fileSize = file_size(file);
384    boost::iostreams::mapped_file_source mFile;
385    if (fileSize == 0) {
386        fileBuffer = nullptr;
387    }
388    else {
389        try {
390            mFile.open(mFileName);
391        } catch (std::exception &e) {
392            std::cerr << "Error: Boost mmap of " << mFileName << ": " << e.what() << std::endl;
393            return;
394        }
395        fileBuffer = const_cast<char *>(mFile.data());
396    }
397
398    if (mMapBuffering) {
399        boost::interprocess::mapped_region outputBuffer(boost::interprocess::anonymous_shared_memory(2*fileSize));
400        outputBuffer.advise(boost::interprocess::mapped_region::advice_willneed);
401        outputBuffer.advise(boost::interprocess::mapped_region::advice_sequential);
402        fn_ptr(fileBuffer, static_cast<char*>(outputBuffer.get_address()), fileSize);
403    }
404    else if (memAlignBuffering) {
405        char * outputBuffer;
406        const auto r = posix_memalign(reinterpret_cast<void **>(&outputBuffer), 32, 2*fileSize);
407        if (LLVM_UNLIKELY(r != 0)) {
408            throw std::runtime_error("posix_memalign failed with return code " + std::to_string(r));
409        }
410        fn_ptr(fileBuffer, outputBuffer, fileSize);
411        free(reinterpret_cast<void *>(outputBuffer));
412    }
413    else {
414        /* No external output buffer */
415        fn_ptr(fileBuffer, nullptr, fileSize);
416    }
417    mFile.close();
418   
419}
420
421
422int main(int argc, char *argv[]) {
423    cl::HideUnrelatedOptions(ArrayRef<const cl::OptionCategory *>{&u8u16Options, pablo::pablo_toolchain_flags(), codegen::codegen_flags()});
424    cl::ParseCommandLineOptions(argc, argv);
425
426    u8u16FunctionType fn_ptr = u8u16CodeGen();
427
428    for (unsigned i = 0; i != inputFiles.size(); ++i) {
429        u8u16(fn_ptr, inputFiles[i]);
430    }
431
432    return 0;
433}
434
435                       
Note: See TracBrowser for help on using the repository browser.