Minor improvements to multithreaded compilation in Standalone #341

Merged
sb10q merged 1 commits from fix/threading-support into master 2024-08-17 17:37:20 +08:00
Collaborator
  • Require the use of -T to specify threading
  • Treat -T0 as using all available threads
  • Fix run_demo.sh script to clean all previous build output and link all bitcode modules from different threads
- Require the use of `-T` to specify threading - Treat `-T0` as using all available threads - Fix `run_demo.sh` script to clean all previous build output and link all bitcode modules from different threads
derppening added 2 commits 2023-10-13 15:04:45 +08:00
derppening requested review from sb10q 2023-10-13 15:04:50 +08:00
derppening added a new dependency 2023-10-13 15:05:07 +08:00
derppening removed a dependency 2023-10-13 15:05:10 +08:00
derppening self-assigned this 2023-10-13 15:05:25 +08:00
derppening added a new dependency 2023-10-13 15:05:35 +08:00
Author
Collaborator

v2: Use llvm-link even if there is only one input file

v2: Use `llvm-link` even if there is only one input file
Author
Collaborator

v3: Use nullglob to collect all module*.bc file (even if they do not exist)

v3: Use `nullglob` to collect all `module*.bc` file (even if they do not exist)
Author
Collaborator

v4: Squashed redundant commits

v4: Squashed redundant commits
sb10q reviewed 2023-10-16 15:48:42 +08:00
@ -52,2 +49,4 @@
clang -c -std=gnu11 -Wall -Wextra -O3 -emit-llvm -o demo.bc demo.c
shopt -s nullglob
llvm-link -o module.bc module*.bc main.bc
Owner

Isn't module*.bc also matching module.bc? I know you are deleting it above but it looks confusing and a potential source of bugs. Better rename it to something else and clear e.g nac3output.bc ?

Isn't module*.bc also matching module.bc? I know you are deleting it above but it looks confusing and a potential source of bugs. Better rename it to something else and clear e.g nac3output.bc ?
Author
Collaborator

Addressed in v5.

Addressed in v5.
derppening added 2 commits 2023-10-16 15:53:56 +08:00
a50c690428 standalone: Fix run_demo script
- Link main and module*.bc together if using multiple threads
- Fix temporary files not being deleted
Author
Collaborator

v5: Renamed output bitcode to nac3out.bc.

v5: Renamed output bitcode to `nac3out.bc`.
sb10q merged commit 950f431483 into master 2023-10-16 15:55:56 +08:00
sb10q deleted branch fix/threading-support 2023-10-16 15:55:58 +08:00
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Reference: M-Labs/nac3#341
No description provided.