mirror of
https://github.com/verilator/verilator.git
synced 2026-08-22 14:06:52 +02:00
Add --compiler flags, and break up deep functions
git-svn-id: file://localhost/svn/verilator/trunk/verilator@913 77ca24e4-aefa-0310-84f0-b9a241c72d87
This commit is contained in:
+28
-5
@@ -246,6 +246,27 @@ output files.
|
||||
|
||||
Specifies C++ without SystemC output mode; see also --sc and --sp.
|
||||
|
||||
=item --compiler I<compiler-name>
|
||||
|
||||
Enables tunings and work-arounds for the specified C++ compiler.
|
||||
|
||||
=over 4
|
||||
|
||||
=item gcc
|
||||
|
||||
Tune for Gnu C++, although generated code should work on almost any
|
||||
compliant C++ compiler. Currently the default.
|
||||
|
||||
=item msvc
|
||||
|
||||
Tune for Microsoft Visual C++. This may reduce execution speed as it
|
||||
enables several workarounds to avoid silly hardcoded limits in MSVC++.
|
||||
This includes breaking deeply nested parenthesized expressions into
|
||||
sub-expressions to avoid error C1009, and breaking deep blocks into
|
||||
functions to avoid error C1061.
|
||||
|
||||
=back
|
||||
|
||||
=item --coverage
|
||||
|
||||
Enables all forms of coverage, alias for --coverage-line, --coverage-user
|
||||
@@ -691,11 +712,13 @@ fast path, mostly code that is executed every cycle. OPT_SLOW specifies
|
||||
optimizations for slow-path files (plus tracing), which execute only
|
||||
rarely, yet take a long time to compile with optimization on. OPT
|
||||
specifies overall optimization and affects all compiles, including those
|
||||
OPT_FAST and OPT_SLOW affect. For best results, use OPT="-O2". Nearly the
|
||||
same results can be had with much better compile times with OPT_FAST="-O1
|
||||
-fstrict-aliasing". Unfortunately, using the optimizer with SystemC files
|
||||
can result in compiles taking several minutes. (The SystemC libraries have
|
||||
many little inlined functions that drive the compiler nuts.)
|
||||
OPT_FAST and OPT_SLOW affect. For best results, use OPT="-O2", and link
|
||||
with "-static". Nearly the same results can be had with much better
|
||||
compile times with OPT_FAST="-O1 -fstrict-aliasing".
|
||||
|
||||
Unfortunately, using the optimizer with SystemC files can result in
|
||||
compiles taking several minutes. (The SystemC libraries have many little
|
||||
inlined functions that drive the compiler nuts.)
|
||||
|
||||
For best results, use GCC 3.3 or newer. GCC 3.2 and earlier have
|
||||
optimization bugs around pointer aliasing detection, which can result in 2x
|
||||
|
||||
Reference in New Issue
Block a user