This is an archive of the discontinued LLVM Phabricator instance.

[Driver] implement -feverything
Needs RevisionPublic

Authored by nickdesaulniers on Apr 1 2019, 2:34 AM.

Details

Summary

Due to the wild popularity of -Weverything (used for enabling all
warnings), we're back for round 2 (electric boogaloo) with a succinct
analog to enable all -f flags; -feverything.

This includes favorite hits like:

  • -funsafe-math-optimizations
    • who knew floating point math could be BOTH fun and safe, WHO KNEW?!1
  • your favorite language extensions
    • -fborland-extensions
    • -fms-extensions
    • -fheinous-gnu-extensions
    • -fplan9-extensions (TODO: implement like GCC)
  • flags specific to languages (whether you're using them or not) like:
    • CUDA
    • FORTRAN
    • Objective-C
    • OpenMP
  • flags specific to target (whether you're targeting them or not) like:
    • -faltivec
    • -fcray-pointer
    • -fcall-saved-*/-ffixed-* (aka "build your own calling convention!")
  • I don't know what these do, but they sound nice:
    • -fmudflap
    • -fdollar-ok
    • -fropi
    • -frwpi

Can't decide between the overflow behavior of -fwrapv or -ftrapv?
¿Porque No Los Dos?

Next time you're having trouble getting your code to compile, try
-feverything.

TODO:

  • unit tests (honestly afraid to run this outside a VM, though this does

enable all runtime sanitizers for extra safety).

  • -fno-everything

Event Timeline

nickdesaulniers created this revision.Apr 1 2019, 2:34 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptApr 1 2019, 2:34 AM

In addition to -fno-everything, don't forget about -fnothing and -fno-nothing, which seem like they would also be nice to have.

yuxuanchen1997 requested changes to this revision.EditedApr 1 2019, 11:30 AM
yuxuanchen1997 added a subscriber: yuxuanchen1997.

enable all runtime sanitizers for extra safety

Brilliant idea. But I wonder how that could be done for -fsanitize. ASAN and MSAN can't be used together.

This revision now requires changes to proceed.Apr 1 2019, 11:30 AM

enable all runtime sanitizers for extra safety

Brilliant idea. But I wonder how that could be done for -fsanitize. ASAN and MSAN can't be used together.

Nonsense.
There is a patch that allows to offload the shadow memory onto the cloud via blockchain,
in encrypted form for extra security of course. That will allow to use both sanitizers together.

pcc added a subscriber: pcc.Apr 1 2019, 12:20 PM

enable all runtime sanitizers for extra safety

Brilliant idea. But I wonder how that could be done for -fsanitize. ASAN and MSAN can't be used together.

Nonsense.
There is a patch that allows to offload the shadow memory onto the cloud via blockchain,
in encrypted form for extra security of course. That will allow to use both sanitizers together.

That's unsurprising, given that LLVM already contains blockchain technology.
http://llvm-cs.pcc.me.uk/lib/CodeGen/MachineBlockPlacement.cpp#214