{"action":"created","issue":{"url":"https://api.github.com/repos/nickg/nvc/issues/198","labels_url":"https://api.github.com/repos/nickg/nvc/issues/198/labels{/name}","comments_url":"https://api.github.com/repos/nickg/nvc/issues/198/comments","events_url":"https://api.github.com/repos/nickg/nvc/issues/198/events","html_url":"https://github.com/nickg/nvc/issues/198","id":83901810,"number":198,"title":"Feature request: Improve performance by avoiding re-linking.","user":{"login":"kraigher","id":4018223,"avatar_url":"https://avatars.githubusercontent.com/u/4018223?v=3","gravatar_id":"","url":"https://api.github.com/users/kraigher","html_url":"https://github.com/kraigher","followers_url":"https://api.github.com/users/kraigher/followers","following_url":"https://api.github.com/users/kraigher/following{/other_user}","gists_url":"https://api.github.com/users/kraigher/gists{/gist_id}","starred_url":"https://api.github.com/users/kraigher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kraigher/subscriptions","organizations_url":"https://api.github.com/users/kraigher/orgs","repos_url":"https://api.github.com/users/kraigher/repos","events_url":"https://api.github.com/users/kraigher/events{/privacy}","received_events_url":"https://api.github.com/users/kraigher/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-06-02T08:04:08Z","updated_at":"2015-06-14T17:25:28Z","closed_at":null,"body":"Consider the situation where a library of many VHDL packages containing verification code is used by every test bench and that there are hundreds of such test benches. Most test benches and their corresponding device under test are very small. It seems NVC will spend a lot of time re-linking everything including the re-usable verification library for every elaboration/run of the individual test benches making the regression suite take a very long time. When the run-time of each test bench is very small the link-time will dominate hugely. \r\n\r\nI have a regression suite where running the tests using ModelSim and GHDL-LLVM takes around 0.2 s per test whereas NVC takes around 5.6 s per test. The reason is the use of the large library of verification packages. Thus I wonder if there is any possibility of re-using intermediate LLVM-link results or any other mechanism to improve the situation? My feeling is that NVC will perform a lot of redundant work for each elaboration/run. \r\n\r\nMaybe this is something that has to be managed by an outside script, but in that case how?"},"comment":{"url":"https://api.github.com/repos/nickg/nvc/issues/comments/111852813","html_url":"https://github.com/nickg/nvc/issues/198#issuecomment-111852813","issue_url":"https://api.github.com/repos/nickg/nvc/issues/198","id":111852813,"user":{"login":"nickg","id":11442,"avatar_url":"https://avatars.githubusercontent.com/u/11442?v=3","gravatar_id":"","url":"https://api.github.com/users/nickg","html_url":"https://github.com/nickg","followers_url":"https://api.github.com/users/nickg/followers","following_url":"https://api.github.com/users/nickg/following{/other_user}","gists_url":"https://api.github.com/users/nickg/gists{/gist_id}","starred_url":"https://api.github.com/users/nickg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickg/subscriptions","organizations_url":"https://api.github.com/users/nickg/orgs","repos_url":"https://api.github.com/users/nickg/repos","events_url":"https://api.github.com/users/nickg/events{/privacy}","received_events_url":"https://api.github.com/users/nickg/received_events","type":"User","site_admin":false},"created_at":"2015-06-14T17:25:28Z","updated_at":"2015-06-14T17:25:28Z","body":"I've made a couple of improvements in this area:\r\n* NVC no longer shells out to the external `llvm-link` and `opt` programs: instead it uses the API to perform these tasks correctly.\r\n* It's now possible to chain commands together to avoid re-reading LLVM bitcode and library files between each step. For example `nvc -a foo.vhd -e foo -r` performs analysis, elaboration, and execution in a single command. The combination `-e foo -r` is equivalent to GHDL's `--elab-run`."}}