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

masterThesis #1

Open
wants to merge 107 commits into
base: master
Choose a base branch
from
Open

masterThesis #1

wants to merge 107 commits into from

Commits on Apr 17, 2023

  1. Configuration menu
    Copy the full SHA
    115a75a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    473928e View commit details
    Browse the repository at this point in the history
  3. writer: don't (re)declare function arguments

    void foo(int a) {
    	int a; // remove this line
    }
    vmihalko committed Apr 17, 2023
    Configuration menu
    Copy the full SHA
    9408012 View commit details
    Browse the repository at this point in the history
  4. test: change the way of csmith testing

    1. generate random test.c file [csmith]
    2. compile test.c to binary [clang]
    3. modify generated test.c file [fix-csmi.sh]
    	- Here we replace csmith.h header with
    	  necessery stuff to avoid header expansion
    	  while compiling to llvm in next step
    4. compile to LLVMIR test.ll [clang]
    5. run llvm2c and generate decompiled.c [llvm2c]
    6. modify decompiled.c file [decom-fix-csmi.sh]
    	- Here we add csmith.h include and fix
    	  types for functions from csmith.h
    7. compile decompiled.c to binary [clang]
    8. run compiled binaries and compare their outputs
    
    If something goes wrong at any point then  all generated files
    are copied to tmp (for debug purpose).
    
    If we caught exception after running the compiled test.c then
    we continue to the next step.
    vmihalko committed Apr 17, 2023
    Configuration menu
    Copy the full SHA
    c1557e0 View commit details
    Browse the repository at this point in the history
  5. parserMetadataTypes: turn on, and parse basic types

    Parse basic types are:
    - int
    - char
    - short
    - long
    
    - float
    - double
    - long double
    
    and correctly recognize whether a type is signed or unsigned.
    vmihalko committed Apr 17, 2023
    Configuration menu
    Copy the full SHA
    e415493 View commit details
    Browse the repository at this point in the history
  6. parserMetadataTypes: enable type reconstruction for Glob Vars

    from metadataTypeInfo
    vmihalko committed Apr 17, 2023
    Configuration menu
    Copy the full SHA
    2f894b4 View commit details
    Browse the repository at this point in the history
  7. parserMetadataTypes: implement derived (pointer) types parsing

    E.g. `int *` or `unsigned int*`
    vmihalko committed Apr 17, 2023
    Configuration menu
    Copy the full SHA
    fa3dab1 View commit details
    Browse the repository at this point in the history
  8. parserMetadataTypes: implement variadic debug printer

    Which prints strings to the llvm:errs().
    vmihalko committed Apr 17, 2023
    Configuration menu
    Copy the full SHA
    955fd66 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    8329aa1 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    5ceefa0 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    de2ba02 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    4ebbe9a View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    52b16b6 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    09426f5 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    f679116 View commit details
    Browse the repository at this point in the history
  16. parser: handle struct lowering

    From https://lists.llvm.org/pipermail/cfe-dev/2013-January/027302.html:
    When a function has a struct parameter or return type,
    Clang may lower a struct parameter into...
    	- a "byval" pointer (for a struct with several different members)
    	- a vector (for a struct with a few float members)
    	- two doubles (for a struct with two double members)
    	- an i64 (for a struct with two i32 members)
    ... and possibly more variations.
    
    But there is no information in the metadata about types created in this way.
    Therefore, we detect the use of the struct type as an argument or return value
    of a function and do not reconstruct these types from the metadata.
    vmihalko committed Apr 17, 2023
    Configuration menu
    Copy the full SHA
    39833ec View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    9446cb2 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    195a87c View commit details
    Browse the repository at this point in the history
  19. parser: initial refactoring

    vmihalko committed Apr 17, 2023
    Configuration menu
    Copy the full SHA
    6926075 View commit details
    Browse the repository at this point in the history
  20. parser: add support for legacy pass manager

    Enable all (loop) passes from https://github.com/llvm-mirror/llvm/blob/master/lib/Transforms/IPO/PassManagerBuilder.cpp#L353-#L375:
    ```c
      if (EnableSimpleLoopUnswitch) {
        // The simple loop unswitch pass relies on separate cleanup passes. Schedule
        // them first so when we re-process a loop they run before other loop
        // passes.
        MPM.add(createLoopInstSimplifyPass());
        MPM.add(createLoopSimplifyCFGPass());
      }
      // Rotate Loop - disable header duplication at -Oz
      MPM.add(createLoopRotatePass(SizeLevel == 2 ? 0 : -1));
      MPM.add(createLICMPass(LicmMssaOptCap, LicmMssaNoAccForPromotionCap));
      if (EnableSimpleLoopUnswitch)
        MPM.add(createSimpleLoopUnswitchLegacyPass());
      else
        MPM.add(createLoopUnswitchPass(SizeLevel || OptLevel < 3, DivergentTarget));
      // FIXME: We break the loop pass pipeline here in order to do full
      // simplify-cfg. Eventually loop-simplifycfg should be enhanced to replace the
      // need for this.
      MPM.add(createCFGSimplificationPass());
      addInstructionCombiningPass(MPM);
      // We resume loop passes creating a second loop pipeline here.
      MPM.add(createIndVarSimplifyPass());        // Canonicalize indvars
      MPM.add(createLoopIdiomPass());             // Recognize idioms like memset.
    ```
    Test:
    ```bash
    clang -S -emit-llvm -Xclang -disable-O0-optnone simple-for-loop-second-latch.c -o simple-for-loop-second-latch-noopt.ll
    optpassPasses simple-for-loop-second-latch-noopt --loop-simplify --simplifycfg --loop-rotate --lcssa --licm --loop-unswitch --simplifycfg --instcombine --indvars
    old_llvm2c simple-for-loop-second-latch-noopt-opt == new_llvm2c simple-for-loop-second-latch-noopt
    ```
    vmihalko committed Apr 17, 2023
    Configuration menu
    Copy the full SHA
    03632e0 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    3855fd2 View commit details
    Browse the repository at this point in the history
  22. parser: create doWhile cycles

    1. map LOOP with BRANCH instruction (condition)
    2. transform BRANCH inst. to if's or doWhile constructs
    vmihalko committed Apr 17, 2023
    Configuration menu
    Copy the full SHA
    af657bd View commit details
    Browse the repository at this point in the history
  23. parser: (head inline to latch) inline to preheader

    First:
    ```c
    goto head;
    head:
    ...
    do
        goto head;
    while( C );
    ```
    
    transfrom into
    ```c
    do
        head
    while( C );
    
    Second:
    Cache result from loopInfoAnalysis in particular function
    vmihalko committed Apr 17, 2023
    Configuration menu
    Copy the full SHA
    50d32f9 View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    38ea5f0 View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    bd65cff View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    f89e349 View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    72b8e04 View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    352183d View commit details
    Browse the repository at this point in the history
  29. Configuration menu
    Copy the full SHA
    20f84d1 View commit details
    Browse the repository at this point in the history
  30. Configuration menu
    Copy the full SHA
    c57056f View commit details
    Browse the repository at this point in the history
  31. Configuration menu
    Copy the full SHA
    f06fc4d View commit details
    Browse the repository at this point in the history
  32. Configuration menu
    Copy the full SHA
    a2a489d View commit details
    Browse the repository at this point in the history
  33. Configuration menu
    Copy the full SHA
    f57b18f View commit details
    Browse the repository at this point in the history
  34. Configuration menu
    Copy the full SHA
    23ad7e6 View commit details
    Browse the repository at this point in the history
  35. Configuration menu
    Copy the full SHA
    bafae2d View commit details
    Browse the repository at this point in the history
  36. Configuration menu
    Copy the full SHA
    02c5a85 View commit details
    Browse the repository at this point in the history
  37. Configuration menu
    Copy the full SHA
    85f2ba6 View commit details
    Browse the repository at this point in the history
  38. Configuration menu
    Copy the full SHA
    83628a1 View commit details
    Browse the repository at this point in the history
  39. Configuration menu
    Copy the full SHA
    a0180d9 View commit details
    Browse the repository at this point in the history
  40. Configuration menu
    Copy the full SHA
    51de204 View commit details
    Browse the repository at this point in the history
  41. Configuration menu
    Copy the full SHA
    2747c81 View commit details
    Browse the repository at this point in the history
  42. Configuration menu
    Copy the full SHA
    4360924 View commit details
    Browse the repository at this point in the history
  43. parser: do not create special array allocas

    This is hotfix. Following simple program cause the problem:
    
    int length = 10;
    int array[length];
    
    llvm2c was unable to parse/find the length number
    from alloca instruction operands.
    vmihalko committed Apr 17, 2023
    Configuration menu
    Copy the full SHA
    074a1cb View commit details
    Browse the repository at this point in the history
  44. parser: fix segfault when analysing loops in empty function

    function declaration
    vmihalko committed Apr 17, 2023
    Configuration menu
    Copy the full SHA
    ce38fa5 View commit details
    Browse the repository at this point in the history
  45. Configuration menu
    Copy the full SHA
    f196528 View commit details
    Browse the repository at this point in the history
  46. Configuration menu
    Copy the full SHA
    261f100 View commit details
    Browse the repository at this point in the history
  47. Configuration menu
    Copy the full SHA
    7ea8727 View commit details
    Browse the repository at this point in the history
  48. Configuration menu
    Copy the full SHA
    3f518d7 View commit details
    Browse the repository at this point in the history
  49. Configuration menu
    Copy the full SHA
    7fd2548 View commit details
    Browse the repository at this point in the history
  50. Configuration menu
    Copy the full SHA
    631ea2e View commit details
    Browse the repository at this point in the history
  51. writer: print latchExpr correctly

    before this change, latchExpr was able to
    print only single expression correctly
    vmihalko committed Apr 17, 2023
    Configuration menu
    Copy the full SHA
    e5ead93 View commit details
    Browse the repository at this point in the history
  52. parser: fix afterDoWhile destination

    loopHeader is not always in the loop_latch->getTerminator()->getOperand(1)
    vmihalko committed Apr 17, 2023
    Configuration menu
    Copy the full SHA
    b834d22 View commit details
    Browse the repository at this point in the history
  53. Configuration menu
    Copy the full SHA
    4c35ae0 View commit details
    Browse the repository at this point in the history
  54. parser: enable type reconstruction for Global Variables

    from metadata
    vmihalko committed Apr 17, 2023
    Configuration menu
    Copy the full SHA
    51484bb View commit details
    Browse the repository at this point in the history
  55. parser: comment out unused functions

    This commit should be 'fixup'ed with a commit removing these functions...
    vmihalko committed Apr 17, 2023
    Configuration menu
    Copy the full SHA
    5ccda4c View commit details
    Browse the repository at this point in the history
  56. writer: [sanitizer] fix potential runtime error:

    /usr/include/c++/12/bits/stl_iterator.h:1139:20: runtime error: applying
    non-zero offset 18446744073709551608 to null pointer
    vmihalko committed Apr 17, 2023
    Configuration menu
    Copy the full SHA
    ca434b2 View commit details
    Browse the repository at this point in the history

Commits on Apr 24, 2023

  1. Configuration menu
    Copy the full SHA
    e939847 View commit details
    Browse the repository at this point in the history
  2. parser: disable the memcpyToAssignment pass

    since llvm2c produces non-compilable code with it:
    input.c:
    ```c
    int main(){
        int a[5] = {0,1,2,3,4};
        return a[0];
    }
    ```
    output.c:
    ```c
    // function declarations
    int main(void);
    
    // global variable definitions
    unsigned int __const_main_a[5] = {0,1,2,3,4,};
    
    int main(void){
        int a[5];
        block0:
        a = __const_main_a;
        return a[0];
    }
    ```
    "error: array type 'int[5]' is not assignable"
    vmihalko committed Apr 24, 2023
    Configuration menu
    Copy the full SHA
    d0034ea View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    aef81bf View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    0402f67 View commit details
    Browse the repository at this point in the history

Commits on Apr 25, 2023

  1. parser: do not deduce type when var doesn't exist

    input.c
    ```c
    struct S3 {
      int arr[18];
    };
    
    struct S3 func_1() {
      struct S3 l_5;
      return l_5;
    }
    int main() { func_1(); }
    ```
    
    input.ll
    ```llvmir
    ...
    define dso_local void @func_1(%struct.S3* noalias sret(%struct.S3) align 4 %0) #0 !dbg !8 {
      call void @llvm.dbg.declare(metadata %struct.S3* %0, metadata !45, metadata !DIExpression()), !dbg !46
      ret void, !dbg !47
    }
    ...
    ```
    The problem was that the '%struct.S3*' type changed
    from pointer to struct type. This change happens due
    to misleading information from metadata which
    corresponds to the type from the input.c file.
    vmihalko committed Apr 25, 2023
    Configuration menu
    Copy the full SHA
    cac933c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    caef278 View commit details
    Browse the repository at this point in the history

Commits on Apr 26, 2023

  1. Configuration menu
    Copy the full SHA
    1fdb9c5 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    dae0c85 View commit details
    Browse the repository at this point in the history

Commits on Apr 27, 2023

  1. Configuration menu
    Copy the full SHA
    e3d9911 View commit details
    Browse the repository at this point in the history

Commits on Apr 28, 2023

  1. Configuration menu
    Copy the full SHA
    50666af View commit details
    Browse the repository at this point in the history

Commits on Apr 29, 2023

  1. parser: fix coredump for a void type in a function

    e.g. `void foo();`
    vmihalko committed Apr 29, 2023
    Configuration menu
    Copy the full SHA
    5b11272 View commit details
    Browse the repository at this point in the history
  2. parser: handle cycles in metadata types

    e.g.
    struct s {
    	struct s *ptr_to_s;
    }
    vmihalko committed Apr 29, 2023
    Configuration menu
    Copy the full SHA
    b2ca928 View commit details
    Browse the repository at this point in the history
  3. parser: parse the _bool type as unsigned int

    because in current situation there is no better way to handle this.
    vmihalko committed Apr 29, 2023
    Configuration menu
    Copy the full SHA
    c9caeca View commit details
    Browse the repository at this point in the history

Commits on May 1, 2023

  1. parser: prevent double caching ...

    when e.g.
    ```c
    typedef struct node {
      struct node *n
    } * List;
    List main_a;
    ```
    vmihalko committed May 1, 2023
    Configuration menu
    Copy the full SHA
    539acb9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6b52c53 View commit details
    Browse the repository at this point in the history
  3. parser: small support of a enum DIType

    we are consistent and for now decompile
    a enum as a global variable
    vmihalko committed May 1, 2023
    Configuration menu
    Copy the full SHA
    9432a46 View commit details
    Browse the repository at this point in the history

Commits on May 2, 2023

  1. Configuration menu
    Copy the full SHA
    032d7e5 View commit details
    Browse the repository at this point in the history
  2. parser: fix an array size deduction from the DI.

    e.g. `int array[g_var];`
    generates:
    ```llvmir
    !18 = !DILocalVariable(name: "__vla_expr0", scope: !12, type: !19, flags: DIFlagArtificial)
    !19 = !DIBasicType(name: "unsigned long", size: 64, encoding: DW_ATE_unsigned)
    !20 = !DILocation(line: 0, scope: !12)
    !21 = !DILocalVariable(name: "array", scope: !12, file: !3, line: 2, type: !22)
    !22 = !DICompositeType(tag: DW_TAG_array_type, baseType: !5, elements: !23)
    !23 = !{!24}
    ```
    We can savely set an array size to 0, because type_kinds will differ, and
    the deduced type will not be used. I hope this is a valid argument.
    By valid I mean safe.
    
    In llvm2c arrayType does not have a constructor for non-intergral type.
    So we cannot set the variable name as a size argument...
    vmihalko committed May 2, 2023
    Configuration menu
    Copy the full SHA
    8450cb0 View commit details
    Browse the repository at this point in the history

Commits on May 6, 2023

  1. Configuration menu
    Copy the full SHA
    4ba72d7 View commit details
    Browse the repository at this point in the history

Commits on May 11, 2023

  1. parses: cache the outermost array instead of innermost

    So in the code:
    ```c
    int a[2][3];
    
    int main() {
    	int b[2][3];
    }
    ```
    The type of array b wont be created again!
    vmihalko committed May 11, 2023
    Configuration menu
    Copy the full SHA
    efdebbf View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ea74454 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    fdaf727 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    3b66d2b View commit details
    Browse the repository at this point in the history
  5. parser: fix support of variadic functions

    thanks @lzaoral for discussion
    vmihalko committed May 11, 2023
    Configuration menu
    Copy the full SHA
    3b6047e View commit details
    Browse the repository at this point in the history
  6. parser: __va_list_tag is struct name

    in llvm2c usually all struct have name prefixed with "s_"
    vmihalko committed May 11, 2023
    Configuration menu
    Copy the full SHA
    51844cd View commit details
    Browse the repository at this point in the history

Commits on May 12, 2023

  1. Configuration menu
    Copy the full SHA
    39ba01f View commit details
    Browse the repository at this point in the history
  2. parser: add LLVM::Type as parameter

    and prepare for anonymous structs/unions
    
    Thanks @lzaoral for help!
    vmihalko committed May 12, 2023
    Configuration menu
    Copy the full SHA
    783a313 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    f74aa13 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    75c25ce View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    23e716f View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    5110a14 View commit details
    Browse the repository at this point in the history

Commits on Mar 14, 2024

  1. parser: add std::optional

    vmihalko authored and Vincent Mihalkovic committed Mar 14, 2024
    Configuration menu
    Copy the full SHA
    b4ccd78 View commit details
    Browse the repository at this point in the history
  2. parser: add check for null in arrayBaseType

    vmihalko authored and Vincent Mihalkovic committed Mar 14, 2024
    Configuration menu
    Copy the full SHA
    2e31974 View commit details
    Browse the repository at this point in the history
  3. parser: revert and add TODO: fix redundantCastPass

    vmihalko authored and Vincent Mihalkovic committed Mar 14, 2024
    Configuration menu
    Copy the full SHA
    b031869 View commit details
    Browse the repository at this point in the history
  4. fixup! fixup! parser: parse anonymous structs/unions

    vmihalko authored and Vincent Mihalkovic committed Mar 14, 2024
    Configuration menu
    Copy the full SHA
    464fbad View commit details
    Browse the repository at this point in the history
  5. fixup! fixup! fixup! parser: parse anonymous structs/unions

    vmihalko authored and Vincent Mihalkovic committed Mar 14, 2024
    Configuration menu
    Copy the full SHA
    95f4a99 View commit details
    Browse the repository at this point in the history
  6. parser: fix void type inside derived types

    vmihalko authored and Vincent Mihalkovic committed Mar 14, 2024
    Configuration menu
    Copy the full SHA
    810f837 View commit details
    Browse the repository at this point in the history
  7. parser: DIfunction might parse itself during parsing

    e.g., type function occurs as arg type or return type
    vmihalko authored and Vincent Mihalkovic committed Mar 14, 2024
    Configuration menu
    Copy the full SHA
    045315a View commit details
    Browse the repository at this point in the history
  8. parser: fix unused variable warning

    vmihalko authored and Vincent Mihalkovic committed Mar 14, 2024
    Configuration menu
    Copy the full SHA
    70842ab View commit details
    Browse the repository at this point in the history
  9. parser/negCmpInst: add a function to negate a CmpInst condition

    I wrongly assume that llvm always generates positive loop conditions, e.g. if this is true, then iterate, but after -O3 optimisations, loop condition might be negated: if this is false, then continue to the next iteration.
    
    This new function will reverse the loop condition if the situation described above occurs!
    This might need a proper solution - this is hackery, because we do not
    replace the whole expression, just a printed character e.g. "<" -> ">=".
    vmihalko authored and Vincent Mihalkovic committed Mar 14, 2024
    Configuration menu
    Copy the full SHA
    a4109fa View commit details
    Browse the repository at this point in the history
  10. parser: move assignments of phi variables at the end of the loop body

    x = phi i32 [0, %beforeLoop]  [%y, %fromLoop] ; coming from %fromLoop means we
    are in a next iteration
    
    before this commit:
    x = 0;
    do {
            x = y;
            loopBody(y, ...);
    } while ( cond )
    
    after this commit:
    x = 0;
    do {
            loopBody(y, ...);
            x = y;
    } while ( cond )
    vmihalko authored and Vincent Mihalkovic committed Mar 14, 2024
    Configuration menu
    Copy the full SHA
    a99637d View commit details
    Browse the repository at this point in the history
  11. parser: Implement the {un,}signed variants of llvm intrinsincs that r…

    …eturn the m{ax,in}imum of the two operands.
    
    My idea comes from https://reviews.llvm.org/D9293?id=&download=true
    
    The expression:
    
        call i8 @llvm.umin.i8(i8 %a, i8 %b)
    
    is equivalent to
    
        %1 = icmp ult i8 %a, %b
        %2 = select i1 %1, i8 %a, i8 %b
    
    This is what llvm2c outputs:
    
        a < b ? a : b
    vmihalko committed Mar 14, 2024
    Configuration menu
    Copy the full SHA
    f6388dc View commit details
    Browse the repository at this point in the history
  12. parser: Create goto afterDoWhile; from the doWhile block and not fr…

    …om the preheader block
    vmihalko committed Mar 14, 2024
    Configuration menu
    Copy the full SHA
    4182cec View commit details
    Browse the repository at this point in the history
  13. parseBreaks: Fix phi assignments for in loop contianed variables

    This commit is probably the correct fix for what
    fd4978d was trying to address.
    vmihalko committed Mar 14, 2024
    Configuration menu
    Copy the full SHA
    8ea37c8 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    d22b14b View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    2e60dee View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    b703560 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    ac88b7c View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    d5c591e View commit details
    Browse the repository at this point in the history
  19. parser: decompiles 'sext i1 boolVal' as 'boolVal ? -1 : 0'

    https://llvm.org/docs/LangRef.html#sext-to-instruction
    
    This is based on a fact that if you sext i1 cmp_result to i32,
    you can get either -1 or 0.
    vmihalko committed Mar 14, 2024
    Configuration menu
    Copy the full SHA
    b10037a View commit details
    Browse the repository at this point in the history

Commits on Mar 28, 2024

  1. fix a number of "is not a member of ‘llvm::dwarf’"

    Signed-off-by: Andrew V. Teylu <andrew.teylu@vector.com>
    aytey authored and vmihalko committed Mar 28, 2024
    Configuration menu
    Copy the full SHA
    8bbc212 View commit details
    Browse the repository at this point in the history