Page MenuHomePhabricator

jberdine (Josh Berdine)
User

Projects

User does not belong to any projects.

User Details

User Since
Sep 17 2018, 3:19 PM (134 w, 23 h)

Recent Activity

Mon, Apr 5

jberdine committed rG8e4fc55a0e54: [NFC][OCaml] Remove vestigial CAMLprim declarations (authored by jberdine).
[NFC][OCaml] Remove vestigial CAMLprim declarations
Mon, Apr 5, 2:59 AM
jberdine committed rGf4d156aed0f8: [NFC][OCaml] Reformat to clean up following CAMLprim removal (authored by jberdine).
[NFC][OCaml] Reformat to clean up following CAMLprim removal
Mon, Apr 5, 2:59 AM
jberdine committed rGd9bbd9864578: [OCaml] Omit unnecessary GC root registrations (authored by jberdine).
[OCaml] Omit unnecessary GC root registrations
Mon, Apr 5, 2:59 AM
jberdine committed rG2c82ea1849dc: [OCaml] Code simplification using string allocation functions (authored by jberdine).
[OCaml] Code simplification using string allocation functions
Mon, Apr 5, 2:59 AM
jberdine committed rGe5b7fedc573c: [OCaml] Code simplification using option allocation functions (authored by jberdine).
[OCaml] Code simplification using option allocation functions
Mon, Apr 5, 2:59 AM
jberdine closed D99477: [NFC][OCaml] Reformat to clean up following CAMLprim removal.
Mon, Apr 5, 2:59 AM · Restricted Project
jberdine committed rG58bb9222dd29: [OCaml] Minor optimizations by avoiding double initialization (authored by jberdine).
[OCaml] Minor optimizations by avoiding double initialization
Mon, Apr 5, 2:59 AM
jberdine closed D99476: [NFC][OCaml] Remove vestigial CAMLprim declarations.
Mon, Apr 5, 2:59 AM · Restricted Project
jberdine committed rG5c25ff8739e0: [OCaml] Fix unsafe uses of Store_field (authored by jberdine).
[OCaml] Fix unsafe uses of Store_field
Mon, Apr 5, 2:59 AM
jberdine closed D99475: [OCaml] Omit unnecessary GC root registrations.
Mon, Apr 5, 2:59 AM · Restricted Project
jberdine closed D99474: [OCaml] Code simplification using string allocation functions.
Mon, Apr 5, 2:59 AM · Restricted Project
jberdine closed D99473: [OCaml] Code simplification using option allocation functions.
Mon, Apr 5, 2:59 AM · Restricted Project
jberdine closed D99472: [OCaml] Minor optimizations by avoiding double initialization.
Mon, Apr 5, 2:59 AM · Restricted Project
jberdine closed D99471: [OCaml] Fix unsafe uses of Store_field.
Mon, Apr 5, 2:59 AM · Restricted Project
jberdine added a comment to D99475: [OCaml] Omit unnecessary GC root registrations.

Thank you very much @vaivaswatha, that is very helpful!

Mon, Apr 5, 2:27 AM · Restricted Project

Thu, Apr 1

jberdine added a comment to D99475: [OCaml] Omit unnecessary GC root registrations.

See https://github.com/jberdine/llvm-project/tree/ocaml for this stack on github.

Thu, Apr 1, 7:12 AM · Restricted Project

Wed, Mar 31

jberdine added a comment to D99475: [OCaml] Omit unnecessary GC root registrations.

I have been testing this stack of diffs with a sort of stress test that involves running a system that consumes bitcode and uses the ocaml api to traverse and translate it. The testing has used a range of OCaml GC settings in order to make the GC work much harder and trigger much more often than usual (e.g. Gc.set {(Gc.get ()) with minor_heap_size= 1024; space_overhead= 20}). The reasoning here is that if the bindings are not playing nice with the GC, then there is a higher chance to uncover such issues if the GC runs much more often. This testing has not revealed any issues.

Wed, Mar 31, 4:25 AM · Restricted Project

Sun, Mar 28

jberdine added a comment to D99475: [OCaml] Omit unnecessary GC root registrations.

I intend to do some additional testing of this, but put this diff up in the meantime for feedback and perhaps also some wider testing.

Sun, Mar 28, 3:39 PM · Restricted Project
jberdine requested review of D99477: [NFC][OCaml] Reformat to clean up following CAMLprim removal.
Sun, Mar 28, 3:35 PM · Restricted Project
jberdine requested review of D99476: [NFC][OCaml] Remove vestigial CAMLprim declarations.
Sun, Mar 28, 3:34 PM · Restricted Project
jberdine requested review of D99475: [OCaml] Omit unnecessary GC root registrations.
Sun, Mar 28, 3:33 PM · Restricted Project
jberdine requested review of D99474: [OCaml] Code simplification using string allocation functions.
Sun, Mar 28, 3:32 PM · Restricted Project
jberdine requested review of D99473: [OCaml] Code simplification using option allocation functions.
Sun, Mar 28, 3:31 PM · Restricted Project
jberdine requested review of D99472: [OCaml] Minor optimizations by avoiding double initialization.
Sun, Mar 28, 3:30 PM · Restricted Project
jberdine requested review of D99471: [OCaml] Fix unsafe uses of Store_field.
Sun, Mar 28, 3:28 PM · Restricted Project

Sat, Mar 27

jberdine accepted D99450: [OCaml][Test] Fix and enable debuginfo.ml test..

LGTM

Sat, Mar 27, 3:18 AM · Restricted Project

Fri, Mar 26

jberdine committed rGd50fe9f0d6b9: [NFC][OCaml] Resolve a couple more compilation warnings (authored by jberdine).
[NFC][OCaml] Resolve a couple more compilation warnings
Fri, Mar 26, 1:58 PM
jberdine closed D99420: [NFC][OCaml] Resolve a couple more compilation warnings.
Fri, Mar 26, 1:58 PM · Restricted Project
jberdine added a comment to D99403: [OCaml][DebugInfo] Add tests for the recently added debug info API.

I looked over the new commit and it is good. Personally I prefer the new style anyhow. :-)

Fri, Mar 26, 1:55 PM · Restricted Project
jberdine added a reviewer for D99420: [NFC][OCaml] Resolve a couple more compilation warnings: vaivaswatha.
Fri, Mar 26, 9:28 AM · Restricted Project
jberdine requested review of D99420: [NFC][OCaml] Resolve a couple more compilation warnings.
Fri, Mar 26, 9:27 AM · Restricted Project
jberdine accepted D99403: [OCaml][DebugInfo] Add tests for the recently added debug info API.

LGTM, thanks!

Fri, Mar 26, 9:26 AM · Restricted Project
jberdine committed rG6f77926f464b: [OCaml] Fix a possible crash in llvm_struct_name (authored by jberdine).
[OCaml] Fix a possible crash in llvm_struct_name
Fri, Mar 26, 5:02 AM
jberdine committed rG0b1dc49ca38a: [NFC][OCaml] Resolve const and unsigned compilation warnings (authored by jberdine).
[NFC][OCaml] Resolve const and unsigned compilation warnings
Fri, Mar 26, 5:02 AM
jberdine committed rGb06c669114e2: [NFC][OCaml] Simplify llvm_global_initializer using ptr_to_option (authored by jberdine).
[NFC][OCaml] Simplify llvm_global_initializer using ptr_to_option
Fri, Mar 26, 5:02 AM
jberdine closed D99393: [OCaml] Fix a possible crash in llvm_struct_name.
Fri, Mar 26, 5:02 AM · Restricted Project
jberdine closed D99392: [NFC][OCaml] Resolve const and unsigned compilation warnings.
Fri, Mar 26, 5:01 AM · Restricted Project
jberdine closed D99391: [NFC][OCaml] Simplify llvm_global_initializer using ptr_to_option.
Fri, Mar 26, 5:01 AM · Restricted Project
jberdine added inline comments to D99393: [OCaml] Fix a possible crash in llvm_struct_name.
Fri, Mar 26, 3:02 AM · Restricted Project
jberdine updated the diff for D99393: [OCaml] Fix a possible crash in llvm_struct_name.

fix bug spotted in CR, formatting

Fri, Mar 26, 3:02 AM · Restricted Project

Thu, Mar 25

jberdine requested review of D99393: [OCaml] Fix a possible crash in llvm_struct_name.
Thu, Mar 25, 5:04 PM · Restricted Project
jberdine requested review of D99392: [NFC][OCaml] Resolve const and unsigned compilation warnings.
Thu, Mar 25, 5:04 PM · Restricted Project
jberdine requested review of D99391: [NFC][OCaml] Simplify llvm_global_initializer using ptr_to_option.
Thu, Mar 25, 5:03 PM · Restricted Project

Fri, Mar 19

jberdine added inline comments to D65195: [OCaml] Handle nullptr in Llvm.global_initializer.
Fri, Mar 19, 8:19 AM · Restricted Project
jberdine added inline comments to D98851: [OCaml] Add (get/set)_module_identifer functions.
Fri, Mar 19, 6:58 AM · Restricted Project
jberdine added inline comments to D98851: [OCaml] Add (get/set)_module_identifer functions.
Fri, Mar 19, 6:50 AM · Restricted Project
jberdine added inline comments to D98851: [OCaml] Add (get/set)_module_identifer functions.
Fri, Mar 19, 5:04 AM · Restricted Project

Thu, Mar 18

jberdine added inline comments to D98851: [OCaml] Add (get/set)_module_identifer functions.
Thu, Mar 18, 2:56 PM · Restricted Project
jberdine accepted D98851: [OCaml] Add (get/set)_module_identifer functions.

LGTM

Thu, Mar 18, 6:23 AM · Restricted Project

Wed, Mar 17

jberdine committed rG2571a0936719: [OCaml] Handle nullptr in Llvm.global_initializer (authored by kren1).
[OCaml] Handle nullptr in Llvm.global_initializer
Wed, Mar 17, 6:41 AM
jberdine closed D65195: [OCaml] Handle nullptr in Llvm.global_initializer.
Wed, Mar 17, 6:41 AM · Restricted Project
jberdine committed rGcca3167de0b6: [NFC][OCaml] Fix documentation for verify_function and const_of_int64 (authored by HuStmpHrrr).
[NFC][OCaml] Fix documentation for verify_function and const_of_int64
Wed, Mar 17, 5:10 AM
jberdine closed D77884: fix the documentation for ocaml bindings.
Wed, Mar 17, 5:10 AM · Restricted Project
jberdine added a comment to D90831: DebugInfo support for OCaml bindings.

I see, it seems some of the builds are still using a version of OCaml older than 4.06 (from 11-2017). The difference between using caml_alloc_initialized_string and the code with memcpy is about const char * versus char *. If OCaml is configured with immutable strings (the default starting with 4.10), then String_val returns a const char *. I guess that supporting such old versions will necessitate compilation warnings about const.

Wed, Mar 17, 4:18 AM · Restricted Project

Tue, Mar 16

jberdine added a comment to D90831: DebugInfo support for OCaml bindings.

Ah, I see, the failure is just tidy, go for it then. I don't know if it can be configured, but clang-tidy cannot be obeyed on this code without breaking the build.

Tue, Mar 16, 12:24 PM · Restricted Project
jberdine accepted D90831: DebugInfo support for OCaml bindings.

Thanks @vaivaswatha for dealing with all my nitpicking! Yes, I've made a final pass over this and it looks good. I'd recheck the build before committing given the CI build failure.

Tue, Mar 16, 12:01 PM · Restricted Project
jberdine committed rGece6d8e72eaa: [OCaml] Add missing TypeKinds, Opcode, and AtomicRMWBinOps (authored by jberdine).
[OCaml] Add missing TypeKinds, Opcode, and AtomicRMWBinOps
Tue, Mar 16, 8:43 AM
jberdine closed D98578: [OCaml] Add missing TypeKinds, Opcode, and AtomicRMWBinOps.
Tue, Mar 16, 8:42 AM · Restricted Project
jberdine added a comment to D90831: DebugInfo support for OCaml bindings.

Looks good, thanks! I made a few very minor comments. I agree that the current state of clang-tidy is good. I don't know how to let it know about the OCaml-specific headers, and that e.g. value is a type declared there and it's capitalization is not up for discussion.

Tue, Mar 16, 6:08 AM · Restricted Project
jberdine updated the diff for D98578: [OCaml] Add missing TypeKinds, Opcode, and AtomicRMWBinOps.

appease clang-format

Tue, Mar 16, 5:41 AM · Restricted Project

Mon, Mar 15

jberdine committed rG5bb2757e218d: [OCaml][test] Fix Bindings/OCaml/executionengine.ml test (authored by jberdine).
[OCaml][test] Fix Bindings/OCaml/executionengine.ml test
Mon, Mar 15, 7:50 PM
jberdine closed D98593: [OCaml][test] Fix Bindings/OCaml/executionengine.ml test.
Mon, Mar 15, 7:50 PM · Restricted Project
jberdine added a comment to D98578: [OCaml] Add missing TypeKinds, Opcode, and AtomicRMWBinOps.

ninja check-llvm-bindings-ocaml passes (when rebased on top of D98593)

Mon, Mar 15, 2:51 PM · Restricted Project
jberdine updated the diff for D98578: [OCaml] Add missing TypeKinds, Opcode, and AtomicRMWBinOps.

add X86_amx type and rebase

Mon, Mar 15, 2:50 PM · Restricted Project
jberdine added a comment to D98593: [OCaml][test] Fix Bindings/OCaml/executionengine.ml test.

Now all tests run by ninja check-llvm-bindings-ocaml pass.

Mon, Mar 15, 2:44 PM · Restricted Project
jberdine updated the diff for D98593: [OCaml][test] Fix Bindings/OCaml/executionengine.ml test.

rebase and trim unnecessary detail from commit summary

Mon, Mar 15, 2:42 PM · Restricted Project
jberdine added inline comments to D90831: DebugInfo support for OCaml bindings.
Mon, Mar 15, 1:54 PM · Restricted Project
jberdine abandoned D60902: [OCaml] Add OCaml APIs to access DebugInfo.

This is superceded by https://reviews.llvm.org/D90831

Mon, Mar 15, 7:31 AM · Restricted Project
jberdine accepted D90831: DebugInfo support for OCaml bindings.

Thanks @vaivaswatha for making all these changes, and so promptly!

Mon, Mar 15, 6:20 AM · Restricted Project

Sun, Mar 14

jberdine added a comment to D90831: DebugInfo support for OCaml bindings.

I have not had time to complete a full round of review, but made some comments on the latest version.

Sun, Mar 14, 3:30 PM · Restricted Project

Mar 13 2021

jberdine requested review of D98593: [OCaml][test] Fix Bindings/OCaml/executionengine.ml test.
Mar 13 2021, 4:29 PM · Restricted Project
jberdine added inline comments to D90831: DebugInfo support for OCaml bindings.
Mar 13 2021, 3:08 PM · Restricted Project
jberdine added a comment to D98578: [OCaml] Add missing TypeKinds, Opcode, and AtomicRMWBinOps.

For reference, ninja check-all with this diff on my system passes all but 2 seemingly unrelated tests. (I don't know why it is complaining about macos SDK versions and -lSystem).

----------------------------------------------------------------------
Ran 126 tests in 3.332s
Mar 13 2021, 4:50 AM · Restricted Project
jberdine added a reviewer for D98578: [OCaml] Add missing TypeKinds, Opcode, and AtomicRMWBinOps: vaivaswatha.
Mar 13 2021, 4:45 AM · Restricted Project
jberdine requested review of D98578: [OCaml] Add missing TypeKinds, Opcode, and AtomicRMWBinOps.
Mar 13 2021, 4:41 AM · Restricted Project

Mar 12 2021

jberdine requested changes to D90831: DebugInfo support for OCaml bindings.

I have checked over this code, and tested it by adapting a system I work on to use this diff plus a few changes to do all the reading of debuginfo from bitcode. The changes I used in the experiment are available on the branch whose tip is here. With this I have successfully read the debuginfo of every global/function/instruction in every file under llvm/test, as well as several internal codebases. I have not done similar testing of the debuginfo creation side of the added APIs.

Mar 12 2021, 3:51 PM · Restricted Project

Oct 11 2019

jberdine added a comment to D60902: [OCaml] Add OCaml APIs to access DebugInfo.

I will experiment with putting the opam file below the repo root. Another potential stumbling point is that the opam package includes some patches for the build/install, see https://github.com/ocaml/opam-repository/tree/master/packages/llvm/llvm.9.0.0/files . Would it be too strange to include such patches here?

Oct 11 2019, 7:10 AM · Restricted Project
jberdine added a comment to D60902: [OCaml] Add OCaml APIs to access DebugInfo.

@whitequark, with this diff's approach of creating a hierarchy of types to mirror the LLVM-C DI types, is it acceptable to add the types and functions incrementally? That is, could we land this diff and add other types and functions later?

Oct 11 2019, 6:49 AM · Restricted Project
jberdine abandoned D52239: [OCaml] Add OCaml APIs to access DebugLoc info.

Thanks @whitequark , that is very helpful. I'll close this diff in favor of D60902 and continue discussion there.

Oct 11 2019, 6:49 AM · Restricted Project

Sep 30 2019

jberdine added a comment to D52239: [OCaml] Add OCaml APIs to access DebugLoc info.

@whitequark I could use some feedback on the direction of this patch relative to https://reviews.llvm.org/D60902. This one implements the accessors for the debug locations directly using the newer DI C bindings. On the other hand D60902 begins adding a hierarchy of types to the OCaml bindings, analogous to the DI hierarchy. This patch gives a more direct implementation for the debug location functions, but the other is more extensible if other DI accessors are needed later. Are either of these approaches acceptable? If not, can you explain briefly why so that I can propose an alternative?

Sep 30 2019, 4:24 AM · Restricted Project

Apr 24 2019

jberdine added a comment to D60473: [LLVM-C] Use dyn_cast instead of unwrap in LLVMGetDebugLoc functions.

Thanks!

Apr 24 2019, 6:31 AM · Restricted Project
jberdine added a comment to D60473: [LLVM-C] Use dyn_cast instead of unwrap in LLVMGetDebugLoc functions.

@whitequark at least while D52239 and D60902 are up in the air, could I ask you to commit this fix for the existing functions?

Apr 24 2019, 6:20 AM · Restricted Project

Apr 23 2019

jberdine added a comment to D60902: [OCaml] Add OCaml APIs to access DebugInfo.

To test this I have an OCaml client (a slightly modified version of https://github.com/facebook/infer/blob/master/sledge/src/llair/frontend.ml) that reads and prints the debug info using the functions in llvm_debuginfo.mli for all of the .bc and .ll files under the test directory, as well as a number of larger internal compilation units.

Apr 23 2019, 2:07 PM · Restricted Project

Apr 19 2019

jberdine added a comment to D60902: [OCaml] Add OCaml APIs to access DebugInfo.

This is an alternative to D52239 which adds OCaml wrappers of the C API that are as thin as I see how to make them. I added a new sublibrary since the exposed functions come from DebugInfo.h instead of Core.h, and that seemed to be the pattern for the other sublibraries. Does this seem like the right approach?

Apr 19 2019, 8:10 AM · Restricted Project
jberdine created D60902: [OCaml] Add OCaml APIs to access DebugInfo.
Apr 19 2019, 8:07 AM · Restricted Project

Apr 17 2019

jberdine added a comment to D60679: [LowerAtomic] Lower fadd and fsub atomicrmw instructions.

Thanks! Note that I don't have write access, so could I ask you to commit this?

Apr 17 2019, 6:13 AM · Restricted Project

Apr 16 2019

jberdine added a comment to D60489: [LLVM-C] Add DIFile Field Accesssors.

No, looks good, thanks!

Apr 16 2019, 3:09 PM · Restricted Project
jberdine abandoned D60795: [LLVM-C] Add LLVMDISubprogramGetLine accessor.

Included in D60725

Apr 16 2019, 2:45 PM · Restricted Project
jberdine added a comment to D60795: [LLVM-C] Add LLVMDISubprogramGetLine accessor.

Sounds good.

Apr 16 2019, 2:25 PM · Restricted Project
jberdine added a comment to D60473: [LLVM-C] Use dyn_cast instead of unwrap in LLVMGetDebugLoc functions.

AFAIU D60484 is about the accessors for the current debug location used by builders, while this diff's functions are about reading the debug info from existing IR values.

Apr 16 2019, 2:05 PM · Restricted Project
jberdine added a comment to D60795: [LLVM-C] Add LLVMDISubprogramGetLine accessor.

Thanks! Note that I don't have write access, so could I ask you to commit this?

Apr 16 2019, 1:56 PM · Restricted Project
jberdine added inline comments to D52239: [OCaml] Add OCaml APIs to access DebugLoc info.
Apr 16 2019, 1:56 PM · Restricted Project
jberdine added a comment to D52239: [OCaml] Add OCaml APIs to access DebugLoc info.

I've updated this to implement the accessors using the new DI APIs instead of the old wrapped value ones, using the functions added in D60489, D60725 and D60795.

Apr 16 2019, 1:42 PM · Restricted Project
jberdine updated the diff for D52239: [OCaml] Add OCaml APIs to access DebugLoc info.

update to use new DI APIs

Apr 16 2019, 1:35 PM · Restricted Project
jberdine accepted D60489: [LLVM-C] Add DIFile Field Accesssors.

Modulo the names seemingly left over from copy-paste, this looks good to me and is working in my tests.

Apr 16 2019, 1:35 PM · Restricted Project
jberdine accepted D60725: [LLVM-C] Add Accessors For Global Variable Metadata Properties.

Thanks! These are working for me, though I needed to expose one more function, see D60795 (and feel free to incorporate it into this one).

Apr 16 2019, 1:35 PM · Restricted Project
jberdine created D60795: [LLVM-C] Add LLVMDISubprogramGetLine accessor.
Apr 16 2019, 1:35 PM · Restricted Project

Apr 15 2019

jberdine added a comment to D60680: [OCaml] Update api to account for FNeg and CallBr instructions.

Thanks! Could I bother you to commit this?

Apr 15 2019, 2:16 PM · Restricted Project
jberdine added a comment to D60679: [LowerAtomic] Lower fadd and fsub atomicrmw instructions.

I see what you mean about the redundancy between the LowerAtomic and AtomicExpand passes.

Apr 15 2019, 4:36 AM · Restricted Project
jberdine updated the diff for D60679: [LowerAtomic] Lower fadd and fsub atomicrmw instructions.

add tests

Apr 15 2019, 4:32 AM · Restricted Project