Page MenuHomePhabricator

sgraenitz (Stefan Gränitz)
dev

Projects

User does not belong to any projects.

User Details

User Since
Jul 10 2018, 11:23 AM (114 w, 4 d)

We may think in generalities, but weliveindetail

Recent Activity

Sun, Aug 23

sgraenitz added a comment to D85974: [ORC] Add a LLJITWithThinLTOSummaries example in OrcV2Examples.

Looks good. Two bots failed, both unrelated to my change.
http://green.lab.llvm.org/green/job/lldb-cmake/23457/
http://green.lab.llvm.org/green/job/clang-stage1-cmake-RA-expensive/17430/

Sun, Aug 23, 12:04 PM · Restricted Project
sgraenitz committed rGb014cc0f655d: [ORC] Add a LLJITWithThinLTOSummaries example in OrcV2Examples (authored by sgraenitz).
[ORC] Add a LLJITWithThinLTOSummaries example in OrcV2Examples
Sun, Aug 23, 5:05 AM
sgraenitz closed D85974: [ORC] Add a LLJITWithThinLTOSummaries example in OrcV2Examples.
Sun, Aug 23, 5:05 AM · Restricted Project

Aug 20 2020

sgraenitz added a comment to D85974: [ORC] Add a LLJITWithThinLTOSummaries example in OrcV2Examples.

Back to the review: I'd like to keep the test for the example and see how the build servers behave. Generally it might be useful to have tests for all the "LLJITWith..." examples right?
Do you think it makes sense to land the patch on the weekend in order to keep the number of people getting annoyed by me breaking their builds at a minimum? :)

Aug 20 2020, 12:58 PM · Restricted Project
sgraenitz added a comment to D85974: [ORC] Add a LLJITWithThinLTOSummaries example in OrcV2Examples.

I will get back to performance evaluation maybe in a few weeks and sure I am happy to share my progress.

Aug 20 2020, 12:52 PM · Restricted Project

Aug 15 2020

sgraenitz updated the diff for D85974: [ORC] Add a LLJITWithThinLTOSummaries example in OrcV2Examples.

Fix clang-tidy warnings

Aug 15 2020, 5:12 AM · Restricted Project

Aug 14 2020

sgraenitz updated the diff for D85974: [ORC] Add a LLJITWithThinLTOSummaries example in OrcV2Examples.

Fix clang-format issue and rebase

Aug 14 2020, 11:00 AM · Restricted Project
sgraenitz added a comment to D85974: [ORC] Add a LLJITWithThinLTOSummaries example in OrcV2Examples.

What performance issues did you run in to with threading and performance? I haven't had a chance to look in to that yet.

Aug 14 2020, 10:28 AM · Restricted Project
sgraenitz committed rG63aed9cbe5b0: [ORC] Build LLJITWithChildProcess example only on UNIX host systems (authored by sgraenitz).
[ORC] Build LLJITWithChildProcess example only on UNIX host systems
Aug 14 2020, 9:09 AM
sgraenitz updated the diff for D85974: [ORC] Add a LLJITWithThinLTOSummaries example in OrcV2Examples.

Test discovery should ignore subdirectories that contain test inputs.

Aug 14 2020, 8:05 AM · Restricted Project
sgraenitz abandoned D72176: Make ErrorList class default constructible and add simple push_back() method.
Aug 14 2020, 8:00 AM · Restricted Project
sgraenitz abandoned D73837: Add minimal test for the ThinLtoJIT example.
Aug 14 2020, 7:59 AM · Restricted Project
sgraenitz abandoned D75087: [ORC] Add LookupKind::TransitiveStatic for linker-resolved transitive dependencies.
Aug 14 2020, 7:59 AM · Restricted Project
sgraenitz abandoned D75090: [ORC] Align weak definition handling in JITDylib::defineMaterializing() and JITDylib::defineImpl().
Aug 14 2020, 7:58 AM · Restricted Project
sgraenitz added a comment to D85974: [ORC] Add a LLJITWithThinLTOSummaries example in OrcV2Examples.

I would like to remove the ThinLtoJIT example. It needs a more decent threading library to speed-up multithreaded compile times and that's easier to do out-of-tree.
This might be a useful (minimal) portion to keep in-tree. What do you think?

Aug 14 2020, 7:56 AM · Restricted Project
sgraenitz requested review of D85974: [ORC] Add a LLJITWithThinLTOSummaries example in OrcV2Examples.
Aug 14 2020, 7:47 AM · Restricted Project
sgraenitz added a comment to D85919: [ORC] Add JITLink-compatible remote memory-manager and LLJITWithChildProcess example.

Fixed with commit 28e1015e327ec56ac4bf93967d3aa2915b215e36

Aug 14 2020, 3:10 AM · Restricted Project
sgraenitz committed rG28e1015e327e: [ORC] Fix missing include in OrcRemoteTargetClient.h (authored by sgraenitz).
[ORC] Fix missing include in OrcRemoteTargetClient.h
Aug 14 2020, 3:01 AM
sgraenitz added a comment to D85919: [ORC] Add JITLink-compatible remote memory-manager and LLJITWithChildProcess example.

It broke the BuildingAJIT-Ch5 build in http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/73310
Looking at it now.

Aug 14 2020, 2:54 AM · Restricted Project
sgraenitz committed rG397b3cc9e5aa: [ORC][NFC] Fix a header comment (authored by sgraenitz).
[ORC][NFC] Fix a header comment
Aug 14 2020, 2:46 AM
sgraenitz added a comment to D85919: [ORC] Add JITLink-compatible remote memory-manager and LLJITWithChildProcess example.

Would you mind if I moved yours into a header once my patch is ready?

Aug 14 2020, 2:40 AM · Restricted Project
sgraenitz committed rG9a47bcae7c56: [ORC][NFC] Refactor loop to determine name of init symbol in… (authored by sgraenitz).
[ORC][NFC] Refactor loop to determine name of init symbol in…
Aug 14 2020, 2:36 AM
sgraenitz closed D85922: [ORC][NFC] Refactor loop to determine name of init symbol in IRMaterializationUnit.
Aug 14 2020, 2:35 AM · Restricted Project
sgraenitz committed rG6bf74a924fe9: [ORC] In LLLazyJIT provide public access to the CompileOnDemandLayer (authored by sgraenitz).
[ORC] In LLLazyJIT provide public access to the CompileOnDemandLayer
Aug 14 2020, 2:35 AM
sgraenitz closed D85921: [ORC] In LLLazyJIT provide public access to the CompileOnDemandLayer.
Aug 14 2020, 2:35 AM · Restricted Project
sgraenitz committed rG30c4561e36ea: [ORC] Add JITLink-compatible remote memory-manager and LLJITWithChildProcess… (authored by sgraenitz).
[ORC] Add JITLink-compatible remote memory-manager and LLJITWithChildProcess…
Aug 14 2020, 2:35 AM
sgraenitz closed D85919: [ORC] Add JITLink-compatible remote memory-manager and LLJITWithChildProcess example.
Aug 14 2020, 2:35 AM · Restricted Project

Aug 13 2020

sgraenitz added a comment to D85919: [ORC] Add JITLink-compatible remote memory-manager and LLJITWithChildProcess example.

I didn't see a memory manager in the new TargetProcessControl API (yet). Maybe it can also be migrated there.

Aug 13 2020, 1:02 PM · Restricted Project
sgraenitz committed rG5bcd32b74494: [ORC][NFC] Fix typo in comment (authored by sgraenitz).
[ORC][NFC] Fix typo in comment
Aug 13 2020, 12:15 PM
sgraenitz requested review of D85922: [ORC][NFC] Refactor loop to determine name of init symbol in IRMaterializationUnit.
Aug 13 2020, 12:11 PM · Restricted Project
sgraenitz requested review of D85921: [ORC] In LLLazyJIT provide public access to the CompileOnDemandLayer.
Aug 13 2020, 12:04 PM · Restricted Project
sgraenitz committed rGf12db8cf750b: [ORC] cloneToNewContext() can work with a const-ref to ThreadSafeModule (authored by sgraenitz).
[ORC] cloneToNewContext() can work with a const-ref to ThreadSafeModule
Aug 13 2020, 12:02 PM
sgraenitz committed rG34a5669ccd8b: [ORC] Fix SymbolLookupSet::containsDuplicates() (authored by sgraenitz).
[ORC] Fix SymbolLookupSet::containsDuplicates()
Aug 13 2020, 12:02 PM
sgraenitz requested review of D85919: [ORC] Add JITLink-compatible remote memory-manager and LLJITWithChildProcess example.
Aug 13 2020, 11:44 AM · Restricted Project

Mar 4 2020

sgraenitz committed rG76c59a63bc7f: [ORC] Decompose LazyCallThroughManager::callThroughToSymbol() (authored by sgraenitz).
[ORC] Decompose LazyCallThroughManager::callThroughToSymbol()
Mar 4 2020, 3:47 PM
sgraenitz closed D75084: [ORC] Decompose LazyCallThroughManager::callThroughToSymbol().
Mar 4 2020, 3:47 PM · Restricted Project
sgraenitz updated the diff for D75084: [ORC] Decompose LazyCallThroughManager::callThroughToSymbol().

Remove assert(Notifiers.find(TrampolineAddr) != Notifiers.end()); from findReexport() -- NotifyResolved may have been issued from a concurrent call-through

Mar 4 2020, 3:11 PM · Restricted Project
sgraenitz updated the diff for D75084: [ORC] Decompose LazyCallThroughManager::callThroughToSymbol().

Factor out callThroughToSymbol(). Drop example use case from ThinLtoJIT. Format change set.

Mar 4 2020, 3:11 PM · Restricted Project
sgraenitz added a comment to D75087: [ORC] Add LookupKind::TransitiveStatic for linker-resolved transitive dependencies.

So the aim here is to enable generation of lazy stubs without having to materialize any IR, right?

Mar 4 2020, 2:37 PM · Restricted Project
sgraenitz added a comment to D75090: [ORC] Align weak definition handling in JITDylib::defineMaterializing() and JITDylib::defineImpl().

Is the idea here that the call-through stub is emitted as weak, and then replaced by discovery with a strong definition if one is found in time? Or have I misunderstood?

Mar 4 2020, 2:05 PM · Restricted Project

Feb 29 2020

sgraenitz committed rGec1e7faf65ae: [ExecutionEngine] Add JITSymbolFlags::fromSummary(GlobalValueSummary*) (authored by sgraenitz).
[ExecutionEngine] Add JITSymbolFlags::fromSummary(GlobalValueSummary*)
Feb 29 2020, 4:02 AM
sgraenitz closed D75082: [ExecutionEngine] Add JITSymbolFlags::fromSummary(GlobalValueSummary*).
Feb 29 2020, 4:02 AM · Restricted Project

Feb 27 2020

sgraenitz abandoned D75083: [ORC] Add SymbolState::Emitted to isInMaterializationPhase().

I have removed it in b7aa1cc3a43 and replaced it with direct checks on the symbol state, so I think you can discard this.

Feb 27 2020, 1:04 PM · Restricted Project
sgraenitz added a comment to D75082: [ExecutionEngine] Add JITSymbolFlags::fromSummary(GlobalValueSummary*).

Thanks for your review Lang. Will land it soon.

Feb 27 2020, 1:04 PM · Restricted Project

Feb 24 2020

sgraenitz created D75090: [ORC] Align weak definition handling in JITDylib::defineMaterializing() and JITDylib::defineImpl().
Feb 24 2020, 4:18 PM · Restricted Project
sgraenitz added inline comments to D75087: [ORC] Add LookupKind::TransitiveStatic for linker-resolved transitive dependencies.
Feb 24 2020, 3:33 PM · Restricted Project
sgraenitz created D75087: [ORC] Add LookupKind::TransitiveStatic for linker-resolved transitive dependencies.
Feb 24 2020, 3:15 PM · Restricted Project
sgraenitz added inline comments to D75084: [ORC] Decompose LazyCallThroughManager::callThroughToSymbol().
Feb 24 2020, 2:57 PM · Restricted Project
sgraenitz created D75084: [ORC] Decompose LazyCallThroughManager::callThroughToSymbol().
Feb 24 2020, 2:48 PM · Restricted Project
sgraenitz created D75083: [ORC] Add SymbolState::Emitted to isInMaterializationPhase().
Feb 24 2020, 2:47 PM · Restricted Project
sgraenitz created D75082: [ExecutionEngine] Add JITSymbolFlags::fromSummary(GlobalValueSummary*).
Feb 24 2020, 2:38 PM · Restricted Project

Feb 18 2020

sgraenitz accepted D74300: [ORC] Add generic initializer/deinitializer support..

Whether the initializers would be re-run is up to the platform.

Feb 18 2020, 7:57 AM · Restricted Project

Feb 16 2020

sgraenitz added a comment to D74300: [ORC] Add generic initializer/deinitializer support..

Will initializer symbols be looked up and run again when calling initialize() a second time on a JITDylib? More specifically, is it possible for a client to break this process down and initialize specific (or simply all uninitialized) MaterializationUnits? Otherwise, wouldn't it mean modules cannot be added (and initialized) to a JITDylib after initializiation (without re-init)?

Feb 16 2020, 5:06 PM · Restricted Project

Feb 12 2020

sgraenitz added a comment to D74300: [ORC] Add generic initializer/deinitializer support..

As expected this doesn't affect my code much so far. Only the symbol promotion changes in CompileOnDemandLayer (see inline comment). What do you think?

Feb 12 2020, 12:06 PM · Restricted Project
sgraenitz added a comment to D74300: [ORC] Add generic initializer/deinitializer support..

Hi Lang, I had a look at the first half of your changes. So far it looks really great!
A few mini notes inline and a larger one that's semi-related. I will continue with the second half and run this by the ThinLtoJIT example asap.

Feb 12 2020, 10:15 AM · Restricted Project

Feb 8 2020

sgraenitz added a comment to D72176: Make ErrorList class default constructible and add simple push_back() method.

This seems like a nice change for ErrorList.

What are you using it for though?
[...]
In my experience, whenever I have used ErrorList it was really because I wanted to be able to report multiple errors, never because I wanted to be able to recover from them. However I think this kind of reporting is better handled by a logging idiom (like ExecutionSession::reportError).

Feb 8 2020, 3:53 AM · Restricted Project

Feb 2 2020

sgraenitz added inline comments to D73837: Add minimal test for the ThinLtoJIT example.
Feb 2 2020, 11:20 AM · Restricted Project
sgraenitz updated the diff for D73837: Add minimal test for the ThinLtoJIT example.

Use numeric substitution blocks to verify the sum of submitted modules is 6

Feb 2 2020, 11:20 AM · Restricted Project

Feb 1 2020

sgraenitz added a comment to D73837: Add minimal test for the ThinLtoJIT example.

I wrote this in C, compiled to LLVM IR (on macOS with a TOT clang) and removed a lot of bulk manually. Would you recommend to commit the C sources too? For now I put them here: https://github.com/weliveindetail/ThinLtoJitTests

Feb 1 2020, 1:20 PM · Restricted Project
sgraenitz created D73837: Add minimal test for the ThinLtoJIT example.
Feb 1 2020, 1:02 PM · Restricted Project
sgraenitz committed rG234f3b16918b: Add ThinLtoJIT example (authored by sgraenitz).
Add ThinLtoJIT example
Feb 1 2020, 11:29 AM
sgraenitz closed D72486: Add ThinLtoJIT example.
Feb 1 2020, 11:29 AM · Restricted Project
sgraenitz updated the diff for D72486: Add ThinLtoJIT example.

Polish initialization, cleanup, formatting

Feb 1 2020, 10:55 AM · Restricted Project
sgraenitz updated the diff for D72486: Add ThinLtoJIT example.

Refine ThinLtoModuleIndex::selectNextPaths()

Feb 1 2020, 10:44 AM · Restricted Project
sgraenitz updated the diff for D72486: Add ThinLtoJIT example.

Add -print-stats command line flag

Feb 1 2020, 10:00 AM · Restricted Project

Jan 31 2020

sgraenitz updated the diff for D72486: Add ThinLtoJIT example.

Move ExplicitMemoryBarrier enum to ThinLtoJIT

Jan 31 2020, 2:25 PM · Restricted Project
sgraenitz updated the diff for D72486: Add ThinLtoJIT example.

Split off ThinLtoInstrumentationLayer::dump() from its dtor

Jan 31 2020, 2:16 PM · Restricted Project
sgraenitz updated the diff for D72486: Add ThinLtoJIT example.

Assume single entries in summary lists after checking module paths to be unique

Jan 31 2020, 2:16 PM · Restricted Project
sgraenitz updated the diff for D72486: Add ThinLtoJIT example.

The blocking single-module parsing function parseModuleFromFile() should use the regular primitives

Jan 31 2020, 3:59 AM · Restricted Project
sgraenitz updated the diff for D72486: Add ThinLtoJIT example.

Drop DiscoveryThread module requests via the definition generator. Instead trigger asynchronous module adding from there.

Jan 31 2020, 3:58 AM · Restricted Project
sgraenitz updated the diff for D72486: Add ThinLtoJIT example.

Let scheduleModuleParsing() process a range of paths with a single lock

Jan 31 2020, 3:58 AM · Restricted Project
sgraenitz updated the diff for D72486: Add ThinLtoJIT example.

Don't risk "post-mortem" access violations. Keep DiscoveryThread attached and join it on shutdown.

Jan 31 2020, 3:54 AM · Restricted Project
sgraenitz updated the diff for D72486: Add ThinLtoJIT example.

Prefer std::atomic fetch_add over compare-exchange in reserveDiscoveryFlags()

Jan 31 2020, 3:54 AM · Restricted Project
sgraenitz updated the diff for D72486: Add ThinLtoJIT example.

Accept ThinLTO global index as input file

Jan 31 2020, 3:54 AM · Restricted Project
sgraenitz updated the diff for D72486: Add ThinLtoJIT example.

bench script: link and disassemble global ThinLTO index file and respect LDFLAGS in static compilation

Jan 31 2020, 3:51 AM · Restricted Project

Jan 26 2020

sgraenitz added a comment to D72486: Add ThinLtoJIT example.

LGTM! I really like this. I'm all for adding it as another example if you're happy to maintain it.

The code could probably use some extra comments (including pointers to your talk), but I think that would be better dealt with in-tree.

Jan 26 2020, 11:37 AM · Restricted Project
sgraenitz updated the diff for D72486: Add ThinLtoJIT example.

Drop requirement to apply D72301 before this patch

Jan 26 2020, 9:11 AM · Restricted Project
sgraenitz updated the diff for D72486: Add ThinLtoJIT example.

Adjust for emulated-TLS changes in ce2207abaf9a

Jan 26 2020, 9:11 AM · Restricted Project

Jan 19 2020

sgraenitz added a comment to D72486: Add ThinLtoJIT example.

If you want to build this patch, please apply D72301 before. I will try and make it work without it soon.

Jan 19 2020, 12:12 PM · Restricted Project
sgraenitz updated the diff for D72486: Add ThinLtoJIT example.

Sort PathRank candidates by minimal distance

Jan 19 2020, 11:49 AM · Restricted Project
sgraenitz updated the diff for D72486: Add ThinLtoJIT example.

Don't dispatch materialization for trivial modules to the thread pool

Jan 19 2020, 11:49 AM · Restricted Project
sgraenitz updated the diff for D72486: Add ThinLtoJIT example.

Submit actual module keys and sort getAllModulePaths() by ID

Jan 19 2020, 11:44 AM · Restricted Project
sgraenitz updated the diff for D72486: Add ThinLtoJIT example.

Fix GUID when instrumenting functions with local linkage

Jan 19 2020, 11:44 AM · Restricted Project
sgraenitz updated the diff for D72486: Add ThinLtoJIT example.

Respect environment variables CFLAGS and EXEC_ARGS in the bench script

Jan 19 2020, 11:44 AM · Restricted Project

Jan 18 2020

sgraenitz abandoned D72301: [ORC] Fix the move-captured std::unique_ptr vs. std::function dilemma.

Indeed, that sounds like a better solution.

Jan 18 2020, 8:43 AM · Restricted Project

Jan 17 2020

sgraenitz updated the diff for D72486: Add ThinLtoJIT example.

Pardon, apparently the last update was missing the actual code changes. Trying again.

Jan 17 2020, 6:49 AM · Restricted Project

Jan 15 2020

sgraenitz updated the diff for D72486: Add ThinLtoJIT example.

Avoid concurrent addModule() calls, improve ranking algorithm in discovery, add multi-threaded bitcode parsing

Jan 15 2020, 2:18 PM · Restricted Project

Jan 14 2020

sgraenitz added inline comments to D72486: Add ThinLtoJIT example.
Jan 14 2020, 8:31 AM · Restricted Project

Jan 13 2020

sgraenitz updated the diff for D72486: Add ThinLtoJIT example.

Make LookaheadLevels and LookupOnAdd configurable

Jan 13 2020, 11:03 AM · Restricted Project
sgraenitz abandoned D72563: [ORC] Fix runAsMain() utility function for lli to pass arguments to JITed main.

This was fixed with 2cdb18afda8

Jan 13 2020, 5:20 AM · Restricted Project

Jan 12 2020

sgraenitz added a comment to D72486: Add ThinLtoJIT example.

Hi Stefan. Thanks for posting this! I’m out on vacation this week, but looking forward to reviewing when I get back to the office next week.

Jan 12 2020, 9:48 AM · Restricted Project
sgraenitz updated the diff for D72486: Add ThinLtoJIT example.

DataLayout can be owned by MangleWrapper

Jan 12 2020, 9:20 AM · Restricted Project
sgraenitz updated the diff for D72486: Add ThinLtoJIT example.

Use runAsMain() utility function from ExecutionUtils

Jan 12 2020, 9:17 AM · Restricted Project

Jan 11 2020

sgraenitz added a comment to rGece8fed60906: [ORC] Add a runAsMain utility function to ExecutionUtils..

I was about to say enjoy your time off and have a look here on Monday: D72563 I guess we don't need it anymore :)
Is there a particular reason to pass lli as the program name instead of the main source file? Not saying that this made a lot of sense in the first place, just wondering.

Jan 11 2020, 4:07 PM
sgraenitz created D72563: [ORC] Fix runAsMain() utility function for lli to pass arguments to JITed main.
Jan 11 2020, 3:57 PM · Restricted Project

Jan 10 2020

sgraenitz updated the diff for D72486: Add ThinLtoJIT example.

Fix: Protect the set of parsed module IDs from concurrent access

Jan 10 2020, 4:25 PM · Restricted Project
sgraenitz updated the diff for D72486: Add ThinLtoJIT example.

Polishing, comments, cosmetics

Jan 10 2020, 4:25 PM · Restricted Project
sgraenitz updated the diff for D72486: Add ThinLtoJIT example.

Make it configurable whether the symbol generator can nugde things into discovery

Jan 10 2020, 4:25 PM · Restricted Project
sgraenitz updated the diff for D72486: Add ThinLtoJIT example.

Make DiscoveryFlagsPerBatch and MemFence settings configurable

Jan 10 2020, 4:25 PM · Restricted Project
sgraenitz updated the diff for D72486: Add ThinLtoJIT example.

Workaround: parsed module requested but waiting in JITDylib::define()

Jan 10 2020, 4:25 PM · Restricted Project