Page MenuHomePhabricator
Feed Advanced Search

Sun, Feb 16

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)?

Sun, Feb 16, 5:06 PM · Restricted Project

Wed, Feb 12

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?

Wed, Feb 12, 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.

Wed, Feb 12, 10:15 AM · Restricted Project

Sat, Feb 8

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).

Sat, Feb 8, 3:53 AM · Restricted Project

Sun, Feb 2

sgraenitz added inline comments to D73837: Add minimal test for the ThinLtoJIT example.
Sun, Feb 2, 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

Sun, Feb 2, 11:20 AM · Restricted Project

Sat, Feb 1

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

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

Polish initialization, cleanup, formatting

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

Refine ThinLtoModuleIndex::selectNextPaths()

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

Add -print-stats command line flag

Sat, Feb 1, 10:00 AM · Restricted Project

Fri, Jan 31

sgraenitz updated the diff for D72486: Add ThinLtoJIT example.

Move ExplicitMemoryBarrier enum to ThinLtoJIT

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

Split off ThinLtoInstrumentationLayer::dump() from its dtor

Fri, Jan 31, 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

Fri, Jan 31, 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

Fri, Jan 31, 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.

Fri, Jan 31, 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

Fri, Jan 31, 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.

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

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

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

Accept ThinLTO global index as input file

Fri, Jan 31, 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

Fri, Jan 31, 3:51 AM · Restricted Project

Sun, Jan 26

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.

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

Drop requirement to apply D72301 before this patch

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

Adjust for emulated-TLS changes in ce2207abaf9a

Sun, Jan 26, 9:11 AM · Restricted Project

Sun, Jan 19

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.

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

Sort PathRank candidates by minimal distance

Sun, Jan 19, 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

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

Submit actual module keys and sort getAllModulePaths() by ID

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

Fix GUID when instrumenting functions with local linkage

Sun, Jan 19, 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

Sun, Jan 19, 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
sgraenitz updated the diff for D72486: Add ThinLtoJIT example.

Pull in new modules also for global variables

Jan 10 2020, 4:16 PM · Restricted Project
sgraenitz added a comment to rGece8fed60906: [ORC] Add a runAsMain utility function to ExecutionUtils..

Looks like this broke argument handling in orc-lazy mode for lli.
Given a bitcode version of a main2.c like this:

#include <stdio.h>
int main(int argc, char *argv[]) {
  for (int i = 0; i < argc; i++)
    printf("%d: %s\n", argv[i]);
  return 0;
}
Jan 10 2020, 10:41 AM
sgraenitz added a reviewer for D72486: Add ThinLtoJIT example: kavon.
Jan 10 2020, 2:35 AM · Restricted Project

Jan 9 2020

sgraenitz added reviewers for D72486: Add ThinLtoJIT example: tejohnson, pree-jackie, AlexDenisov.
Jan 9 2020, 4:14 PM · Restricted Project
sgraenitz added a comment to D72486: Add ThinLtoJIT example.

Sample output:

> ./ThinLtoJIT -debug -debug-only="thinltojit" -compile-threads=2 example.bc tinyexpr.bc compile.bc free.bc eval.bc
1 new flags raised
Nudged 1 new functions into discovery
Instrumented 1 new functions in module example.bc
Generator: Added 1 new modules
Nudged 1 new functions into discovery
DiscoveryThread: 3 new modules (1 known modules)
1 new flags raised
DiscoveryThread: 0 new modules (3 known modules)
1 new flags raised
DiscoveryThread: 0 new modules (4 known modules)
Instrumented 3 new functions in module tinyexpr.bc
1 new flags raised
DiscoveryThread: 0 new modules (3 known modules)
Instrumented 23 new functions in module compile.bc
Generator: Added 0 new modules
11 new flags raised
DiscoveryThread: 0 new modules (3 known modules)
1 new flags raised
DiscoveryThread: 0 new modules (0 known modules)
Instrumented 1 new functions in module eval.bc
1 new flags raised
DiscoveryThread: 0 new modules (1 known modules)
Instrumented 2 new functions in module free.bc
Generator: Added 0 new modules
2 new flags raised
DiscoveryThread: 0 new modules (1 known modules)
2 new flags raised
DiscoveryThread: 0 new modules (0 known modules)
The expression:
	sqrt(5^2+7^2+11^2+(8-2)^2)
evaluates to:
	15.198684
Discovery flags stats
Alloc:  4096
Used:     32
Fired:    21
Jan 9 2020, 4:12 PM · Restricted Project
sgraenitz updated the diff for D72486: Add ThinLtoJIT example.

Polishing

Jan 9 2020, 4:08 PM · Restricted Project
sgraenitz created D72486: Add ThinLtoJIT example.
Jan 9 2020, 3:39 PM · Restricted Project

Jan 6 2020

sgraenitz created D72301: [ORC] Fix the move-captured std::unique_ptr vs. std::function dilemma.
Jan 6 2020, 1:20 PM · Restricted Project

Jan 3 2020

sgraenitz committed rGc7191d3acddb: [NFC][ORC] Fix typos and whitespaces in comments (authored by sgraenitz).
[NFC][ORC] Fix typos and whitespaces in comments
Jan 3 2020, 1:02 PM
sgraenitz created D72176: Make ErrorList class default constructible and add simple push_back() method.
Jan 3 2020, 12:31 PM · Restricted Project

Dec 4 2019

sgraenitz added a comment to D69589: [lldb] Refactor all POST_BUILD commands into targets.

I'd recommend to be careful when making a change of this size. There are a lot of possible configurations.
If you split it up into a few smaller and more dedicated commits, you will make your life easier. Otherwise someone might just revert everything if this happens to break a bot.

Dec 4 2019, 2:19 PM · Restricted Project

Sep 24 2019

sgraenitz resigned from D57402: build: remove custom variables.
Sep 24 2019, 6:04 AM · Restricted Project
sgraenitz resigned from D67890: [lldb] [cmake] Fix installing Python modules on systems using /usr/lib.
Sep 24 2019, 6:04 AM · Restricted Project
sgraenitz resigned from D57750: [CMake] Don't add `cxx` to `LLDB_TEST_DEPS` if it doesn't exist..
Sep 24 2019, 6:04 AM · Restricted Project
sgraenitz resigned from D59831: [CMake] macOS: Find DebugSymbols.framework inside the SDK.
Sep 24 2019, 6:04 AM · Restricted Project
sgraenitz resigned from D32597: Initiate loading of shared libraries in parallel.
Sep 24 2019, 6:04 AM · Restricted Project
sgraenitz resigned from D29144: LLDB: fix for TestCallThatThrows.py test fail.
Sep 24 2019, 6:03 AM
sgraenitz added a comment to D65934: [ORC] FIxed warning on Windows about deprecated ORCv1.

Right, this was a missing deprecation change. Thanks for posting! Lang fixed it the same day, so I guess we can abandon this review.

Sep 24 2019, 5:58 AM · Restricted Project
sgraenitz added a comment to rG9e52d0576ab7: [ORC] Suppress an ORCv1 deprecation warning..

This change was proposed in review D65934

Sep 24 2019, 5:54 AM

Sep 18 2019

sgraenitz accepted D67175: [llvm] [cmake] Add possibility to use ChooseMSVCCRT.cmake when include LLVM library.

Did this land?

Sep 18 2019, 4:08 AM · Restricted Project
sgraenitz committed rG2c72b4175756: [lldb][CMake] Build LLDB.framework with -Wdocumentation in Xcode (authored by sgraenitz).
[lldb][CMake] Build LLDB.framework with -Wdocumentation in Xcode
Sep 18 2019, 3:41 AM
sgraenitz committed rGa206de8a0e6a: [lldb][CMake] Infer `Clang_DIR` if not passed explicitly (authored by sgraenitz).
[lldb][CMake] Infer `Clang_DIR` if not passed explicitly
Sep 18 2019, 3:20 AM

Aug 8 2019

sgraenitz updated the diff for D65798: [lldb][CMake] Infer `Clang_DIR` if not passed explicitly.

Achieve the same via extra HINT to find_package(Clang ...)

Aug 8 2019, 6:45 AM · Restricted Project, Restricted Project
sgraenitz committed rGc822ab8f9acc: [lldb][CMake] Disable modules in Xcode projects (authored by sgraenitz).
[lldb][CMake] Disable modules in Xcode projects
Aug 8 2019, 6:40 AM
sgraenitz abandoned D65939: [lldb][CMake] Add LLDB_ENABLE_WERROR option.

So, why doesn't LLVM_ENABLE_WERROR suffice? It looks like that ought to work even in standalone builds...

Aug 8 2019, 6:34 AM · Restricted Project
sgraenitz added inline comments to D65939: [lldb][CMake] Add LLDB_ENABLE_WERROR option.
Aug 8 2019, 4:19 AM · Restricted Project
sgraenitz created D65939: [lldb][CMake] Add LLDB_ENABLE_WERROR option.
Aug 8 2019, 4:17 AM · Restricted Project

Aug 7 2019

sgraenitz created D65874: [lldb][CMake] Disable modules in Xcode projects.
Aug 7 2019, 7:46 AM · Restricted Project, Restricted Project
sgraenitz accepted D65862: Remove xcode-specific Config.h.

Right

Aug 7 2019, 5:24 AM · Restricted Project
sgraenitz added a comment to D65862: Remove xcode-specific Config.h.

Originally introduced with D31969. LGTM. Maybe we can remove even more?

Aug 7 2019, 5:13 AM · Restricted Project
sgraenitz added a comment to D65798: [lldb][CMake] Infer `Clang_DIR` if not passed explicitly.

Making it so that the clang is automatically found it if happens to be next to llvm seems like a reasonable thing to me. I have no idea what would be the canonical cmake way to do that...

Aug 7 2019, 4:46 AM · Restricted Project, Restricted Project
sgraenitz updated the diff for D65798: [lldb][CMake] Infer `Clang_DIR` if not passed explicitly.

Update documentation to mention multiple provided build trees and the usage of Clang_DIR

Aug 7 2019, 4:23 AM · Restricted Project, Restricted Project
sgraenitz committed rGf24100179306: [lldb][CMake] Workaround debugserver code-signing issue in generated Xcode… (authored by sgraenitz).
[lldb][CMake] Workaround debugserver code-signing issue in generated Xcode…
Aug 7 2019, 4:04 AM
sgraenitz committed rGbefde45a6f60: [lldb][CMake] Fix one more detail in r368066 (authored by sgraenitz).
[lldb][CMake] Fix one more detail in r368066
Aug 7 2019, 3:48 AM
sgraenitz added a comment to D65798: [lldb][CMake] Infer `Clang_DIR` if not passed explicitly.

What do you think?

Aug 7 2019, 3:33 AM · Restricted Project, Restricted Project
sgraenitz updated the summary of D65798: [lldb][CMake] Infer `Clang_DIR` if not passed explicitly.
Aug 7 2019, 3:33 AM · Restricted Project, Restricted Project
sgraenitz added inline comments to D65798: [lldb][CMake] Infer `Clang_DIR` if not passed explicitly.
Aug 7 2019, 3:33 AM · Restricted Project, Restricted Project
sgraenitz updated the diff for D65798: [lldb][CMake] Infer `Clang_DIR` if not passed explicitly.

Change comment and condition to only infer Clang_DIR if it exists.

Aug 7 2019, 3:29 AM · Restricted Project, Restricted Project
sgraenitz committed rGefd0e11b26de: [lldb][NFC] Fix typo in 368066 (authored by sgraenitz).
[lldb][NFC] Fix typo in 368066
Aug 7 2019, 3:04 AM

Aug 6 2019

sgraenitz added inline comments to D65798: [lldb][CMake] Infer `Clang_DIR` if not passed explicitly.
Aug 6 2019, 2:08 PM · Restricted Project, Restricted Project
sgraenitz committed rG7f34a3652e9c: [lldb][CMake] Generating Xcode projects (authored by sgraenitz).
[lldb][CMake] Generating Xcode projects
Aug 6 2019, 10:22 AM
sgraenitz added a comment to D65566: [lldb][CMake] Workaround debugserver code-signing issue in generated Xcode project.

Solutions are clearly favorable over workarounds like this, but I couldn't find one. Xcode has a mechanism called sign on copy which seems to be the native way to avoid this problem, but I couldn't get it to work with LLDB, because I want to copy the build output of a target and this caused a cyclic dependency. I didn't find more information about it and there seems to be no way to generate this behavior with CMake. The only way around seems to be a custom script, but that is no better than the workaround here.

Aug 6 2019, 10:14 AM · Restricted Project, Restricted Project
sgraenitz updated the summary of D65797: [lldb][CMake] Generating Xcode projects.
Aug 6 2019, 9:19 AM · Restricted Project, Restricted Project
sgraenitz updated the diff for D65797: [lldb][CMake] Generating Xcode projects.

Improve warning message

Aug 6 2019, 9:19 AM · Restricted Project, Restricted Project
sgraenitz added inline comments to D65798: [lldb][CMake] Infer `Clang_DIR` if not passed explicitly.
Aug 6 2019, 8:42 AM · Restricted Project, Restricted Project
sgraenitz created D65798: [lldb][CMake] Infer `Clang_DIR` if not passed explicitly.
Aug 6 2019, 3:34 AM · Restricted Project, Restricted Project
sgraenitz created D65797: [lldb][CMake] Generating Xcode projects.
Aug 6 2019, 3:25 AM · Restricted Project, Restricted Project

Aug 2 2019

sgraenitz abandoned D65436: [docs] Add note about git version to git-llvm section.
Aug 2 2019, 9:57 AM · Restricted Project, Restricted Project
sgraenitz added a comment to D65566: [lldb][CMake] Workaround debugserver code-signing issue in generated Xcode project.

Is there a way to use the debugserver in the framework instead?

Aug 2 2019, 5:02 AM · Restricted Project, Restricted Project

Aug 1 2019

sgraenitz committed rG3fe35299552b: [lldb][docs] Update landing page for monorepo (authored by sgraenitz).
[lldb][docs] Update landing page for monorepo
Aug 1 2019, 3:35 AM
sgraenitz committed rGed38be87fcea: [lldb][CMake] Avoid 'Autogenerate scheme' dialogs in Xcode projects (authored by sgraenitz).
[lldb][CMake] Avoid 'Autogenerate scheme' dialogs in Xcode projects
Aug 1 2019, 3:35 AM
sgraenitz added a comment to D65566: [lldb][CMake] Workaround debugserver code-signing issue in generated Xcode project.

Checked with:

> xcodebuild -configuration Release -target debugserver
> codesign -dv Release/bin/LLDB.framework/Versions/A/Resources/debugserver
> codesign -dv Release/bin/debugserver
Aug 1 2019, 2:38 AM · Restricted Project, Restricted Project