profile
viewpoint
Brian Gesiak modocache Jersey City, NJ https://modocache.io Compiler engineer optimizing @facebook's server-side C++ applications with LLVM/Clang. @recursecenter alum.

apple/swift 51830

The Swift Programming Language

apple/swift-evolution 11155

This maintains proposals for changes and user-visible enhancements to the Swift Programming Language.

apple/swift-package-manager 7754

The Package Manager for the Swift Programming Language

llvm/llvm-project 4810

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies. Note: the repository does not accept github pull requests at this moment. Please submit your patches at http://reviews.llvm.org.

apple/swift-corelibs-foundation 3888

The Foundation Project, providing core utilities, internationalization, and OS independence

luisobo/Nocilla 1842

Testing HTTP requests has never been easier. Nocilla: Stunning HTTP stubbing for iOS and Mac OS X.

apple/swift-corelibs-libdispatch 1817

The libdispatch Project, (a.k.a. Grand Central Dispatch), for concurrency on multicore hardware

apple/swift-corelibs-xctest 822

The XCTest Project, A Swift core library for providing unit test support

apple/swift-llbuild 771

A low-level build system, used by Xcode and the Swift Package Manager

push eventmodocache/dotfiles

Brian Gesiak

commit sha d6a16d54ffbe6576e0bd97de5df0ec407e0733a2

vim: MLIR syntax highlighting.

view details

push time in a month

push eventmodocache/llvm-project

Simon Pilgrim

commit sha e3b60597769f79a8abc19fb8ef1f321d9adc1358

[X86][SSE] combineX86ShufflesConstants - early out for zeroable vectors (PR45443) Shuffle combining can insert zero byte sized elements into the shuffle mask, which combineX86ShufflesConstants will attempt to fold without taking into account whether the byte-sized type is legal (e.g. AVX512F only targets). If we have a full-zeroable vector then we should just return a zero version of the root type, otherwise if the type isn't valid we should bail. Fixes PR45443

view details

Michael Liao

commit sha c97be2c377852fad7eb38409aae5692fa417e49b

[hip] Remove `hip_pinned_shadow`. Summary: - Use `device_builtin_surface` and `device_builtin_texture` for surface/texture reference support. So far, both the host and device use the same reference type, which could be revised later when interface/implementation is stablized. Reviewers: yaxunl Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D77583

view details

Sriraman Tallam

commit sha 94317878d8267de23a1a23dfa3d92f9143c433ca

LLD Support for Basic Block Sections This is part of the Propeller framework to do post link code layout optimizations. Please see the RFC here: https://groups.google.com/forum/#!msg/llvm-dev/ef3mKzAdJ7U/1shV64BYBAAJ and the detailed RFC doc here: https://github.com/google/llvm-propeller/blob/plo-dev/Propeller_RFC.pdf This patch adds lld support for basic block sections and performs relaxations after the basic blocks have been reordered. After the linker has reordered the basic block sections according to the desired sequence, it runs a relaxation pass to optimize jump instructions. Currently, the compiler emits the long form of all jump instructions. AMD64 ISA supports variants of jump instructions with one byte offset or a four byte offset. The compiler generates jump instructions with R_X86_64 32-bit PC relative relocations. We would like to use a new relocation type for these jump instructions as it makes it easy and accurate while relaxing these instructions. The relaxation pass does two things: First, it deletes all explicit fall-through direct jump instructions between adjacent basic blocks. This is done by discarding the tail of the basic block section. Second, If there are consecutive jump instructions, it checks if the first conditional jump can be inverted to convert the second into a fall through and delete the second. The jump instructions are relaxed by using jump instruction mods, something like relocations. These are used to modify the opcode of the jump instruction. Jump instruction mods contain three values, instruction offset, jump type and size. While writing this jump instruction out to the final binary, the linker uses the jump instruction mod to determine the opcode and the size of the modified jump instruction. These mods are required because the input object files are memory-mapped without write permissions and directly modifying the object files requires copying these sections. Copying a large number of basic block sections significantly bloats memory. Differential Revision: https://reviews.llvm.org/D68065

view details

Raphael Isemann

commit sha 95054aeb07061dbfd6575c10673b9563430de64a

[lldb][NFC] Fix typo in 'watchpoint delete' error message

view details

Dmitry Vyukov

commit sha 2db63723a87527bac797996b8aa9d2f5a176b2f7

tsan: fix Go/ppc build PPC now requires ReExec due to ASLR. Pull in more functions for Go build. Suggested-by: Keith Randall (khr)

view details

Tim Keith

commit sha 87f3bc978f7325e7cf88073bda51c27a00f5e455

[flang] Merge pull request flang-compiler/f18#1101 from flang-compiler/tsk-msg-format Add message formatting for std::int64_t Original-commit: flang-compiler/f18@72dad8cae1f287d1183f535aec8207781d967505 Reviewed-on: https://github.com/flang-compiler/f18/pull/1101

view details

diggerlin

commit sha 3aa084947e5fad795f45f0907d3e436db1a19757

[NFC][XCOFF] refactor readobj/XCOFFDumper.cpp SUMMARY: refactor readobj/XCOFFDumper.cpp with helper function getAlignmentLog2() , getSymbolType(), isLabel(). Reviewers: Hubert Tong, James Henderson Subscribers: rupprecht, seiyai,hiradityu Differential Revision: https://reviews.llvm.org/D77562

view details

David Tenty

commit sha b9245f14b799855a7b81010793ec5368e65d0f0f

[NFC][PowerPC] Cleanup 64-bit and Darwin CalleeSavedRegs Summary: - Remove the no longer used Darwin CalleeSavedRegs - Combine the SVR464 callee saved regs and AIX64 since the two are (and should be) identical into PPC64 - Update tests for 64-bit CSR change Reviewers: sfertile, ZarkoCA, cebowleratibm, jasonliu, #powerpc Reviewed By: sfertile Subscribers: wuzish, nemanjai, hiraditya, kbarton, shchenz, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D77235

view details

Nikita Popov

commit sha 361c29d7ba55ee6fb762d36c08271375bb9f8c60

[RDA] Avoid inserting duplicate reaching defs (NFCI) An instruction may define the same reg unit multiple times, avoid inserting the same reaching def multiple times in that case. Also print the reg unit, rather than the super-register, in the debug code.

view details

Nikita Popov

commit sha 76e987b37220128929519c28bef5c566841d9aed

[RDA] Don't pass down TraversedMBB (NFC) Only pass the MachineBasicBlock itself down to helper methods, they don't need to know about traversal. Move the debug print into the main method.

view details

Nikita Popov

commit sha 259649a51982d0ea6fdbaa62a87e802c9a8a86d2

[RDA] Avoid full reprocessing of blocks in loops (NFCI) RDA sometimes needs to visit blocks twice, to take into account reaching defs coming in along loop back edges. Currently it handles repeated visitation the same way as usual, which means that it will scan through all instructions and their reg unit defs again. Not only is this very inefficient, it also means that all reaching defs in loops are going to be inserted twice. We can do much better than this. The only thing we need to handle is a new reaching def from a predecessor, which either needs to be prepended to the reaching definitions (if there was no reaching def from a predecessor), or needs to replace an existing predecessor reaching def, if it is more recent. Since D77508 we only store the most recent predecessor reaching def, so that's the only one that may need updating. This also has the nice side-effect that reaching definitions are now automatically sorted and unique, so drop the llvm::sort() call in favor of an assertion. Differential Revision: https://reviews.llvm.org/D77511

view details

Amy Huang

commit sha bcf66084eddd4d3dbe78fc4ed39a347d5d8d57d4

[DebugInfo] Fix for adding "returns cxx udt" option to functions in CodeView. Summary: This change adds DIFlagNonTrivial to forward declarations of DICompositeType. It adds the flag to nontrivial types and types with unknown triviality. It fixes adding the "CxxReturnUdt" flag to functions inconsistently, since it is added based on whether the return type is marked NonTrivial, and that changes if the return type was a forward declaration. continues the discussion at https://reviews.llvm.org/D75215 Bug: https://bugs.llvm.org/show_bug.cgi?id=44785 Reviewers: rnk, dblaikie, aprantl Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D77436

view details

Amy Huang

commit sha dace7ada3814d87171e3a8be154f315e1f9d6029

Slightly modify some tests as follow up to bcf66084, which breaks tests. The change in bcf6604 added a debug info flag, which caused some tests to fail; I removed some commas so that the test matching still works.

view details

Matt Arsenault

commit sha b281138a1b67ca4405b77d774adc3de72742e7a2

DAG: Use the correct getPointerTy in a few places These should not be assuming address space 0. Calling getPointerTy is generally the wrong thing to do, since you should already know the type from the incoming IR.

view details

Lei Zhang

commit sha 2d3eb493d418c415b9d204afd5fb9e5ff8eeec99

[mlir][vulkan-runner] Fix createLowerToLLVMPass interface createLowerToLLVMPass() now requires a struct for passing in arguments after 7023f4b4cb0157d95d98f32ace247acd9fc7b80a.

view details

Lei Zhang

commit sha 47b234944dc063daf61d3e72e6b603ba9615baf0

[mlir][spirv] Fix wrong Phi parent block for back-to-back loops If we have two back-to-back loops with block arguments, the OpPhi instructions generated for the second loop's block arguments should have use the merge block of the first SPIR-V loop structure as their incoming parent block. Differential Revision: https://reviews.llvm.org/D77543

view details

Simon Pilgrim

commit sha 6f46e9af8a0e91456b4be5ca75382aa89e1056fd

[X86][SSE] Add PTEST(AND(X,Y),AND(X,Y)) tests derived from PR42035 examples

view details

Aaron Ballman

commit sha 95eb50c4470894e4cebb08ba3ea97efe2f7c179a

Check LLVM_BUILD_LLVM_C_DYLIB before building the C DLL with MSVC.

view details

Fangrui Song

commit sha 4e907e93fb42eff4ffc9a93026d1665de503acc9

[ELF] -M/-Map: fix VMA/LMA/Size columns of symbol assignments when address/size>=2**32 SymbolAssignment::addr stores the location counter. The type should be uint64_t instead of unsigned. The upper half of the address space is commonly used by operating system kernels. Similarly, SymbolAssignment::size should be an uint64_t. A kernel linker script can move the location counter from 0 to the upper half of the address space. Reviewed By: grimar Differential Revision: https://reviews.llvm.org/D77445

view details

Fangrui Song

commit sha 03c825c224420c498f3f7aef8ad4fb005d62b8ec

[ELF] --warn-backrefs: don't warn for linking sandwich problems This is an alternative design to D77512. D45195 added --warn-backrefs to detect * A. certain input orders which GNU ld either errors ("undefined reference") or has different resolution semantics * B. (byproduct) some latent multiple definition problems (-ldef1 -lref -ldef2) which I call "linking sandwich problems". def2 may or may not be the same as def1. When an archive appears more than once (-ldef -lref -ldef), lld and GNU ld may have the same resolution but --warn-backrefs may warn. This is not uncommon. For example, currently lld itself has such a problem: ``` liblldCommon.a liblldCOFF.a ... liblldCommon.a _ZN3lld10DWARFCache13getDILineInfoEmm in liblldCOFF.a refers to liblldCommon.a(DWARF.cpp.o) libLLVMSupport.a also appears twice and has a similar warning ``` glibc has such problems. It is somewhat destined because of its separate libc/libpthread/... and arbitrary grouping. The situation is getting improved over time but I have seen: ``` -lc __isnanl references -lm -lc _IO_funlockfile references -lpthread ``` There are also various issues in interaction with other runtime libraries such as libgcc_eh and libunwind: ``` -lc __gcc_personality_v0 references -lgcc_eh -lpthread __gcc_personality_v0 references -lgcc_eh -lpthread _Unwind_GetCFA references -lunwind ``` These problems are actually benign. We want --warn-backrefs to focus on its main task A and defer task B (which is also useful) to a more specific future feature (see gold --detect-odr-violations and https://bugs.llvm.org/show_bug.cgi?id=43110). Instead of warning immediately, we store the message and only report it if no subsequent lazy definition exists. The use of the static variable `backrefDiags` is similar to `undefs` in Relocations.cpp Reviewed By: grimar Differential Revision: https://reviews.llvm.org/D77522

view details

push time in a month

push eventmodocache/dotfiles

Brian Gesiak

commit sha bf0e1fd84dfb334b0372312fc453f401b34e2e48

.vimrc: Update llvm-project name.

view details

push time in 2 months

push eventmodocache/dotfiles

Brian Gesiak

commit sha b18dece3b205a50cda79e3e48811ad5375131ab6

The latest YCM works great by symlinking compile_commands.json, no need for a config file.

view details

push time in 2 months

push eventmodocache/dotfiles

Brian Gesiak

commit sha 05c97005f50ffa1ade110a520442edf079b0bc00

Update Vim installation instructions, plugins, etc.

view details

Brian Gesiak

commit sha 07f7d5c74651e0d809c68ce7861227217bed208d

Update fish prompt colors to be less high-contrast.

view details

push time in 2 months

push eventmodocache/dotfiles

Brian Gesiak

commit sha 757bdf336842cfd11252e6846a5c7c223f86ced4

Tweaks

view details

Brian Gesiak

commit sha fc9f7831b241249f6a36fd0983a7eea862669226

Light vimrc

view details

Brian Gesiak

commit sha 80eeb9397ec94afbf8badb75df6d35e3b2739043

Remove fish vcs prompt

view details

Brian Gesiak

commit sha 9250f23a612c3844cb442ff6c9405e5fb1c3f65c

Update clang-format path

view details

Brian Gesiak

commit sha 347f5fcf0d9c2ffc8f67b6a29470fd0356ffea7a

Update YCM config for nested build directories

view details

Brian Gesiak

commit sha 145dd85dda3ec0e260ff525a0ef6dffcb9a9e774

Move fish config up out of submodule In doing so, reimplement the fish prompt, without using Unicode control characters that aren't rendered properly with certain fonts.

view details

Brian Gesiak

commit sha d4441d697b561173d8a0a18c8a14d9d66f7357a9

Move fish colors into config.fish

view details

Brian Gesiak

commit sha 86ee5bb461db4887274b0a19bdbeb2406e42cda3

Improve Git prompt

view details

Brian Gesiak

commit sha 20be7934a3b6acf84264fe5d36230eb8aa79d5c7

Fix vim

view details

Brian Gesiak

commit sha d794a2b81b5a51adb88888d09fd3f124733bc736

Add timestamp to prompt

view details

Brian Gesiak

commit sha a5778e7c3229b7256bda0ce2087e115a4dab038e

Install brew to a custom locaiton.

view details

Brian Gesiak

commit sha 28c3289e32d1d792c2dff27332b40aec421ee399

Add .gitconfig and .gitignore

view details

Brian Gesiak

commit sha 65f72b4b337f445194487b821fe9ab9a8c5fb956

Add gitconfig, gitignore, tweak fish config

view details

Brian Gesiak

commit sha 65dab049b4a0105a29f2c45d89a19cc18ececbfb

Use CtrlP insted of Command-T, and add support for commenting-out

view details

Brian Gesiak

commit sha 921fc892feb2dcd0c3a45e659a001734fb6a1ad9

Add instructions for ctrlpmatcher

view details

Brian Gesiak

commit sha 9dddf2d226b264c91a40f271aebfa1a7e2595dd0

Have CtrlP window take up just 5 lines.

view details

Brian Gesiak

commit sha a7ccde0044877ad95666f0ed74183d5730115621

Use a Python-based matcher that works with Py3-only installs of Vim Also there's no compilation required.

view details

Brian Gesiak

commit sha 1466dc6b09651503c5f22fc68a85d847bfa14795

Python ctrlp matcher was renamed.

view details

Brian Gesiak

commit sha 1484cd2d3985a1dcf1e83904ddbfcab8bc75cf71

Use https to clone LLVM.

view details

Brian Gesiak

commit sha dc9756305cd50965351b3b8e7087ea7d777cb3da

Use libclang, not new clangd, for YouCompleteMe.

view details

push time in 2 months

push eventmodocache/dotfiles

Brian Gesiak

commit sha 18e31af53bd197a9a85df285b783f87f2f3258a5

.gitignore other directories.

view details

Brian Gesiak

commit sha d825cba95899b55dedb04563d9679fc11cd4d26b

tmux shortcuts.

view details

push time in 2 months

push eventllvm/llvm-project

Brian Gesiak

commit sha 54176d1766f25bc03ddb1a8932a380f6543d5150

libcxx 'LLVM_USE_SANITIZER=Address;Undefined' Summary: Allow users to simultaneously enable address and undefined behavior sanitizers, in the same manner that LLVM's 'HandleLLVMOptions.cmake' allows. Prior to this patch, `cmake -DLLVM_USE_SANITIZER="Address;Undefined"` would succeed and the build would build most of the LLVM project with `-fsanitize=address,undefined`, but a warning would be printed by libcxx's CMake, and the build would use neither sanitizer. This patch results in no warning being printed, and both sanitizers are used in building libcxx. Reviewers: jroelofs, EricWF, ldionne, #libc! Subscribers: mgorny, dexonsmith, llvm-commits, libcxx-commits Tags: #libc Differential Revision: https://reviews.llvm.org/D77466

view details

push time in 2 months

push eventllvm/llvm-project

Brian Gesiak

commit sha 627e01feb718dd1aa8e184545976b7229de312a2

[coroutines] Don't build promise init with no args Summary: In the case of a coroutine that takes no arguments, `Sema::buildCoroutinePromise` constructs a list-initialization (`clang::InitializationKind::InitKind::IK_DirectList`) of the promise variable, using a list of empty arguments. So, if one were to dump the promise `VarDecl` immediately after `Sema::ActOnCoroutineBodyStart` calls `checkCoroutineContext`, for a coroutine function that takes no arguments, they'd see the following: ``` VarDecl 0xb514490 <test.cpp:26:3> col:3 __promise '<dependent type>' callinit `-ParenListExpr 0xb514510 <col:3> 'NULL TYPE' ``` But after this patch, the `ParenListExpr` is no longer constructed, and the promise variable uses default initialization (`clang::InitializationKind::InitKind::IK_Default`): ``` VarDecl 0x63100012dae0 <test.cpp:26:3> col:3 __promise '<dependent type>' ``` As far as I know, there's no case in which list-initialization with no arguments differs from default initialization, but if I'm wrong please let me know (and I'll add a test case that demonstrates the change -- but as-is I can't think of a functional test case for this). I think both comply with the wording of C++20 `[dcl.fct.def.coroutine]p5`: > _promise-constructor-arguments_ is determined as follows: overload resolution is performed on a promise constructor call created by assembling an argument list with lvalues `p1 ... pn`. If a viable constructor is found (12.4.2), then _promise-constructor-arguments_ is `(p1, ... , pn)`, otherwise _promise-constructor-arguments_ is empty. Still, I think this patch is an improvement regardless, because it reduces the size of the AST. Reviewers: GorNishanov, rsmith, lewissbaker Subscribers: EricWF, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D70555

view details

push time in 2 months

startedbanach-space/llvm-tutor

started time in 3 months

push eventllvm/llvm-project

Brian Gesiak

commit sha aa85b437a970a12b74a8793cbd98dbb2f95afb6d

[Coroutines] Use dbg.declare for frame variables Summary: https://gist.github.com/modocache/ed7c62f6e570766c0f39b35dad675c2f is an example of a small C++ program that uses C++20 coroutines that is difficult to debug, due to the loss of debug info for variables that "spill" across coroutine suspension boundaries. This patch addresses that issue by inserting 'llvm.dbg.declare' intrinsics that point the debugger to the variables' location at an offset to the coroutine frame. With this patch, I confirmed that running the 'frame variable' commands in https://gist.github.com/modocache/ed7c62f6e570766c0f39b35dad675c2f at the specified breakpoints results in the correct values being printed for coroutine frame variables 'i' and 'j' when using an lldb built from trunk, as well as with gdb 8.3 (lldb 9.0.1, however, could not print the values). The added test case also verifies this improved behavior. The existing coro-debug.ll test case is also modified to reflect the locations at which Clang actually places calls to 'dbg.declare', and additional checks are added to ensure this patch works as intended in that example as well. Reviewers: vsk, jmorse, GorNishanov, lewissbaker, wenlei Subscribers: EricWF, aprantl, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D75338

view details

push time in 3 months

more