[PATCH 01/11] add linearization as a pass

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If linearize_symbol() is called, it's meaningless to disable
linearization. As such, linearization was not really considered
as a pass. More exactly, there is no '-flinearize...' flag since
-flinearize-enable & -flinearize-disable are both meaningless.

However, -flinearize=last can be very useful for testing. So,
recognize 'linearize' as a pass and leave -flinearize-{en,dis}able
without effect.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx>
---
 Documentation/dev-options.rst | 1 +
 lib.c                         | 1 +
 2 files changed, 2 insertions(+)

diff --git a/Documentation/dev-options.rst b/Documentation/dev-options.rst
index 04fb651fc..23e8096c2 100644
--- a/Documentation/dev-options.rst
+++ b/Documentation/dev-options.rst
@@ -33,6 +33,7 @@ OPTIONS
 
   The passes currently understood are:
 
+    * ``linearize`` (can't be disabled)
     * ``mem2reg``
     * ``optim``
 
diff --git a/lib.c b/lib.c
index db456a63e..f2f219b19 100644
--- a/lib.c
+++ b/lib.c
@@ -956,6 +956,7 @@ static int handle_fmax_warnings(const char *arg, const char *opt, const struct f
 static struct flag fflags[] = {
 	{ "diagnostic-prefix",	NULL,	handle_fdiagnostic_prefix },
 	{ "dump-ir",		NULL,	handle_fdump_ir },
+	{ "linearize",		NULL,	handle_fpasses,	PASS_LINEARIZE },
 	{ "max-warnings=",	NULL,	handle_fmax_warnings },
 	{ "mem-report",		&fmem_report },
 	{ "memcpy-max-count=",	NULL,	handle_fmemcpy_max_count },
-- 
2.18.0




[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux