* v3Os: include <windows.h> instead of <winnt.h>
The windows.h header file should be included prior to any other headers,
in order to ensure all definitions are available. By only including
some headers, such as winnt.h, many "undefined symbol" messages are
generated.
Include "windows.h" to fix the build on msys2 under mingw64.
Signed-off-by: Sean Cross <sean@xobs.io>
* configure: check for bcrypt and psapi on windows
These two libraries must be linked in order to have access to
BCryptGenRandom and GetProcessMemoryInfo respectively.
Signed-off-by: Sean Cross <sean@xobs.io>
The build is now by default configured to link performance critical
libraries (libgcc, libstdc++, libtcmalloc) statically. This improves
Verilation speed by between 4.5-7% based on my measurements as it
eliminates approx 20% of the mispredicted branches from the execution.
With partial static linking, the size of the .text section in
verilator_bin is increased by about 14%, and the binary is itself only
about 800KB bigger on disk, so hopefully this is not a big issue in
exchange for the faster compilation speed. A configure option
"--disable-partial-static" is provided to restore the old behaviour of
linking everything dynamically.
Note: This patch also changes to use libtcmalloc_minimal, which is all
we really need and itself has fewer dependencies.
As Verilator continuously allocates and releases small objects (e.g.:
AstNode, V3GraphVertex, V3GraphEdge), it spends a significant amount of
time in malloc/free and friends. This patch adds the --enable-tcmalloc
configure option to link Verilator against the high performance malloc
implementation library libtcmalloc. The default is to use libtcmalloc if
available on the system. Note that there are no source code change, we
are simply replacing the standard library memory allocation functions.
Measured major compilation speed improvement of 27% when running
Verilator with -O3 on a large design.