Lee Wei Profile
Lee Wei

@leewei666

Followers
41
Following
482
Media
12
Statuses
152

MSCS @UUtah | Compilers

Salt Lake City, UT
Joined October 2016
Don't wanna be here? Send us removal request.
@leewei666
Lee Wei
4 months
I wrote two blog posts—one on the overall project and one diving into the Constraint System behind it. Learned a ton and had fun digging into LLVM internals. Check them out here:. 🔗 Project wrap-up: 🔗 Constraint Elimination pass:
leewei05.github.io
Introduction Constraint Elimination is a transformation pass that extracts facts from LLVM IR and tries to replace certain uses with known facts. One common replacement is to replace conditional...
0
0
0
@leewei666
Lee Wei
4 months
Learn LLVM until I find a compiler job | Day 62. - scalar-evolution(Scalar Evolution Analysis): this pass analyzes scalar expressions in loops. It is especially useful for induction variables. - da(Dependence Analysis): this pass detects dependences in memory accesses.
0
0
0
@leewei666
Lee Wei
4 months
Learn LLVM until I find a compiler job | Day 61. - internalize: look for a main function from the module. If a main is found, all other functions and global variables with initializers are marked as internal. - ir-normalizer: transforms IR into a normal form that’s easier to diff.
0
0
0
@leewei666
Lee Wei
4 months
Learn LLVM until I find a compiler job | Day 60. Fix comments for a previous PR today.
0
0
0
@grok
Grok
8 hours
Generate videos in just a few seconds. Try Grok Imagine, free for a limited time.
18
15
152
@leewei666
Lee Wei
4 months
Learn LLVM until I find a compiler job | Day 59. - constmerge: merges duplicate global constant that is shared. - memorySSA: an analysis pass that generates a virtual IR, where it reasons about the def use chains of memory operations.
0
0
0
@leewei666
Lee Wei
4 months
Learn LLVM until I find a compiler job | Day 58. - instsimplify: folds instructions into simpler forms that do not require creating new instructions. - div-rem-pairs: hoists and/or decomposes/recomposes integer division and remainder instructions for better codegen.
0
0
0
@leewei666
Lee Wei
4 months
Learn LLVM until I find a compiler job | Day 57. - transform-warning: emits warnings about not yet applied forced transformations. LLVM utility pass. - alignment-for-assumptions: ScalarEvolution-based transformation to set the alignments of load, stores and memory intrinsics.
0
0
0
@leewei666
Lee Wei
4 months
Learn LLVM until I find a compiler job | Day 56. - infer-alignment: infer alignment for memory operations based on trailing zero known bits. - loop-load-elim: loop-aware load elimination pass. - slp-vectorizor: combines a series of stores to a vector store.
0
0
0
@leewei666
Lee Wei
4 months
Learn LLVM until I find a compiler job | Day 55. - inject-tli-mappings: Populates the VFABI attribute with the scalar-to-vector mappings from the TargetLibraryInfo. (Not sure what it does).- loop-vectorize: modifies 'vectorizable' loops.and generates target-independent LLVM-IR.
0
0
0
@leewei666
Lee Wei
4 months
Learn LLVM until I find a compiler job | Day 54. - chr(ControlHeightReduction): merge conditional blocks and reduces the number of conditional branches in the hot paths based on profiles. - loop-distribute: distribute loops that cannot be vectorized due to dependence cycles.
0
0
0
@leewei666
Lee Wei
5 months
Learn LLVM until I find a compiler job | Day 53. I'm working on adding negative tests and mixed bitwise tests for my LLVM PR today. It's great to have negative test cases that ensure my patch doesn't over optimize cases. It is something that I should be mindful of in future PR.
0
0
0
@leewei666
Lee Wei
5 months
Learn LLVM until I find a compiler job | Day 52. - float-2-int: demote floating point operations to work with integers. This assumes that this transformation doesn't loss any info from the floating point. - lower-constant-intrinsics: lowers objectsize, is.constant intrinsic.
0
0
0
@leewei666
Lee Wei
5 months
Learn LLVM until I find a compiler job | Day 51. - global-dce: removes unreachable globals in the program. - elim-avail-extern: eliminate available external global definitions from the program, turning them into declarations.
0
0
0
@leewei666
Lee Wei
5 months
Learn LLVM until I find a compiler job | Day 50. - loop-simplifycfg: this pass canonicalizes basic loop CFG. - licm(loop invariant code motion): hoist instructions to preheader or sink instructions to exit blocks if it is safe to do so. - loop-rotate: converts loop into do-while.
0
0
0
@leewei666
Lee Wei
5 months
Learn LLVM until I find a compiler job | Day 49. - dse(dead store elimination).- move-auto-init: moves auto initialization closer to the basic block that uses it. This could potentially remove some control path to the use. - coro-elide: coroutine elision.
0
0
0
@leewei666
Lee Wei
5 months
Learn LLVM until I find a compiler job | Day 48. - gvn(global value numbering): eliminate fully and partial redundant instructions, and dead load elimination. - bdce(bit-tracking dead code elimination).- adce(aggressive dead code elimination).
0
0
0
@leewei666
Lee Wei
5 months
Learn LLVM until I find a compiler job | Day 47. - vector-combine: look for certain patterns and use a simple cost model to see if vectorization is profitable. - mldst-motion(merge load store): hoists load with the same address from hammock to the header. Sink store to the tail.
0
0
0
@leewei666
Lee Wei
5 months
Learn LLVM until I find a compiler job | Day 46. - loop-deletion: delete dead loops with no side effects or volatile instructions. - loop-unroll: this pass perform a simple loop unroll. It should run after indvars since indvars pass can canonicalize loop steps.
0
0
0
@leewei666
Lee Wei
5 months
Learn LLVM until I find a compiler job | Day 45. Instcombine canonicalizes comparison forms. For instance, sle A, -1 to slt A, 0 and sge A, 0 to sgt A, -1. These cases need to take into concerns for creating test cases for passes after InstCombine.
0
0
0